X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=Makefile;h=5edc76f81a85e9ddcb3dc1b7592ee2c0bdf03c4f;hb=3e0f8812f8c824648db7cc6886265ed186685488;hp=48a130491e172292d1c8feb69bc3db82739575e7;hpb=4a924f0a58024258098e03e3a8827acbc26c591e;p=elogind.git diff --git a/Makefile b/Makefile index 48a130491..5edc76f81 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # -VERSION = 076 +VERSION = 079 # set this to make use of syslog USE_LOG = true @@ -106,7 +106,6 @@ GEN_CONFIGS = \ GEN_HEADERS = \ udev_version.h -# override this to make udev look in a different location for it's config files prefix = etcdir = ${prefix}/etc sbindir = ${prefix}/sbin @@ -134,20 +133,15 @@ HOSTCC = gcc STRIP = $(CROSS)strip STRIPCMD = $(STRIP) -s -# 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)"; else echo "$(2)"; fi;} - CFLAGS = -g -Wall -pipe -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 WARNINGS = -Wstrict-prototypes -Wsign-compare -Wshadow \ -Wchar-subscripts -Wmissing-declarations -Wnested-externs \ -Wpointer-arith -Wcast-align -Wsign-compare -Wmissing-prototypes -WARNINGS += $(call cc-supports, -Wdeclaration-after-statement, ) CFLAGS += $(WARNINGS) LDFLAGS = -Wl,-warn-common -# use -Os optimization if available, else use -O2 -OPTFLAGS := $(call cc-supports, -Os, -O2) +OPTFLAGS = -Os CFLAGS += $(OPTFLAGS) # include our local copy of libsysfs @@ -217,7 +211,7 @@ all: $(PROGRAMS) $(MAN_PAGES) .SUFFIXES: # build the objects -%.o: %.c $(GEN_HEADERS) +%.o: %.c $(HOST_PROGS) $(GEN_HEADERS) $(QUIET) $(CC) -c $(CFLAGS) $< -o $@ # "Static Pattern Rule" to build all programs @@ -261,6 +255,7 @@ ccdv: ccdv.c .SILENT: ccdv clean: + - rm -f $(HOST_PROGS) - find . \( -not -type d \) -and \( -name '*~' -o -name '*.[oas]' \) -type f -print0 | xargs -0rt rm -f - find -name "*.gcno" -print0 | xargs -0rt rm -f - find -name "*.gcda" -print0 | xargs -0rt rm -f @@ -378,9 +373,20 @@ test tests: all .PHONY: test tests buildtest: - ./test/simple-build-check.sh + test/simple-build-check.sh .PHONY: buildtest +ChangeLog: Makefile + @ mv $@ $@.tmp + @ echo "Summary of changes from v$(shell printf '%03i' $$(expr $(VERSION) - 1)) to v$(VERSION)" >> $@ + @ echo "============================================" >> $@ + @ echo >> $@ + @ git log --pretty=short $(shell printf '%03i' $$(expr $(VERSION) - 1))..HEAD | git shortlog >> $@ + @ echo >> $@ + @ cat $@ + @ cat $@.tmp >> $@ + @ rm $@.tmp + gcov-all: $(MAKE) clean all STRIPCMD= USE_GCOV=true @echo