summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgreg@kroah.com <greg@kroah.com>2004-01-26 18:55:37 -0800
committerGreg KH <gregkh@suse.de>2005-04-26 21:13:18 -0700
commit869fc2f1ff73209b9aa5dc7d582eba39feaf6f86 (patch)
tree39b044ab381b07bc0a72870081813794f2e94fad
parent87171e46cd9d179e0bb5549c4d74769a1be86e64 (diff)
[PATCH] move udevinfo into the main build and clean up the main Makefile a bit.
-rw-r--r--Makefile34
-rw-r--r--extras/udevinfo/Makefile28
-rw-r--r--udevinfo.c (renamed from extras/udevinfo/udevinfo.c)12
3 files changed, 30 insertions, 44 deletions
diff --git a/Makefile b/Makefile
index 5c265492b4..20c739e404 100644
--- a/Makefile
+++ b/Makefile
@@ -33,6 +33,7 @@ USE_DBUS = false
ROOT = udev
DAEMON = udevd
SENDER = udevsend
+HELPERS = udevinfo
VERSION = 014_bk
INSTALL_DIR = /usr/local/bin
RELEASE_NAME = $(ROOT)-$(VERSION)
@@ -164,7 +165,7 @@ endif
CFLAGS += -I$(PWD)/libsysfs
-all: $(ROOT) $(UDEVD)
+all: $(ROOT) $(UDEVD) $(HELPERS)
@extras="$(EXTRAS)" ; for target in $$extras ; do \
echo $$target ; \
$(MAKE) prefix=$(prefix) LD="$(LD)" SYSFS="$(SYSFS)" \
@@ -189,8 +190,7 @@ SYSFS = $(PWD)/libsysfs/sysfs_bus.o \
$(PWD)/libsysfs/sysfs_utils.o \
$(PWD)/libsysfs/dlist.o
-OBJS = udev.o \
- udev_config.o \
+OBJS = udev_config.o \
udev-add.o \
udev-remove.o \
udevdb.o \
@@ -200,6 +200,16 @@ OBJS = udev.o \
$(SYSFS) \
$(TDB)
+HEADERS = $(GEN_HEADERS) \
+ udev.h \
+ namedev.h \
+ udev_version.h \
+ udev_dbus.h \
+ udevdb.h \
+ klibc_fixups.h \
+ logging.h \
+ list.h
+
ifeq ($(strip $(USE_KLIBC)),true)
OBJS += klibc_fixups.o
endif
@@ -234,17 +244,21 @@ $(LOCAL_CFG_DIR)/udev.conf:
$(OBJS): $(GEN_HEADERS)
-$(ROOT): $(OBJS) udev.h namedev.h udev_version.h udev_dbus.h udevdb.h klibc_fixups.h logging.h list.h
- $(LD) $(LDFLAGS) -o $(ROOT) $(CRT0) $(OBJS) $(LIB_OBJS) $(ARCH_LIB_OBJS)
- $(STRIPCMD) $(ROOT)
+$(ROOT): udev.o $(OBJS) $(HEADERS)
+ $(LD) $(LDFLAGS) -o $@ $(CRT0) udev.o $(OBJS) $(LIB_OBJS) $(ARCH_LIB_OBJS)
+ $(STRIPCMD) $@
+
+$(HELPERS): udevinfo.o $(OBJS) $(HEADERS)
+ $(LD) $(LDFLAGS) -o $@ $(CRT0) udevinfo.o $(OBJS) $(LIB_OBJS) $(ARCH_LIB_OBJS)
+ $(STRIPCMD) $@
$(DAEMON): udevd.h udevd.o udevd.o logging.o
- $(LD) $(LDFLAGS) -o $(DAEMON) $(CRT0) udevd.o logging.o $(LIB_OBJS) $(ARCH_LIB_OBJS)
- $(STRIPCMD) $(ROOT)
+ $(LD) $(LDFLAGS) -o $@ $(CRT0) udevd.o logging.o $(LIB_OBJS) $(ARCH_LIB_OBJS)
+ $(STRIPCMD) $@
$(SENDER): udevd.h udevsend.o udevd.o logging.o
- $(LD) $(LDFLAGS) -o $(SENDER) $(CRT0) udevsend.o logging.o $(LIB_OBJS) $(ARCH_LIB_OBJS)
- $(STRIPCMD) $(ROOT)
+ $(LD) $(LDFLAGS) -o $@ $(CRT0) udevsend.o logging.o $(LIB_OBJS) $(ARCH_LIB_OBJS)
+ $(STRIPCMD) $@
clean:
-find . \( -not -type d \) -and \( -name '*~' -o -name '*.[oas]' \) -type f -print \
diff --git a/extras/udevinfo/Makefile b/extras/udevinfo/Makefile
deleted file mode 100644
index b740b25331..0000000000
--- a/extras/udevinfo/Makefile
+++ /dev/null
@@ -1,28 +0,0 @@
-PROG=udevinfo
-OBJS= ../../udev_config.o \
- ../../udev-add.o \
- ../../udev-remove.o \
- ../../udevdb.o \
- ../../logging.o \
- ../../namedev.o \
- ../../namedev_parse.o \
- ../../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 \
- ../../tdb/tdb.o \
- ../../tdb/spinlock.o \
-
-all: $(PROG)
-
-$(PROG): $(PROG).o
- $(LD) $(LDFLAGS) -o $(PROG) $(PROG).o $(OBJS) -lc
-
-clean:
- rm -f $(PROG) $(OBJS) $(PROG).o
-
-me:
- cd ../..; make EXTRAS=extras/udevinfo
diff --git a/extras/udevinfo/udevinfo.c b/udevinfo.c
index 3f03901f49..a2f5601b7c 100644
--- a/extras/udevinfo/udevinfo.c
+++ b/udevinfo.c
@@ -27,11 +27,11 @@
#include <unistd.h>
#include <errno.h>
-#include "../../udev.h"
-#include "../../udev_version.h"
-#include "../../logging.h"
-#include "../../udevdb.h"
-#include "../../libsysfs/libsysfs.h"
+#include "udev.h"
+#include "udev_version.h"
+#include "logging.h"
+#include "udevdb.h"
+#include "libsysfs/libsysfs.h"
# define SYSFS_VALUE_MAX 200
@@ -268,7 +268,7 @@ static int process_options(void)
exit(0);
case 'V':
- printf("udev, version %s\n", UDEV_VERSION);
+ printf("udevinfo, version %s\n", UDEV_VERSION);
exit(0);
case 'h':