- @echo \#define UDEV_VERSION \"$(VERSION)\" > $@
- @echo \#define UDEV_ROOT \"$(udevdir)/\" >> $@
- @echo \#define UDEV_DB \"$(udevdir)/\.udev.tdb\" >> $@
- @echo \#define UDEV_CONFIG_DIR \"$(configdir)\" >> $@
- @echo \#define UDEV_CONFIG_FILE \"$(configdir)\udev.conf\" >> $@
- @echo \#define UDEV_RULES_FILE \"$(configdir)\udev.rules\" >> $@
- @echo \#define UDEV_PERMISSION_FILE \"$(configdir)\udev.permissions\" >> $@
- @echo \#define UDEV_LOG_DEFAULT \"yes\" >> $@
- @echo \#define UDEV_BIN \"$(DESTDIR)$(sbindir)/udev\" >> $@
- @echo \#define UDEVD_BIN \"$(DESTDIR)$(sbindir)/udevd\" >> $@
-
-# config files automatically generated
-GEN_CONFIGS = $(LOCAL_CFG_DIR)/udev.conf
-
-# Rules on how to create the generated config files
-$(LOCAL_CFG_DIR)/udev.conf:
- sed -e "s:@udevdir@:$(udevdir):" < $(LOCAL_CFG_DIR)/udev.conf.in > $@
-
-
-$(OBJS): $(GEN_HEADERS)
-$(ROOT).o: $(GEN_HEADERS)
-$(TESTER).o: $(GEN_HEADERS)
-$(INFO).o: $(GEN_HEADERS)
-$(DAEMON).o: $(GEN_HEADERS)
-$(SENDER).o: $(GEN_HEADERS)
-$(STARTER).o: $(GEN_HEADERS)
-
-$(ROOT): $(ROOT).o $(OBJS) $(HEADERS) $(LIBC)
- $(LD) $(LDFLAGS) -o $@ $(CRT0) udev.o $(OBJS) $(LIB_OBJS) $(ARCH_LIB_OBJS)
- $(STRIPCMD) $@
-
-$(TESTER): $(TESTER).o $(OBJS) $(HEADERS) $(LIBC)
- $(LD) $(LDFLAGS) -o $@ $(CRT0) udevtest.o $(OBJS) $(LIB_OBJS) $(ARCH_LIB_OBJS)
- $(STRIPCMD) $@
-
-$(INFO): $(INFO).o $(OBJS) $(HEADERS) $(LIBC)
- $(LD) $(LDFLAGS) -o $@ $(CRT0) udevinfo.o udev_lib.o udev_config.o udevdb.o $(SYSFS) $(TDB) $(LIB_OBJS) $(ARCH_LIB_OBJS)
- $(STRIPCMD) $@
-
-$(DAEMON): $(DAEMON).o udevd.h $(LIBC)
- $(LD) $(LDFLAGS) -o $@ $(CRT0) udevd.o $(LIB_OBJS) $(ARCH_LIB_OBJS)
- $(STRIPCMD) $@
-
-$(SENDER): $(SENDER).o udevd.h $(LIBC)
- $(LD) $(LDFLAGS) -o $@ $(CRT0) udevsend.o udev_lib.o $(LIB_OBJS) $(ARCH_LIB_OBJS)
- $(STRIPCMD) $@
-
-$(STARTER): $(STARTER).o $(HEADERS) $(LIBC)
- $(LD) $(LDFLAGS) -o $@ $(CRT0) udevstart.o $(LIB_OBJS) $(ARCH_LIB_OBJS)
- $(STRIPCMD) $@
-
-$(RULER): $(RULER).o $(OBJS) $(HEADERS) $(LIBC)
- $(LD) $(LDFLAGS) -o $@ $(CRT0) udevruler.o udev_lib.o udev_config.o udevdb.o $(SYSFS) $(TDB) $(LIB_OBJS) $(ARCH_LIB_OBJS) -lnewt
- $(STRIPCMD) $@
+ @echo "Creating udev_version.h"
+ @echo \#define UDEV_VERSION \"$(VERSION)\" > $@
+ @echo \#define UDEV_ROOT \"$(udevdir)\" >> $@
+ @echo \#define UDEV_DB \"$(udevdb)\" >> $@
+ @echo \#define UDEV_CONFIG_DIR \"$(configdir)\" >> $@
+ @echo \#define UDEV_CONFIG_FILE \"$(configdir)/udev.conf\" >> $@
+ @echo \#define UDEV_RULES_FILE \"$(configdir)/rules.d\" >> $@
+ @echo \#define UDEV_BIN \"$(sbindir)/udev\" >> $@
+ @echo \#define UDEVD_BIN \"$(sbindir)/udevd\" >> $@
+
+# man pages
+%.8: docs/%.xml
+ xmlto man $?
+.PRECIOUS: %.8
+
+ccdv: ccdv.c
+ @$(HOSTCC) -O1 ccdv.c -o ccdv
+.SILENT: ccdv