implemented loop unrolling optimization
[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 DIFF ?= diff -c0
19 REF_DIR = $(srcdir)/ref-results
20
21 SOURCES := Makefile.in                  \
22         array-heap_example.c            \
23         array-stack_example.c           \
24         call_str_example.c              \
25         cond_example.c                  \
26         const_ent_example.c             \
27         const_eval_example.c            \
28         dead_block_example.c            \
29         empty.c                         \
30         endless_loop.c                  \
31         float_example.c                 \
32         global_cse.c                    \
33         global_var_example.c            \
34         identify_types.c                \
35         if_else_example.c               \
36         if_example.c                    \
37         if_while_example.c              \
38         inheritance_example.c           \
39         irr_cf_example.c                \
40         irr_loop_example.c              \
41         memory_example.c                \
42         oo_inline_example.c             \
43         oo_program_example.c            \
44         recursions.c                    \
45         strength_red_example.c          \
46         loop_unroll_example.c           \
47         three_cfpred_example.c          \
48         while_example.c
49
50
51 GENFILES = %.vcg results.txt
52
53 bin_EXAMPLES = $(CFILES:.c=)
54 run_bin_EXAMPLES = $(patsubst %.c,./%;,$(CFILES))
55
56 include $(topdir)/MakeRules
57
58 CPPFLAGS += -I$(top_srcdir)/ir/adt -I$(top_srcdir)/ir/common -I$(top_srcdir)/ir/debug \
59                 -I$(top_srcdir)/ir/ident -I$(top_srcdir)/ir/ir -I$(top_srcdir)/ir/tr \
60                 -I$(top_srcdir)/ir/tv -I$(top_srcdir)/ir/st  -I$(top_srcdir)/ir/ana \
61                 -I$(top_srcdir)/ir/opt -I$(top_srcdir)/ir/stat
62
63 LDFLAGS = -L$(topdir)
64 LDFLAGS+= @LDFLAGS@
65 LDLIBS += -lfirm -liberty @LIBS@
66 # @@@ TODO replace hand crafted stuff (xml2) for configure
67
68 GENFILES := $(bin_EXAMPLES) *.vcg
69
70 include $(top_srcdir)/MakeTargets
71
72 all:    $(bin_EXAMPLES) $(topdir)/libfirm.a
73
74 $(bin_EXAMPLES): $(topdir)/libfirm.a
75
76 run:
77         $(run_bin_EXAMPLES)
78
79 test:   realclean all
80         ls >.ignore
81         rm -rf results; mkdir results; ($(run_bin_EXAMPLES)) >results/run-result.txt; \
82         mv *.vcg results; cd results;
83         @($(DIFF) --brief --exclude=CVS results $(REF_DIR) && \
84         echo Libfirm test successful ) || echo Libfirm test failed ;
85
86 reference: realclean all
87         $(RM) $(REF_DIR)/*.vcg
88         ($(run_bin_EXAMPLES))>$(REF_DIR)/run-result.txt
89         install -c -m0644 *.vcg $(REF_DIR)