a new Makefile entry, so a Distribution is possible!
[libfirm] / testprograms / Makefile
1
2 DIRS = adt common debug ident ir tr tv
3 INCDIRS = $(DIRS:%=-I../ir/%) -I../ir/include
4
5 LIBDIRS=-L.. -L/usr/public/lib/gmp/
6 LIBS=-lfirm -lgmp -lm
7
8 %.o:    %.c
9         gcc -c $(INCDIRS) -g $<
10
11 orb:
12         ls
13
14 all: empty const_eval_example                                   \
15      if_example if_else_example if_while_example cond_example   \
16      call_str_example memory_example array-stack_example        \
17      array-heap_example oo_program_example irr_cf_example       \
18      irr_loop_example dead_block_example global_var_example     \
19      three_cfpred_example
20
21 clean:
22         rm -f                                   \
23         empty const_eval_example                \
24         if_example if_else_example              \
25         if_while_example cond_example           \
26         call_str_example memory_example         \
27         array-stack_example array-heap_example  \
28         oo_program_example irr_cf_example       \
29         irr_loop_example dead_block_example     \
30         global_var_example three_cfpred_example \
31         *.o *.vcg core
32
33 realclean:      clean
34
35 run:
36         ./empty;                \
37         const_eval_example;     \
38         if_example;             \
39         if_else_example;        \
40         if_while_example;       \
41         cond_example;           \
42         call_str_example;       \
43         memory_example;         \
44         array-stack_example;    \
45         array-heap_example;     \
46         oo_program_example;     \
47         irr_cf_example;         \
48         irr_loop_example;       \
49         dead_block_example;     \
50         global_var_example;     \
51         three_cfpred_example;
52
53 empty: empty.o
54         gcc -o empty empty.o $(LIBDIRS) $(LIBS)
55
56 const_eval_example: const_eval_example.o
57         gcc -o const_eval_example const_eval_example.o $(LIBDIRS) $(LIBS)
58
59 if_example: if_example.o
60         gcc -o if_example if_example.o $(LIBDIRS) $(LIBS)
61
62 if_else_example: if_else_example.o
63         gcc -o if_else_example if_else_example.o $(LIBDIRS) $(LIBS)
64
65 if_while_example: if_while_example.o
66         gcc -o if_while_example if_while_example.o $(LIBDIRS) $(LIBS)
67
68 cond_example: cond_example.o
69         gcc -o cond_example cond_example.o $(LIBDIRS) $(LIBS)
70
71 call_str_example: call_str_example.o
72         gcc -o call_str_example call_str_example.o $(LIBDIRS) $(LIBS)
73
74 memory_example: memory_example.o
75         gcc -o memory_example memory_example.o $(LIBDIRS) $(LIBS)
76
77 array-stack_example: array-stack_example.o
78         gcc -o array-stack_example array-stack_example.o $(LIBDIRS) $(LIBS)
79
80 array-heap_example: array-heap_example.o
81         gcc -o array-heap_example array-heap_example.o $(LIBDIRS) $(LIBS)
82
83 oo_program_example: oo_program_example.o
84         gcc -o oo_program_example oo_program_example.o $(LIBDIRS) $(LIBS)
85
86 irr_cf_example: irr_cf_example.o
87         gcc -o irr_cf_example irr_cf_example.o $(LIBDIRS) $(LIBS)
88
89 irr_loop_example: irr_loop_example.o
90         gcc -o irr_loop_example irr_loop_example.o $(LIBDIRS) $(LIBS)
91
92 dead_block_example: dead_block_example.o
93         gcc -o dead_block_example dead_block_example.o $(LIBDIRS) $(LIBS)
94
95 global_var_example: global_var_example.o
96         gcc -o global_var_example global_var_example.o $(LIBDIRS) $(LIBS)
97
98 three_cfpred_example: three_cfpred_example.o
99         gcc -o three_cfpred_example three_cfpred_example.o $(LIBDIRS) $(LIBS)