Skip to content

Commit bef13df

Browse files
Stefan ReinauerStefan Reinauer
authored andcommitted
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 parent 3a7ca6a commit bef13df

4 files changed

Lines changed: 33 additions & 36 deletions

File tree

Makefile

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# This program is part of a free implementation of the IEEE 1275-1994
66
# Standard for Boot (Initialization Configuration) Firmware.
77
#
8-
# Copyright (C) 2006 coresystems GmbH <info@coresystems.de>
8+
# Copyright (C) 2006-2009 coresystems GmbH <info@coresystems.de>
99
#
1010
# This program is free software; you can redistribute it and/or modify
1111
# it under the terms of the GNU General Public License as published by
@@ -24,35 +24,35 @@
2424
VERSION:=$(shell grep ^\#.*TOKE_VERSION < toke/toke.c |cut -f2 -d\" )
2525

2626
all:
27-
make -C toke
28-
make -C detok
29-
make -C romheaders
27+
$(MAKE) -C toke
28+
$(MAKE) -C detok
29+
$(MAKE) -C romheaders
3030

3131
install:
32-
make -C toke install
33-
make -C detok install
34-
make -C romheaders install
32+
$(MAKE) -C toke install
33+
$(MAKE) -C detok install
34+
$(MAKE) -C romheaders install
3535

3636
clean:
37-
make -C toke clean
38-
make -C detok clean
39-
make -C romheaders clean
40-
make -C testsuite clean
37+
$(MAKE) -C toke clean
38+
$(MAKE) -C detok clean
39+
$(MAKE) -C romheaders clean
40+
$(MAKE) -C testsuite clean
4141

4242
distclean: clean
43-
make -C toke distclean
44-
make -C detok distclean
45-
make -C romheaders distclean
46-
make -C testsuite distclean
43+
$(MAKE) -C toke distclean
44+
$(MAKE) -C detok distclean
45+
$(MAKE) -C romheaders distclean
46+
$(MAKE) -C testsuite distclean
4747
find . -name "*.gcda" -exec rm -f \{\} \;
4848
find . -name "*.gcno" -exec rm -f \{\} \;
4949

5050
tests: all
5151
cp toke/toke testsuite
5252
cp detok/detok testsuite
5353
cp romheaders/romheaders testsuite
54-
make -C testsuite all CygTestLogs=`pwd`/testlogs/testlogs-ppc-linux
55-
#make -C testsuite all CygTestLogs=`pwd`/testlogs/testlogs-x86-cygwin
54+
$(MAKE) -C testsuite all CygTestLogs=`pwd`/testlogs/testlogs-ppc-linux
55+
#$(MAKE) -C testsuite all CygTestLogs=`pwd`/testlogs/testlogs-x86-cygwin
5656

5757
# lcov required for html reports
5858
coverage:

detok/Makefile

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# Standard for Boot (Initialization Configuration) Firmware.
77
#
88
# Copyright (C) 2001-2006 Stefan Reinauer <stepan@openbios.org>
9-
# Copyright (C) 2006 coresystems GmbH <info@coresystems.de>
9+
# Copyright (C) 2006-2009 coresystems GmbH <info@coresystems.de>
1010
#
1111
# This program is free software; you can redistribute it and/or modify
1212
# it under the terms of the GNU General Public License as published by
@@ -24,12 +24,12 @@
2424

2525
PROGRAM = detok
2626

27-
CC = gcc
27+
CC ?= gcc
2828
STRIP = strip
2929
INCLUDES = -I../shared
3030

3131
# Normal Flags:
32-
CFLAGS = -O2 -Wall -Wno-pointer-sign
32+
CFLAGS = -O2 -Wall -Wextra
3333
LDFLAGS =
3434

3535
# Coverage:
@@ -47,12 +47,10 @@ all: .dependencies $(PROGRAM)
4747

4848
$(PROGRAM): $(OBJS)
4949
$(CC) -o $(PROGRAM) $(OBJS) $(LDFLAGS)
50-
$(STRIP) -s $(PROGRAM)
50+
$(STRIP) $(PROGRAM)
5151

5252
clean:
5353
rm -f $(OBJS) *~
54-
55-
distclean: clean
5654
rm -f $(PROGRAM) .dependencies
5755

5856
.dependencies: *.c

romheaders/Makefile

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
# This program is part of a free implementation of the IEEE 1275-1994
66
# Standard for Boot (Initialization Configuration) Firmware.
77
#
8-
# Copyright (C) 2002 Stefan Reinauer, <stepan@openbios.net>
8+
# Copyright (C) 2002 Stefan Reinauer, <stepan@openbios.org>
9+
# Copyright (C) 2009 coresystems GmbH <info@coresystems.de>
910
#
1011
# This program is free software; you can redistribute it and/or modify
1112
# it under the terms of the GNU General Public License as published by
@@ -21,8 +22,9 @@
2122
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA, 02110-1301 USA
2223
#
2324

24-
CC = gcc
25-
CFLAGS= -O2 -Wall -W -ansi -I../shared
25+
CC ?= gcc
26+
STRIP = strip
27+
CFLAGS = -O2 -Wall -W -ansi -I../shared
2628

2729
SOURCES = romheaders.c ../shared/classcodes.c
2830

@@ -32,10 +34,9 @@ all: romheaders
3234

3335
romheaders: $(SOURCES)
3436
$(CC) $(CFLAGS) $(SOURCES) -o $@
35-
strip romheaders
37+
$(STRIP) romheaders
3638

3739
clean:
3840
rm -f *~
39-
40-
distclean: clean
4141
rm -f romheaders
42+

toke/Makefile

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# Standard for Boot (Initialization Configuration) Firmware.
77
#
88
# Copyright (C) 2001-2006 Stefan Reinauer <stepan@openbios.org>
9-
# Copyright (C) 2006 coresystems GmbH <info@coresystems.de>
9+
# Copyright (C) 2006-2009 coresystems GmbH <info@coresystems.de>
1010
#
1111
# This program is free software; you can redistribute it and/or modify
1212
# it under the terms of the GNU General Public License as published by
@@ -24,12 +24,12 @@
2424

2525
PROGRAM = toke
2626

27-
CC = gcc
27+
CC ?= gcc
2828
STRIP = strip
2929
INCLUDES = -I../shared
3030

3131
# Normal flags
32-
CFLAGS = -O2 -Wall -Wno-pointer-sign -fno-strict-aliasing
32+
CFLAGS = -O2 -Wall -Wextra
3333
LDFLAGS =
3434

3535
# Coverage:
@@ -48,14 +48,12 @@ all: .dependencies $(PROGRAM)
4848

4949
$(PROGRAM): $(OBJS)
5050
$(CC) -o $(PROGRAM) $(OBJS) $(LDFLAGS)
51-
$(STRIP) -s $(PROGRAM)
51+
$(STRIP) $(PROGRAM)
5252

5353
clean:
5454
rm -f $(OBJS) *~
55-
56-
distclean: clean
5755
rm -f $(PROGRAM) .dependencies
58-
56+
5957
.dependencies: *.c
6058
@$(CC) $(CFLAGS) $(INCLUDES) -MM *.c > .dependencies
6159

0 commit comments

Comments
 (0)