4 # File name: testprograms/Makefile.in
6 # Author: Boris Boesler, Till Riedel
10 # Copyright: (c) 1999-2003 Universität Karlsruhe
11 # Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
14 top_srcdir := @top_srcdir@
17 subdir := testprograms
20 REF_DIR = $(srcdir)/ref-results
22 SOURCES := Makefile.in \
23 array-heap_example.c \
24 array-stack_example.c \
28 const_eval_example.c \
29 dead_block_example.c \
34 global_var_example.c \
39 inheritance_example.c \
44 oo_program_example.c \
45 three_cfpred_example.c \
48 GENFILES = %.vcg results.txt
50 bin_EXAMPLES = $(CFILES:.c=)
51 run_bin_EXAMPLES = $(patsubst %.c,./%;,$(CFILES))
53 include $(topdir)/MakeRules
55 CPPFLAGS += -I$(top_srcdir)/ir/adt -I$(top_srcdir)/ir/common -I$(top_srcdir)/ir/debug \
56 -I$(top_srcdir)/ir/ident -I$(top_srcdir)/ir/ir -I$(top_srcdir)/ir/tr \
57 -I$(top_srcdir)/ir/tv -I$(top_srcdir)/ir/st -I$(top_srcdir)/ir/ana \
58 -I$(top_srcdir)/ir/opt
62 LDLIBS += -lfirm -liberty
64 GENFILES := $(bin_EXAMPLES) *.vcg
66 include $(top_srcdir)/MakeTargets
68 all: $(bin_EXAMPLES) $(topdir)/libfirm.a
70 $(bin_EXAMPLES): $(topdir)/libfirm.a
77 rm -rf results; mkdir results; ($(run_bin_EXAMPLES)) >results/run-result.txt; \
78 mv *.vcg results; cd results;
79 @($(DIFF) --exclude=CVS results $(REF_DIR) && \
80 echo Libfirm test successful ) || echo Libfirm test failed ;
82 reference: realclean all
83 $(RM) $(REF_DIR)/*.vcg
84 ($(run_bin_EXAMPLES))>$(REF_DIR)/run-result.txt
85 install -c -m0644 *.vcg $(REF_DIR)