slightly rework fcode-utils makefiles: - honor $(MAKE) for those invoking with gmake instead of make - wipe overzealous make distclean - drop -s from strip arguments Signed-off-by: Stefan Reinauer <stepan@coresystems.de> git-svn-id: svn://coreboot.org/openbios/trunk/fcode-utils-devel@636 f158a5a8-5612-0410-a976-696ce0be7e32
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191
diff --git a/Makefile b/Makefile
index c9d4c41..bd97123 100644
--- a/Makefile
+++ b/Makefile
@@ -5,7 +5,7 @@
# This program is part of a free implementation of the IEEE 1275-1994
# Standard for Boot (Initialization Configuration) Firmware.
#
-# Copyright (C) 2006 coresystems GmbH <info@coresystems.de>
+# Copyright (C) 2006-2009 coresystems GmbH <info@coresystems.de>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -24,26 +24,26 @@
VERSION:=$(shell grep ^\#.*TOKE_VERSION < toke/toke.c |cut -f2 -d\" )
all:
- make -C toke
- make -C detok
- make -C romheaders
+ $(MAKE) -C toke
+ $(MAKE) -C detok
+ $(MAKE) -C romheaders
install:
- make -C toke install
- make -C detok install
- make -C romheaders install
+ $(MAKE) -C toke install
+ $(MAKE) -C detok install
+ $(MAKE) -C romheaders install
clean:
- make -C toke clean
- make -C detok clean
- make -C romheaders clean
- make -C testsuite clean
+ $(MAKE) -C toke clean
+ $(MAKE) -C detok clean
+ $(MAKE) -C romheaders clean
+ $(MAKE) -C testsuite clean
distclean: clean
- make -C toke distclean
- make -C detok distclean
- make -C romheaders distclean
- make -C testsuite distclean
+ $(MAKE) -C toke distclean
+ $(MAKE) -C detok distclean
+ $(MAKE) -C romheaders distclean
+ $(MAKE) -C testsuite distclean
find . -name "*.gcda" -exec rm -f \{\} \;
find . -name "*.gcno" -exec rm -f \{\} \;
@@ -51,8 +51,8 @@ tests: all
cp toke/toke testsuite
cp detok/detok testsuite
cp romheaders/romheaders testsuite
- make -C testsuite all CygTestLogs=`pwd`/testlogs/testlogs-ppc-linux
- #make -C testsuite all CygTestLogs=`pwd`/testlogs/testlogs-x86-cygwin
+ $(MAKE) -C testsuite all CygTestLogs=`pwd`/testlogs/testlogs-ppc-linux
+ #$(MAKE) -C testsuite all CygTestLogs=`pwd`/testlogs/testlogs-x86-cygwin
# lcov required for html reports
coverage:
diff --git a/detok/Makefile b/detok/Makefile
index e7c7c04..897e0eb 100644
--- a/detok/Makefile
+++ b/detok/Makefile
@@ -6,7 +6,7 @@
# Standard for Boot (Initialization Configuration) Firmware.
#
# Copyright (C) 2001-2006 Stefan Reinauer <stepan@openbios.org>
-# Copyright (C) 2006 coresystems GmbH <info@coresystems.de>
+# Copyright (C) 2006-2009 coresystems GmbH <info@coresystems.de>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -24,12 +24,12 @@
PROGRAM = detok
-CC = gcc
+CC ?= gcc
STRIP = strip
INCLUDES = -I../shared
# Normal Flags:
-CFLAGS = -O2 -Wall -Wno-pointer-sign
+CFLAGS = -O2 -Wall -Wextra
LDFLAGS =
# Coverage:
@@ -47,12 +47,10 @@ all: .dependencies $(PROGRAM)
$(PROGRAM): $(OBJS)
$(CC) -o $(PROGRAM) $(OBJS) $(LDFLAGS)
- $(STRIP) -s $(PROGRAM)
+ $(STRIP) $(PROGRAM)
clean:
rm -f $(OBJS) *~
-
-distclean: clean
rm -f $(PROGRAM) .dependencies
.dependencies: *.c
diff --git a/romheaders/Makefile b/romheaders/Makefile
index 3794aeb..0ab3332 100644
--- a/romheaders/Makefile
+++ b/romheaders/Makefile
@@ -5,7 +5,8 @@
# This program is part of a free implementation of the IEEE 1275-1994
# Standard for Boot (Initialization Configuration) Firmware.
#
-# Copyright (C) 2002 Stefan Reinauer, <stepan@openbios.net>
+# Copyright (C) 2002 Stefan Reinauer, <stepan@openbios.org>
+# Copyright (C) 2009 coresystems GmbH <info@coresystems.de>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,8 +22,9 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA, 02110-1301 USA
#
-CC = gcc
-CFLAGS= -O2 -Wall -W -ansi -I../shared
+CC ?= gcc
+STRIP = strip
+CFLAGS = -O2 -Wall -W -ansi -I../shared
SOURCES = romheaders.c ../shared/classcodes.c
@@ -32,10 +34,9 @@ all: romheaders
romheaders: $(SOURCES)
$(CC) $(CFLAGS) $(SOURCES) -o $@
- strip romheaders
+ $(STRIP) romheaders
clean:
rm -f *~
-
-distclean: clean
rm -f romheaders
+
diff --git a/toke/Makefile b/toke/Makefile
index 14ae095..82e7ab2 100644
--- a/toke/Makefile
+++ b/toke/Makefile
@@ -6,7 +6,7 @@
# Standard for Boot (Initialization Configuration) Firmware.
#
# Copyright (C) 2001-2006 Stefan Reinauer <stepan@openbios.org>
-# Copyright (C) 2006 coresystems GmbH <info@coresystems.de>
+# Copyright (C) 2006-2009 coresystems GmbH <info@coresystems.de>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -24,12 +24,12 @@
PROGRAM = toke
-CC = gcc
+CC ?= gcc
STRIP = strip
INCLUDES = -I../shared
# Normal flags
-CFLAGS = -O2 -Wall -Wno-pointer-sign -fno-strict-aliasing
+CFLAGS = -O2 -Wall -Wextra
LDFLAGS =
# Coverage:
@@ -48,14 +48,12 @@ all: .dependencies $(PROGRAM)
$(PROGRAM): $(OBJS)
$(CC) -o $(PROGRAM) $(OBJS) $(LDFLAGS)
- $(STRIP) -s $(PROGRAM)
+ $(STRIP) $(PROGRAM)
clean:
rm -f $(OBJS) *~
-
-distclean: clean
rm -f $(PROGRAM) .dependencies
-
+
.dependencies: *.c
@$(CC) $(CFLAGS) $(INCLUDES) -MM *.c > .dependencies