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 \
38 inheritance_example.c \
43 oo_program_example.c \
44 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
61 LDLIBS += -lfirm -liberty
63 GENFILES := $(bin_EXAMPLES) *.vcg
65 include $(top_srcdir)/MakeTargets
67 all: $(bin_EXAMPLES) $(topdir)/libfirm.a
69 $(bin_EXAMPLES): $(topdir)/libfirm.a
76 rm -rf results; mkdir results; ($(run_bin_EXAMPLES)) >results/run-result.txt; \
77 mv *.vcg results; cd results;
78 @($(DIFF) --exclude=CVS results $(REF_DIR) && \
79 echo Libfirm test successful ) || echo Libfirm test failed ;
81 reference: realclean all
82 $(RM) $(REF_DIR)/*.vcg
83 ($(run_bin_EXAMPLES))>$(REF_DIR)/run-result.txt
84 install -c -m0644 *.vcg $(REF_DIR)