used new prefixed enum value
[libfirm] / testprograms / Makefile.in
1 # Hey Emacs, this is a -*- makefile -*-
2 #
3 # libFIRM Project
4 #
5 # $Id$
6 #
7
8 top_srcdir := @top_srcdir@
9 srcdir = @srcdir@
10 topdir = ..
11 subdir := testprograms
12
13 DIFF ?= diff -c0
14 REF_DIR = $(srcdir)/ref-results
15
16 SOURCES := Makefile.in \
17         array-heap_example.c   empty.c                irr_cf_example.c          \
18         array-stack_example.c  global_var_example.c   irr_loop_example.c        \
19         call_str_example.c     if_else_example.c      memory_example.c          \
20         cond_example.c         if_example.c           oo_program_example.c      \
21         const_eval_example.c   if_while_example.c     three_cfpred_example.c    \
22         dead_block_example.c   inheritance_example.c  while_example.c           \
23         endless_loop.c         global_cse.c           oo_inline_example.c
24
25 GENFILES = %.vcg results.txt
26
27 bin_EXAMPLES = $(CFILES:.c=)
28 run_bin_EXAMPLES = $(patsubst %.c,./%;,$(CFILES))
29
30 include $(topdir)/MakeRules
31
32 CPPFLAGS += -I$(top_srcdir)/ir/adt -I$(top_srcdir)/ir/common -I$(top_srcdir)/ir/debug \
33                 -I$(top_srcdir)/ir/ident -I$(top_srcdir)/ir/ir -I$(top_srcdir)/ir/tr \
34                 -I$(top_srcdir)/ir/tv -I$(top_srcdir)/ir/st  -I$(top_srcdir)/ir/ana
35
36 LDFLAGS = -L$(topdir)
37 LDFLAGS+= @LDFLAGS@
38 LDLIBS += -lfirm -liberty
39
40 GENFILES := $(bin_EXAMPLES) *.vcg
41
42 include $(top_srcdir)/MakeTargets
43
44 all:    $(bin_EXAMPLES) $(topdir)/libfirm.a
45
46 $(bin_EXAMPLES): $(topdir)/libfirm.a
47
48 run:
49         $(run_bin_EXAMPLES)
50
51 test:   realclean all
52         ls >.ignore
53         rm -rf results; mkdir results; ($(run_bin_EXAMPLES)) >results/run-result.txt; \
54         mv *.vcg results; cd results;
55         @($(DIFF) --exclude=CVS results $(REF_DIR) && \
56         echo Libfirm test successful ) || echo Libfirm test failed ;
57
58 reference: realclean all
59         $(RM) $(REF_DIR)/*.vcg
60         ($(run_bin_EXAMPLES))>$(REF_DIR)/run-result.txt
61         install -c -m0644 *.vcg $(REF_DIR)