added copyright information
[libfirm] / testprograms / Makefile.in
index 12bf7e3..8ba9fa3 100644 (file)
@@ -25,7 +25,7 @@ SOURCES := Makefile.in \
 GENFILES = %.vcg results.txt
 
 bin_EXAMPLES = $(CFILES:.c=)
-run_bin_EXAMPLES = $(patsubst %.c,../%;,$(CFILES))
+run_bin_EXAMPLES = $(patsubst %.c,./%;,$(CFILES))
 
 include $(topdir)/MakeRules
 
@@ -33,7 +33,8 @@ CPPFLAGS += -I$(top_srcdir)/ir/adt -I$(top_srcdir)/ir/common -I$(top_srcdir)/ir/
                -I$(top_srcdir)/ir/ident -I$(top_srcdir)/ir/ir -I$(top_srcdir)/ir/tr \
                -I$(top_srcdir)/ir/tv -I$(top_srcdir)/ir/st  -I$(top_srcdir)/ir/ana
 
-LDFLAGS += -L$(topdir)
+LDFLAGS = -L$(topdir)
+LDFLAGS+= @LDFLAGS@
 LDLIBS += -lfirm -liberty
 
 GENFILES := $(bin_EXAMPLES) *.vcg
@@ -47,9 +48,10 @@ $(bin_EXAMPLES): $(topdir)/libfirm.a
 run:
        $(run_bin_EXAMPLES)
 
-test:   all
+test:   realclean all
        ls >.ignore
-       rm -rf results;mkdir results;cd results;($(run_bin_EXAMPLES)) >run-result.txt
+       rm -rf results; mkdir results; ($(run_bin_EXAMPLES)) >results/run-result.txt; \
+       mv *.vcg results; cd results;
        @($(DIFF) --exclude=CVS results $(REF_DIR) && \
        echo Libfirm test successful ) || echo Libfirm test failed ;