X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=Makefile;h=a8f2851cabd2eb68d8c26eaef7be69de13f09590;hp=25e0825247272c7a0fc3ff4fe5231948299fdefd;hb=8365854ccda3d0f36333b699454238cff111e169;hpb=f41951c8407ab39f4c514e8751457857a7fb5722 diff --git a/Makefile b/Makefile index 25e082524..a8f2851ca 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 = 063 ROOT = udev DAEMON = udevd SENDER = udevsend @@ -51,7 +52,6 @@ CONTROL = udevcontrol INFO = udevinfo TESTER = udevtest STARTER = udevstart -VERSION = 060 RELEASE_NAME = $(ROOT)-$(VERSION) LOCAL_CFG_DIR = etc/udev DESTDIR = @@ -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 @@ -413,3 +412,5 @@ uninstall: uninstall-man test: all @ cd test && ./udev-test.pl @ cd test && ./udevstart-test.pl + +tests: test