1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-23 21:35:11 +03:00

[PATCH] move udevinfo into the main build and clean up the main Makefile a bit.

This commit is contained in:
greg@kroah.com 2004-01-26 18:55:37 -08:00 committed by Greg KH
parent 87171e46cd
commit 869fc2f1ff
3 changed files with 30 additions and 44 deletions

View File

@ -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 \

View File

@ -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

View File

@ -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':