chiark / gitweb /
[PATCH] Add initial SELinux support for udev
[elogind.git] / Makefile
index 8ab9099f4f6271ee3a956d29a369ca6718b8aaf4..b24e147838f6d4613bc942eb84affcc274d167f7 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -73,6 +73,9 @@ udevdir = ${prefix}/udev
 # than the local version of klibc
 #USE_KLIBC = true
 
+# set up PWD so that older versions of make will work with our build.
+PWD = $(shell pwd)
+
 # If you are running a cross compiler, you may want to set this
 # to something more interesting, like "arm-linux-".  If you want
 # to compile vs uClibc, that can be done here as well.
@@ -224,6 +227,14 @@ ifeq ($(USE_DBUS), true)
        OBJS += udev_dbus.o
 endif
 
+# if USE_SELINUX is enabled, then we do not strip or optimize
+ifeq ($(strip $(USE_SELINUX)),true)
+       CFLAGS  += -DUSE_SELINUX
+       OBJS += udev_selinux.o
+       LIB_OBJS += -lselinux
+endif
+
+
 # header files automatically generated
 GEN_HEADERS =  udev_version.h