summaryrefslogtreecommitdiff
path: root/project/common.mk
blob: 2be29614979883e3d8b54eccd08821edb6d796c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
ir/%.lo:	build/gen/ir/%.c $(ALL_HEADERS) host.tag tree.tag gen.tag
		$(CC) -c -o $@ $< $(CFLAGS_SHARED)

ir/%.o:		build/gen/ir/%.c $(ALL_HEADERS) host.tag tree.tag gen.tag
		$(CC) -c -o $@ $< $(CFLAGS_STATIC)

ir/%.lo:	$(SOURCE_DIR)/ir/%.c $(ALL_HEADERS) host.tag tree.tag gen.tag
		$(CC) -c -o $@ $< $(CFLAGS_SHARED)

ir/%.o:		$(SOURCE_DIR)/ir/%.c $(ALL_HEADERS) host.tag tree.tag gen.tag
		$(CC) -c -o $@ $< $(CFLAGS_STATIC)

GEN_IR_SRCS = \
	build/gen/ir/ir/gen_irio.c \
	build/gen/ir/ir/gen_irnode.c \

GEN_EMITTER_SRCS = \
	build/gen/ir/be/arm/gen_arm_emitter.c \
	build/gen/ir/be/amd64/gen_amd64_emitter.c \
	build/gen/ir/be/ia32/gen_ia32_emitter.c \
	build/gen/ir/be/sparc/gen_sparc_emitter.c \
	build/gen/ir/be/TEMPLATE/gen_TEMPLATE_emitter.c \

GEN_OPCODES_SRCS = \
	build/gen/ir/be/arm/gen_arm_new_nodes.c \
	build/gen/ir/be/amd64/gen_amd64_new_nodes.c \
	build/gen/ir/be/ia32/gen_ia32_new_nodes.c \
	build/gen/ir/be/sparc/gen_sparc_new_nodes.c \
	build/gen/ir/be/TEMPLATE/gen_TEMPLATE_new_nodes.c \

GEN_REGALLOC_SRCS = \
	build/gen/ir/be/arm/gen_arm_regalloc_if.c \
	build/gen/ir/be/amd64/gen_amd64_regalloc_if.c \
	build/gen/ir/be/ia32/gen_ia32_regalloc_if.c \
	build/gen/ir/be/sparc/gen_sparc_regalloc_if.c \
	build/gen/ir/be/TEMPLATE/gen_TEMPLATE_regalloc_if.c \


be_src_dirs    = $(SOURCE_DIR)/ir/be/*/
be_src_files   = $(addsuffix *.c,$(be_src_dirs))
be_sort_files  = $(sort $(wildcard $(be_src_files)))

ir_src_dirs    = $(SOURCE_DIR)/ir/*/
ir_src_files   = $(addsuffix *.c,$(ir_src_dirs))
ir_sort_files  = $(sort $(wildcard $(ir_src_files)))

gen_src_files  = $(GEN_IR_SRCS)
gen_src_files += $(GEN_EMITTER_SRCS)
gen_src_files += $(GEN_OPCODES_SRCS)
gen_src_files += $(GEN_REGALLOC_SRCS)


BE_SRCS        = $(subst $(SOURCE_DIR)/ir/,ir/,$(be_sort_files))
IR_SRCS        = $(subst $(SOURCE_DIR)/ir/,ir/,$(ir_sort_files))
GEN_SRCS       = $(subst build/gen/ir/,ir/,$(gen_src_files))

COMMON_SRCS    = $(BE_SRCS) $(IR_SRCS) $(GEN_SRCS)