1 # Configuration section
6 EDG_CFLAGS=-b nomris -f win32 -b ra-chordal-spill=morgan --c -Ic:\\devstudio\\include
8 EXCLUDE=bf_localinit.c bf_store.c calls.c compress95.c convtest.c \
9 fe_bug.c gnu_def.c harness.c if.c psi_test.c
10 SOURCES=$(filter-out $(EXCLUDE), $(wildcard *.c))
11 GCCEXES=$(addprefix gcc/, $(addsuffix .exe, $(basename $(SOURCES))))
12 FIRMEXES=$(addprefix firm/, $(addsuffix .exe, $(basename $(SOURCES))))
13 FIRMASSEMBLERS=$(addprefix firm/, $(addsuffix .s, $(basename $(SOURCES))))
14 DONTCOMPARE = XXEndless.c
15 COMPARES = $(addprefix compare_, $(filter-out $(DONTCOMPARE), $(SOURCES)))
17 .PHONY: all clean firm gcc compare
22 @echo " gcc Build files with gcc"
23 @echo " firm Build files with firm/edg"
24 @echo " compare Compare results from firm with gcc executables"
30 firm: $(FIRMEXES) $(FIRMASSEMBLERS)
34 gcc/%.result: gcc/%.exe
35 @test -z gcc || mkdir -p gcc
36 gcc/$*.exe >& $@ || true
38 firm/%.result: firm/%.exe
39 @test -z firm || mkdir -p firm
40 firm/$*.exe >& $@ || echo "$*.c" >> doesntrun.txt
42 compare_%.c: gcc/%.exe firm/%.exe gcc/%.result firm/%.result
43 diff -u gcc/$*.result firm/$*.result || echo "$*.c" >> broken.txt
46 @test -z gcc || mkdir -p gcc
47 $(GCC) $(GCC_CFLAGS) $*.c -o $@
50 @test -z firm || mkdir -p firm
51 cd firm ; $(EDG) $(EDG_CFLAGS) ../$*.c || echo "$*.c" >> ../compile_failed.txt
52 mv $*.s firm || echo "" > firm/$*.s
55 $(GCC) firm/$*.s -o $@ || echo "$*.c" >> link_failed.txt