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