1 include Makefile.config
3 COMPARES = $(addprefix compare_, $(filter-out $(DONTCOMPARE), $(SOURCES)))
5 .PHONY: all clean firm gcc compare
10 @echo " gcc Build files with gcc"
11 @echo " firm Build files with firm/edg"
12 @echo " compare Compare results from firm with gcc executables"
18 firm: $(FIRMEXES) $(FIRMASSEMBLERS)
22 gcc/%.result: gcc/%.exe
23 @test -z gcc || mkdir -p gcc
24 gcc/$*.exe >& $@ || true
26 firm/%.result: firm/%.exe
27 @test -z firm || mkdir -p firm
28 firm/$*.exe >& $@ || echo "$*.c" >> doesntrun.txt
30 compare_%.c: gcc/%.exe firm/%.exe gcc/%.result firm/%.result
31 diff -u gcc/$*.result firm/$*.result || echo "$*.c" >> broken.txt
34 @test -z gcc || mkdir -p gcc
35 $(GCC) $(GCC_CFLAGS) $*.c -o $@
38 @test -z firm || mkdir -p firm
39 cd firm ; $(EDG) $(EDG_CFLAGS) ../$*.c || echo "$*.c" >> ../compile_failed.txt
40 mv $*.s firm || echo "" > firm/$*.s
43 $(GCC) firm/$*.s -o $@ || echo "$*.c" >> link_failed.txt