1 --- udev-070/Makefile~flags 2005-09-15 01:19:07 +0200
2 +++ udev-070/Makefile 2005-09-16 11:44:37 +0200
4 # check if compiler option is supported
5 cc-supports = ${shell if $(CC) ${1} -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi;}
7 -CFLAGS += -Wall -fno-builtin -Wchar-subscripts -Wpointer-arith \
8 +override CFLAGS += -Wall -fno-builtin -Wchar-subscripts -Wpointer-arith \
9 -Wstrict-prototypes -Wsign-compare
10 -CFLAGS += $(call cc-supports, -Wdeclaration-after-statement, )
12 -CFLAGS += -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
13 +override CFLAGS += $(call cc-supports, -Wdeclaration-after-statement, )
14 +override CFLAGS += -pipe
15 +override CFLAGS += -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
17 # use '-Os' optimization if available, else use -O2
18 OPTFLAGS := $(call cc-supports, -Os, -O2)
20 # include our local copy of libsysfs
21 -CFLAGS += -I$(PWD)/libsysfs/sysfs \
22 +override CFLAGS += -I$(PWD)/libsysfs/sysfs \
25 ifeq ($(strip $(USE_LOG)),true)
27 + override CFLAGS += -DUSE_LOG
30 # if DEBUG is enabled, then we do not strip or optimize
31 ifeq ($(strip $(DEBUG)),true)
32 - CFLAGS += -O1 -g -DDEBUG
33 + override CFLAGS += -O1 -g -DDEBUG
35 STRIPCMD = /bin/true -Since_we_are_debugging
37 - CFLAGS += $(OPTFLAGS) -fomit-frame-pointer
38 + override CFLAGS += $(OPTFLAGS) -fomit-frame-pointer
40 STRIPCMD = $(STRIP) -s --remove-section=.note --remove-section=.comment
43 ifeq ($(strip $(USE_GCOV)),true)
44 - CFLAGS += -fprofile-arcs -ftest-coverage
45 + override CFLAGS += -fprofile-arcs -ftest-coverage
46 LDFLAGS = -fprofile-arcs
53 - CFLAGS += -Wshadow -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations
54 + override CFLAGS += -Wshadow -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations
55 LDFLAGS += -Wl,-warn-common
58 ifeq ($(strip $(USE_SELINUX)),true)
59 UDEV_OBJS += udev_selinux.o
61 - CFLAGS += -DUSE_SELINUX
62 + override CFLAGS += -DUSE_SELINUX
65 ifeq ($(strip $(USE_STATIC)),true)
66 - CFLAGS += -DUSE_STATIC
67 + override CFLAGS += -DUSE_STATIC