2 RELEASE_DATE:=16 June 2003
6 # Move the configuration defines to makefile.conf
8 CPPFLAGS=-DVERSION='"$(VERSION)"' -DRELEASE_DATE='"$(RELEASE_DATE)"'
9 CFLAGS=-O -g -Wall $(CPPFLAGS)
10 CPROF_FLAGS=-pg -fprofile-arcs
14 romcc: romcc.c Makefile
15 $(CC) $(CFLAGS) -o $@ $<
17 romcc_pg: romcc.c Makefile
18 $(CC) $(CFLAGS) $(CPROF_FLAGS) -o $@ $<
60 TEST_SRCS:=$(patsubst %, tests/%, $(TESTS))
61 TEST_ASM:=$(patsubst %.c, tests/%.S, $(TESTS))
62 TEST_OBJ:=$(patsubst %.c, tests/%.o, $(TESTS))
63 TEST_ELF:=$(patsubst %.c, tests/%.elf, $(TESTS))
65 $(TEST_ASM): %.S: %.c romcc
66 export ALLOC_CHECK_=2; ./romcc -O -o $@ $< > $*.debug
71 $(TEST_ELF): %.elf: %.o tests/ldscript.ld
72 ld -T tests/ldscript.ld $< -o $@
77 echo "TEST_SRCS=$(TEST_SRCS)"
78 echo "TEST_ASM=$(TEST_ASM)"
79 echo "TEST_OBJ=$(TEST_OBJ)"
80 echo "TEST_ELF=$(TEST_ELF)"
83 rm -f romcc romcc_pg core $(TEST_ASM) $(TEST_OBJ) $(TEST_ELF) tests/*.debug tests/*.debug2 tests/*.gmon.out