]> err.no Git - systemd/commitdiff
[PATCH] Makefile: cleanup conditional config option sections
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>
Sat, 5 Feb 2005 01:43:16 +0000 (02:43 +0100)
committerGreg KH <gregkh@suse.de>
Wed, 27 Apr 2005 06:24:19 +0000 (23:24 -0700)
Makefile

index 47516b3e371408048f22882946360937976e7c90..052e41acc3f87deea2e0b81a6cdb42eb31fe5796 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -113,6 +113,47 @@ WARNINGS := -Wall
 
 CFLAGS := -pipe
 
+HEADERS = \
+       udev.h          \
+       udev_utils.h    \
+       namedev.h       \
+       udev_version.h  \
+       udev_db.h       \
+       udev_sysfs.h    \
+       logging.h       \
+       udev_selinux.h  \
+       list.h
+
+SYSFS_OBJS = \
+       libsysfs/sysfs_bus.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_start.o            \
+       udev_sysfs.o            \
+       udev_db.o               \
+       udev_multiplex.o        \
+       namedev.o               \
+       namedev_parse.o
+
+OBJS = \
+       udev.a                  \
+       libsysfs/sysfs.a
+
+SYSFS = $(PWD)/libsysfs/sysfs.a
+
+CFLAGS +=      -I$(PWD)/libsysfs/sysfs \
+               -I$(PWD)/libsysfs
+
 ifeq ($(strip $(USE_LOG)),true)
        CFLAGS  += -DLOG
 endif
@@ -129,8 +170,7 @@ else
 endif
 
 # If we are using our version of klibc, then we need to build, link it, and then
-# link udev against it statically.
-# Otherwise, use glibc and link dynamically.
+# link udev against it statically. Otherwise, use glibc and link dynamically.
 ifeq ($(strip $(USE_KLIBC)),true)
        KLIBC_FIXUPS_DIR= $(PWD)/klibc_fixups
        KLIBC_BASE      = $(PWD)/klibc
@@ -156,6 +196,16 @@ ifeq ($(strip $(USE_KLIBC)),true)
                -I$(LINUX_INCLUDE_DIR)
        LIB_OBJS =
        LDFLAGS = --static --nostdlib -nostartfiles -nodefaultlibs
+
+       HEADERS += \
+               klibc_fixups/klibc_fixups.h     \
+               klibc_fixups/mntent.h           \
+               klibc_fixups/pwd.h
+
+       KLIBC_FIXUP_OBJS = \
+               klibc_fixups/klibc_fixups.o
+
+       OBJS += klibc_fixups/klibc_fixups.a
 else
        WARNINGS += -Wshadow -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations
        CRT0 =
@@ -166,12 +216,18 @@ else
 endif
 
 ifeq ($(strip $(USE_SELINUX)),true)
-       CFLAGS += -DUSE_SELINUX
+       UDEV_OBJS += udev_selinux.o
        LIB_OBJS += -lselinux
+       CFLAGS += -DUSE_SELINUX
 endif
 
-CFLAGS +=      -I$(PWD)/libsysfs/sysfs \
-               -I$(PWD)/libsysfs
+ifeq ($(strip $(V)),false)
+       QUIET=@$(PWD)/ccdv
+       HOST_PROGS=ccdv
+else
+       QUIET=
+       HOST_PROGS=
+endif
 
 # config files automatically generated
 GEN_CONFIGS =  $(LOCAL_CFG_DIR)/udev.conf
@@ -195,69 +251,6 @@ $(CRT0):
        fi
        $(MAKE) -C klibc SUBDIRS=klibc TESTS=
 
-HEADERS = \
-       udev.h          \
-       udev_utils.h    \
-       namedev.h       \
-       udev_version.h  \
-       udev_db.h       \
-       udev_sysfs.h    \
-       logging.h       \
-       udev_selinux.h  \
-       list.h
-
-SYSFS_OBJS = \
-       libsysfs/sysfs_bus.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_start.o            \
-       udev_sysfs.o            \
-       udev_db.o               \
-       udev_multiplex.o        \
-       namedev.o               \
-       namedev_parse.o
-
-OBJS = \
-       udev.a  \
-       libsysfs/sysfs.a
-
-SYSFS = $(PWD)/libsysfs/sysfs.a
-
-ifeq ($(strip $(USE_KLIBC)),true)
-       HEADERS += \
-               klibc_fixups/klibc_fixups.h     \
-               klibc_fixups/mntent.h           \
-               klibc_fixups/pwd.h
-
-       KLIBC_FIXUP_OBJS = \
-               klibc_fixups/klibc_fixups.o
-
-       OBJS += klibc_fixups/klibc_fixups.a
-endif
-
-ifeq ($(strip $(USE_SELINUX)),true)
-       UDEV_OBJS += udev_selinux.o
-       LIB_OBJS += -lselinux
-endif
-
-ifeq ($(strip $(V)),false)
-       QUIET=@$(PWD)/ccdv
-       HOST_PROGS=ccdv
-else
-       QUIET=
-       HOST_PROGS=
-endif
-
 udev.a: $(UDEV_OBJS)
        rm -f $@
        $(QUIET) $(AR) cq $@ $(UDEV_OBJS)