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 \
46 three_cfpred_example.c \
49 GENFILES = %.vcg results.txt
51 bin_EXAMPLES = $(CFILES:.c=)
52 run_bin_EXAMPLES = $(patsubst %.c,./%;,$(CFILES))
54 include $(topdir)/MakeRules
56 CPPFLAGS += -I$(top_srcdir)/ir/adt -I$(top_srcdir)/ir/common -I$(top_srcdir)/ir/debug \
57 -I$(top_srcdir)/ir/ident -I$(top_srcdir)/ir/ir -I$(top_srcdir)/ir/tr \
58 -I$(top_srcdir)/ir/tv -I$(top_srcdir)/ir/st -I$(top_srcdir)/ir/ana \
59 -I$(top_srcdir)/ir/opt -I$(top_srcdir)/ir/stat
63 LDLIBS += -lfirm -liberty
65 GENFILES := $(bin_EXAMPLES) *.vcg
67 include $(top_srcdir)/MakeTargets
69 all: $(bin_EXAMPLES) $(topdir)/libfirm.a
71 $(bin_EXAMPLES): $(topdir)/libfirm.a
78 rm -rf results; mkdir results; ($(run_bin_EXAMPLES)) >results/run-result.txt; \
79 mv *.vcg results; cd results;
80 @($(DIFF) --brief --exclude=CVS results $(REF_DIR) && \
81 echo Libfirm test successful ) || echo Libfirm test failed ;
83 reference: realclean all
84 $(RM) $(REF_DIR)/*.vcg
85 ($(run_bin_EXAMPLES))>$(REF_DIR)/run-result.txt
86 install -c -m0644 *.vcg $(REF_DIR)