From: kay.sievers@vrfy.org Date: Sat, 5 Feb 2005 01:43:16 +0000 (+0100) Subject: [PATCH] Makefile: cleanup conditional config option sections X-Git-Tag: 052~22 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=045b1f0f7a7af2182e7109f472d873f1cc0c5e4b;p=systemd [PATCH] Makefile: cleanup conditional config option sections --- diff --git a/Makefile b/Makefile index 47516b3e..052e41ac 100644 --- 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)