X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=Makefile;h=48ecbd742864b4aafce8fde24d665f0eacebe96e;hp=32e057b1cb9c12a9c52c8384d2cccf440e90b3cd;hb=face198a5f21027fefe796dc01e19e349a2d36ce;hpb=6bf0ffe8fd312c1e6549cb1721d7a7efeee77185 diff --git a/Makefile b/Makefile index 32e057b1c..48ecbd742 100644 --- a/Makefile +++ b/Makefile @@ -41,6 +41,7 @@ EXTRAS= # make the build silent. Set this to something else to make it noisy again. V=false +VERSION = 062 ROOT = udev DAEMON = udevd SENDER = udevsend @@ -51,7 +52,6 @@ CONTROL = udevcontrol INFO = udevinfo TESTER = udevtest STARTER = udevstart -VERSION = 058 RELEASE_NAME = $(ROOT)-$(VERSION) LOCAL_CFG_DIR = etc/udev DESTDIR = @@ -73,7 +73,7 @@ INSTALL_DATA = ${INSTALL} -m 644 INSTALL_SCRIPT = ${INSTALL_PROGRAM} # place to put our device nodes -udevdir = ${prefix}/udev +udevdir = /dev udevdb = ${udevdir}/.udevdb # set up PWD so that older versions of make will work with our build. @@ -102,19 +102,18 @@ GCCINCDIR := ${shell LC_ALL=C $(CC) -print-search-dirs | sed -ne "s/install: \(. # code taken from uClibc to determine the libgcc.a filename GCC_LIB := $(shell $(CC) -print-libgcc-file-name ) -# use '-Os' optimization if available, else use -O2 -OPTIMIZATION := ${shell if $(CC) -Os -S -o /dev/null -xc /dev/null >/dev/null 2>&1; \ - then echo "-Os"; else echo "-O2" ; fi} - # check if compiler option is supported -cc-supports = ${shell if $(CC) ${1} -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo "$(1)"; fi;} +cc-supports = ${shell if $(CC) ${1} -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi;} CFLAGS += -Wall -fno-builtin -Wchar-subscripts -Wpointer-arith -Wstrict-prototypes -Wsign-compare -CFLAGS += $(call cc-supports,-Wno-pointer-sign) -CFLAGS += $(call cc-supports,-Wdeclaration-after-statement) +CFLAGS += $(call cc-supports, -Wno-pointer-sign, ) +CFLAGS += $(call cc-supports, -Wdeclaration-after-statement, ) CFLAGS += -pipe CFLAGS += -D_GNU_SOURCE +# use '-Os' optimization if available, else use -O2 +OPTFLAGS := $(call cc-supports, -Os, -O2) + HEADERS = \ udev.h \ udev_utils.h \ @@ -165,7 +164,7 @@ ifeq ($(strip $(DEBUG)),true) LDFLAGS += -Wl STRIPCMD = /bin/true -Since_we_are_debugging else - CFLAGS += $(OPTIMIZATION) -fomit-frame-pointer + CFLAGS += $(OPTFLAGS) -fomit-frame-pointer LDFLAGS += -s -Wl STRIPCMD = $(STRIP) -s --remove-section=.note --remove-section=.comment endif @@ -174,7 +173,7 @@ endif # link udev against it statically. Otherwise, use glibc and link dynamically. ifeq ($(strip $(USE_KLIBC)),true) KLIBC_INSTALL = $(PWD)/klibc/.install - KLCC = $(KLIBC_INSTALL)/bin/klcc + KLCC = $(KLIBC_INSTALL)/bin/$(CROSS)klcc CC = $(KLCC) LD = $(KLCC) else