1 Index: hotplug-ng-001/Makefile
2 ===================================================================
3 --- hotplug-ng-001.orig/Makefile 2005-02-10 17:40:02.000000000 -0600
4 +++ hotplug-ng-001/Makefile 2005-02-17 11:22:09.000000000 -0600
6 then echo "-Os"; else echo "-O2" ; fi}
8 # add -Wredundant-decls when libsysfs gets cleaned up
14 +rCFLAGS = -D_GNU_SOURCE
16 ifeq ($(strip $(USE_LOG)),true)
21 # if DEBUG is enabled, then we do not strip or optimize
22 ifeq ($(strip $(DEBUG)),true)
23 - CFLAGS += -O1 -g -DDEBUG -D_GNU_SOURCE
24 + CFLAGS += -O1 -g -DDEBUG
25 LDFLAGS += -Wl,-warn-common
26 STRIPCMD = /bin/true -Since_we_are_debugging
28 - CFLAGS += $(OPTIMIZATION) -fomit-frame-pointer -D_GNU_SOURCE
29 + CFLAGS += $(OPTIMIZATION) -fomit-frame-pointer
30 LDFLAGS += -s -Wl,-warn-common
31 STRIPCMD = $(STRIP) -s --remove-section=.note --remove-section=.comment
34 +CFLAGS += $(WARNINGS)
36 # If we are using our version of klibc, then we need to build, link it, and then
37 # link udev against it statically.
38 # Otherwise, use glibc and link dynamically.
41 CRT0 = $(KLIBC_DIR)/crt0.o
42 LIBC = $(ARCH_LIB_OBJS) $(LIB_OBJS) $(CRT0)
43 - CFLAGS += $(WARNINGS) -nostdinc \
45 + CFLAGS += $(OPTFLAGS)
46 + rCFLAGS += -nostdinc \
47 -D__KLIBC__ -fno-builtin-printf \
48 -I$(KLIBC_FIXUPS_DIR) \
49 -include $(KLIBC_FIXUPS_DIR)/klibc_fixups.h \
51 WARNINGS += -Wshadow -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations
54 - CFLAGS += $(WARNINGS) -I$(GCCINCDIR)
59 ifeq ($(strip $(USE_SELINUX)),true)
60 - CFLAGS += -DUSE_SELINUX
61 + rCFLAGS += -DUSE_SELINUX
65 -CFLAGS += -I$(PWD)/libsysfs/sysfs \
66 +rCFLAGS += -I$(PWD)/libsysfs/sysfs \
69 all: $(ROOT) $(MODULE_ALL) $(GEN_CONFIGS)
71 @if [ ! -r klibc/linux ]; then \
72 ln -f -s $(KERNEL_DIR) klibc/linux; \
74 - $(MAKE) -C klibc SUBDIRS=klibc
75 + $(MAKE) -C klibc CFLAGS="$(rCFLAGS) $(CFLAGS)" SUBDIRS=klibc
77 SYSFS = $(PWD)/libsysfs/sysfs_bus.o \
78 $(PWD)/libsysfs/sysfs_class.o \
81 # $(CC) $(CFLAGS) $(DEFS) $(CPPFLAGS) -c -o $@ $<
83 - $(QUIET) $(CC) $(CFLAGS) -c -o $@ $<
84 + $(QUIET) $(CC) $(rCFLAGS) $(CFLAGS) -c -o $@ $<