Commit b77b8dd5ea275831dba28bdc12bf8b797e5dc46b

Stefan Reinauer 2006-10-15T18:54:09

clean up build system git-svn-id: svn://coreboot.org/openbios/fcode-utils@98 f158a5a8-5612-0410-a976-696ce0be7e32

diff --git a/Makefile b/Makefile
index 0f641bb..b6c6ae3 100644
--- a/Makefile
+++ b/Makefile
@@ -42,6 +42,8 @@ distclean: clean
 	make -C detok distclean
 	make -C romheaders distclean
 	make -C testsuite distclean
+	find . -name "*.gcda" -exec rm -f \{\} \;
+	find . -name "*.gcno" -exec rm -f \{\} \;
 
 tests: all
 	cp toke/toke testsuite
diff --git a/detok/Makefile b/detok/Makefile
index 3d7b1c7..e7c7c04 100644
--- a/detok/Makefile
+++ b/detok/Makefile
@@ -27,10 +27,19 @@ PROGRAM = detok
 CC      = gcc
 STRIP	= strip
 INCLUDES = -I../shared
-#CFLAGS  = -O2 -g -Wall 
-CFLAGS  = -Os -Wall -Wno-pointer-sign 
+
+# Normal Flags:
+CFLAGS  = -O2 -Wall -Wno-pointer-sign 
 LDFLAGS = 
 
+# Coverage:
+#CFLAGS  := $(CFLAGS) -fprofile-arcs -ftest-coverage
+#LDFLAGS := $(LDFLAGS) -lgcov
+
+# Debugging:
+#CFLAGS := $(CFLAGS) -g
+
+
 OBJS  = addfcodes.o decode.o detok.o dictionary.o pcihdr.o printformats.o \
         stream.o ../shared/classcodes.o
 
diff --git a/testsuite/Makefile b/testsuite/Makefile
index 2ee36a5..7499a2c 100644
--- a/testsuite/Makefile
+++ b/testsuite/Makefile
@@ -4,9 +4,9 @@ all:
 
 
 clean:
-	find . -name "*.DeTok" -exec rm -f \{\} \;
-	find . -name "*.Log" -a ! -name "*..OldTkzr.Log" -exec rm -f \{\} \;
-	find . -name "*.fc" -exec rm -f \{\} \;
+	find . -name "*.DeTok" -a ! -name "*.OldTkzr.DeTok" -exec rm -f \{\} \;
+	find . -name "*.Log" -a ! -name "*.OldTkzr.Log" -exec rm -f \{\} \;
+	find . -name "*.fc" -a ! -name "*.OldTkzr.fc" -exec rm -f \{\} \;
 	find . -name "*.fl" -exec rm -f \{\} \;
 	find . -name "*.RomHdr" -exec rm -f \{\} \;
 	find . -name "*.P" -exec rm -f \{\} \;
diff --git a/testsuite/TokMisc/OneBeer.fc b/testsuite/TokMisc/OneBeer.fc
deleted file mode 100644
index e69de29..0000000
--- a/testsuite/TokMisc/OneBeer.fc
+++ /dev/null
diff --git a/testsuite/TokeCommon/OneBeer.fl b/testsuite/TokeCommon/OneBeer.fl
deleted file mode 100644
index e69de29..0000000
--- a/testsuite/TokeCommon/OneBeer.fl
+++ /dev/null
diff --git a/toke/Makefile b/toke/Makefile
index c58ee20..d151df6 100644
--- a/toke/Makefile
+++ b/toke/Makefile
@@ -28,14 +28,16 @@ CC      = gcc
 STRIP	= strip
 INCLUDES = -I../shared
 
-# No coverage:
-#CFLAGS  = -O2 -g -Wall 
-CFLAGS  = -Os -Wall -Wno-pointer-sign -fno-strict-aliasing -DSYS_IS_GNU_Linux
+# Normal flags
+CFLAGS  = -O2 -Wall -Wno-pointer-sign -fno-strict-aliasing -DSYS_IS_GNU_Linux
 LDFLAGS =
 
 # Coverage:
-#CFLAGS  = -O2 -fprofile-arcs -ftest-coverage -Wall -Wno-pointer-sign -DSYS_IS_GNU_Linux
-#LDFLAGS = -lgcov
+#CFLAGS  := $(CFLAGS) -fprofile-arcs -ftest-coverage
+#LDFLAGS := $(LDFLAGS) -lgcov
+
+# Debugging:
+# CFLAGS  := $(CFLAGS) -g
 
 OBJS  = clflags.o conditl.o devnode.o dictionary.o emit.o errhandler.o     \
         flowcontrol.o macros.o nextfcode.o parselocals.o scanner.o stack.o \