First implementation of lowering for calls with compound return values
[libfirm] / testprograms / Makefile.in
1 #
2 # Project:     libFIRM
3 # File name:   testprograms/Makefile.in
4 # Purpose:
5 # Author:      Boris Boesler, Till Riedel
6 # Modified by:
7 # Created:
8 # CVS-ID:      $Id$
9 # Copyright:   (c) 1999-2003 Universität Karlsruhe
10 # Licence:     This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
11 #
12
13 top_srcdir := @top_srcdir@
14 srcdir = @srcdir@
15 topdir = ..
16 subdir := testprograms
17
18 enable_libcore          := @enable_libcore@
19 enable_external_effects := @enable_external_effects@
20 disable_libiberty       := @disable_libiberty@
21
22 DIFF ?= diff # -c0  newer diffs do not support/need this
23 REF_DIR = $(srcdir)/ref-results
24
25 SOURCES := Makefile.in                  \
26         array-heap_example.c            \
27         array-stack_example.c           \
28         call_str_example.c              \
29         cond_example.c                  \
30         const_ent_example.c             \
31         const_eval_example.c            \
32         dead_block_example.c            \
33         empty.c                         \
34         endless_loop.c                  \
35         float_example.c                 \
36         global_cse.c                    \
37         global_var_example.c            \
38         identify_types.c                \
39         if_else_example.c               \
40         if_example.c                    \
41         if_while_example.c              \
42         inheritance_example.c           \
43         irr_cf_example.c                \
44         irr_loop_example.c              \
45         memory_example.c                \
46         oo_inline_example.c             \
47         oo_program_example.c            \
48         recursions.c                    \
49         strength_red_example.c          \
50         loop_unroll_example.c           \
51         three_cfpred_example.c          \
52         while_example.c
53
54
55 GENFILES = %.vcg results.txt
56
57 bin_EXAMPLES = $(CFILES:.c=)
58 run_bin_EXAMPLES = $(patsubst %.c,./%;,$(CFILES))
59
60 include $(topdir)/MakeRules
61
62 CPPFLAGS += -I$(top_srcdir)/ir/adt -I$(top_srcdir)/ir/common -I$(top_srcdir)/ir/debug \
63                 -I$(top_srcdir)/ir/ident -I$(top_srcdir)/ir/ir -I$(top_srcdir)/ir/tr \
64                 -I$(top_srcdir)/ir/tv -I$(top_srcdir)/ir/st  -I$(top_srcdir)/ir/ana \
65                 -I$(top_srcdir)/ir/opt -I$(top_srcdir)/ir/stat -I$(topdir)/ir/config \
66                 -I$(top_srcdir)/ir/arch
67
68 LDFLAGS = -L$(topdir)
69 LDFLAGS+= @LDFLAGS@
70 LDLIBS += -lfirm @LIBS@
71
72 ifeq ($(enable_libcore),yes)
73 LDLIBS += -lcore
74 endif
75
76 ifeq ($(enable_external_effects),yes)
77 LDLIBS += -lxml2
78 endif
79
80 ifeq ($(disable_libiberty),yes)
81 LDLIBS += -liberty
82 endif
83
84
85 GENFILES := $(bin_EXAMPLES) *.vcg
86
87 include $(top_srcdir)/MakeTargets
88
89 all:    $(bin_EXAMPLES) $(topdir)/libfirm.a
90
91 $(bin_EXAMPLES): $(topdir)/libfirm.a
92
93 run:
94         $(run_bin_EXAMPLES)
95
96 test:   realclean all
97         ls >.ignore
98         rm -rf results; mkdir results; ($(run_bin_EXAMPLES)) >results/run-result.txt; \
99         mv *.vcg results; cd results;
100         @($(DIFF) --brief --exclude=CVS results $(REF_DIR) && \
101         echo Libfirm test successful ) || echo Libfirm test failed ;
102
103 reference: realclean all
104         $(RM) $(REF_DIR)/*.vcg
105         ($(run_bin_EXAMPLES))>$(REF_DIR)/run-result.txt
106         install -c -m0644 *.vcg $(REF_DIR)