chiark / gitweb /
allow RUN to send the environment to a local socket
[elogind.git] / Makefile
index 25e0825247272c7a0fc3ff4fe5231948299fdefd..c9807de4bc2e61f57924b52e8d574efebf14814c 100644 (file)
--- 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 =      064
 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,48 +102,49 @@ 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         += -Wall -fno-builtin -Wchar-subscripts -Wpointer-arith \
+                  -Wstrict-prototypes -Wsign-compare
+CFLAGS         += $(call cc-supports, -Wdeclaration-after-statement, )
 CFLAGS         += -pipe
-CFLAGS         += -D_GNU_SOURCE
+CFLAGS         += -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
+
+# use '-Os' optimization if available, else use -O2
+OPTFLAGS := $(call cc-supports, -Os, -O2)
 
 HEADERS = \
-       udev.h                  \
-       udev_utils.h            \
-       udev_rules.h            \
-       udev_version.h          \
-       udev_db.h               \
-       udev_sysfs.h            \
-       logging.h               \
-       udev_libc_wrapper.h     \
-       udev_selinux.h          \
+       udev.h                          \
+       udev_utils.h                    \
+       udev_rules.h                    \
+       udev_version.h                  \
+       udev_db.h                       \
+       udev_sysfs.h                    \
+       logging.h                       \
+       udev_libc_wrapper.h             \
+       udev_selinux.h                  \
        list.h
 
 SYSFS_OBJS = \
-       libsysfs/sysfs_class.o  \
-       libsysfs/sysfs_device.o \
-       libsysfs/sysfs_dir.o    \
-       libsysfs/sysfs_driver.o \
-       libsysfs/sysfs_utils.o  \
+       libsysfs/sysfs_class.o          \
+       libsysfs/sysfs_device.o         \
+       libsysfs/sysfs_dir.o            \
+       libsysfs/sysfs_driver.o         \
+       libsysfs/sysfs_utils.o          \
        libsysfs/dlist.o
 
 UDEV_OBJS = \
-       udev_utils.o            \
-       udev_config.o           \
-       udev_add.o              \
-       udev_remove.o           \
-       udev_sysfs.o            \
-       udev_db.o               \
-       udev_rules.o            \
-       udev_rules_parse.o      \
+       udev_utils.o                    \
+       udev_event.o                    \
+       udev_device.o                   \
+       udev_config.o                   \
+       udev_add.o                      \
+       udev_remove.o                   \
+       udev_sysfs.o                    \
+       udev_db.o                       \
+       udev_rules.o                    \
+       udev_rules_parse.o              \
        udev_libc_wrapper.o
 
 OBJS = \
@@ -152,7 +153,7 @@ OBJS = \
 
 SYSFS = $(PWD)/libsysfs/sysfs.a
 
-CFLAGS +=      -I$(PWD)/libsysfs/sysfs \
+CFLAGS +=      -I$(PWD)/libsysfs/sysfs \
                -I$(PWD)/libsysfs
 
 ifeq ($(strip $(USE_LOG)),true)
@@ -165,7 +166,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
@@ -378,8 +379,8 @@ install: install-config install-man all
        $(INSTALL_PROGRAM) -D $(STARTER) $(DESTDIR)$(sbindir)/$(STARTER)
 ifndef DESTDIR
        - killall $(DAEMON)
-       - $(sbindir)/$(DAEMON) --daemon
        - rm -rf $(udevdb)
+       - $(sbindir)/$(DAEMON) --daemon
 endif
        @extras="$(EXTRAS)" ; for target in $$extras ; do \
                echo $$target ; \
@@ -413,3 +414,5 @@ uninstall: uninstall-man
 test: all
        @ cd test && ./udev-test.pl
        @ cd test && ./udevstart-test.pl
+
+tests: test