comparison Makefile @ 45:e60d48d30ef0

Make some of gcc 4.1's dumber warnings go away.
author Rob Landley <rob@landley.net>
date Sun, 31 Dec 2006 19:09:42 -0500
parents 72ff42c01d92
children 6b933d9c54ac
comparison
equal deleted inserted replaced
44:e74aa8b8660a 45:e60d48d30ef0
1 # Makefile for toybox. 1 # Makefile for toybox.
2 # Copyright 2006 Rob Landley <rob@landley.net> 2 # Copyright 2006 Rob Landley <rob@landley.net>
3 3
4 CFLAGS = -Wall -Wundef -Os 4 CFLAGS = -Wall -Wundef -Wno-char-subscripts -Os
5 CC = $(CROSS_COMPILE)gcc $(CFLAGS) -funsigned-char 5 CC = $(CROSS_COMPILE)gcc $(CFLAGS) -funsigned-char
6 STRIP = $(CROSS_COMPILE)strip 6 STRIP = $(CROSS_COMPILE)strip
7 HOST_CC = gcc $(CFLAGS) -funsigned-char 7 HOST_CC = gcc $(CFLAGS) -funsigned-char
8 8
9 all: toybox 9 all: toybox
36 # Actual build 36 # Actual build
37 37
38 toyfiles = main.c toys/*.c lib/*.c 38 toyfiles = main.c toys/*.c lib/*.c
39 toybox_unstripped: gen_config.h $(toyfiles) toys/toylist.h lib/lib.h toys.h 39 toybox_unstripped: gen_config.h $(toyfiles) toys/toylist.h lib/lib.h toys.h
40 $(CC) $(CFLAGS) -I . $(toyfiles) -o toybox_unstripped \ 40 $(CC) $(CFLAGS) -I . $(toyfiles) -o toybox_unstripped \
41 -ffunction-sections -fdata-sections -Wl,--gc-sections 41 -ffunction-sections -fdata-sections -Wl,--gc-sections \
42 2>&1 | sed -n -e '/may be used uninitialized/{s/.*/\n/;h;b};1{x;b};: print;x;/\n/b thing;p;: thing;${x;p}' >&2
42 43
43 toybox: toybox_unstripped 44 toybox: toybox_unstripped
44 $(STRIP) toybox_unstripped -o toybox 45 $(STRIP) toybox_unstripped -o toybox
45 clean:: 46 clean::
46 rm -f toybox toybox_old toybox_unstripped gen_config.h 47 rm -f toybox toybox_old toybox_unstripped gen_config.h