- A new test case for romcc
[coreboot.git] / util / romcc / Makefile
index 76dbb5e2fbe4b1d955922279c7eae8881b2ac792..9722ca3fc7c7c375a2f1d1b842659d7bbc7f2e98 100644 (file)
@@ -1,5 +1,5 @@
-VERSION:=0.21
-RELEASE_DATE:=7 April 2003
+VERSION:=0.28
+RELEASE_DATE:=16 June 2003
 PACKAGE:=romcc
 
 
@@ -7,12 +7,16 @@ PACKAGE:=romcc
 CC=gcc
 CPPFLAGS=-DVERSION='"$(VERSION)"' -DRELEASE_DATE='"$(RELEASE_DATE)"'
 CFLAGS=-O -g -Wall $(CPPFLAGS)
+CPROF_FLAGS=-pg -fprofile-arcs
 
 all: romcc test
 
 romcc: romcc.c Makefile
        $(CC) $(CFLAGS) -o $@ $<
 
+romcc_pg: romcc.c Makefile
+       $(CC) $(CFLAGS) $(CPROF_FLAGS) -o $@ $<
+
 TESTS=\
        hello_world.c \
        simple_test.c \
@@ -30,8 +34,28 @@ TESTS=\
        simple_test13.c \
        simple_test14.c \
        simple_test15.c \
+       simple_test16.c \
+       simple_test17.c \
+       simple_test18.c \
+       simple_test19.c \
+       simple_test20.c \
+       simple_test21.c \
+       simple_test22.c \
+       simple_test23.c \
+       simple_test24.c \
+       simple_test25.c \
+       simple_test26.c \
+       simple_test27.c \
+       simple_test28.c \
+       simple_test29.c \
+       simple_test30.c \
+       simple_test31.c \
+       simple_test32.c \
+       simple_test33.c \
        raminit_test.c \
-       raminit_test2.c
+       raminit_test2.c \
+       raminit_test3.c \
+       raminit_test4.c
 
 TEST_SRCS:=$(patsubst %, tests/%, $(TESTS))
 TEST_ASM:=$(patsubst %.c, tests/%.S, $(TESTS))
@@ -39,13 +63,13 @@ TEST_OBJ:=$(patsubst %.c, tests/%.o, $(TESTS))
 TEST_ELF:=$(patsubst %.c, tests/%.elf, $(TESTS))
 
 $(TEST_ASM): %.S: %.c romcc
-       export ALLOC_CHECK_=2; ./romcc -O $< > $@
+       export ALLOC_CHECK_=2; ./romcc -O -o $@ $< > $*.debug
 
 $(TEST_OBJ): %.o: %.S
        as $< -o $@
 
-$(TEST_ELF): %.elf: %.o
-       ld -Ttext 0x1000 $< -o $@
+$(TEST_ELF): %.elf: %.o tests/ldscript.ld
+       ld -T tests/ldscript.ld $< -o $@
 
 test: $(TEST_ELF)
 
@@ -56,5 +80,5 @@ echo:
        echo "TEST_ELF=$(TEST_ELF)"
 
 clean:
-       rm -f romcc core $(TEST_ASM) $(TEST_OBJ) $(TEST_ELF)
+       rm -f romcc romcc_pg core $(TEST_ASM) $(TEST_OBJ) $(TEST_ELF) tests/*.debug tests/*.debug2 tests/*.gmon.out