+ @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_PERMISSION_FILE \"$(configdir)/permissions.d\" >> $@
+ @echo \#define UDEV_LOG_DEFAULT \"yes\" >> $@
+ @echo \#define UDEV_BIN \"$(DESTDIR)$(sbindir)/udev\" >> $@
+ @echo \#define UDEVD_BIN \"$(DESTDIR)$(sbindir)/udevd\" >> $@
+
+# Rules on how to create the generated config files
+$(LOCAL_CFG_DIR)/udev.conf:
+ sed -e "s:@udevdir@:$(udevdir):" -e "s:@configdir@:$(configdir):" < $(LOCAL_CFG_DIR)/udev.conf.in > $@
+
+GEN_MANPAGES = udev.8
+GEN_MANPAGESIN = udev.8.in
+# Rules on how to create the man pages
+$(GEN_MANPAGES): $(GEN_MANPAGESIN)
+ sed -e "s:@udevdir@:$(udevdir):" < $@.in > $@
+
+$(UDEV_OBJS): $(GEN_HEADERS) $(HOST_PROGS)
+$(SYSFS_OBJS): $(HOST_PROGS)
+$(KLIBC_FIXUP_OBJS): $(HOST_PROGS)
+$(OBJS): $(GEN_HEADERS) $(HOST_PROGS)
+$(ROOT).o: $(GEN_HEADERS) $(HOST_PROGS)
+$(TESTER).o: $(GEN_HEADERS) $(HOST_PROGS)
+$(INFO).o: $(GEN_HEADERS) $(HOST_PROGS)
+$(DAEMON).o: $(GEN_HEADERS) $(HOST_PROGS)
+$(SENDER).o: $(GEN_HEADERS) $(HOST_PROGS)
+$(STARTER).o: $(GEN_HEADERS) $(HOST_PROGS)
+
+$(ROOT): $(LIBC) $(ROOT).o $(OBJS) $(HEADERS) $(GEN_MANPAGES)
+ $(QUIET) $(LD) $(LDFLAGS) -o $@ $(CRT0) $(ROOT).o $(OBJS) $(LIB_OBJS) $(ARCH_LIB_OBJS)
+ $(QUIET) $(STRIPCMD) $@
+
+$(TESTER): $(LIBC) $(TESTER).o $(OBJS) $(HEADERS)
+ $(QUIET) $(LD) $(LDFLAGS) -o $@ $(CRT0) $(TESTER).o $(OBJS) $(LIB_OBJS) $(ARCH_LIB_OBJS)
+ $(QUIET) $(STRIPCMD) $@
+
+$(INFO): $(LIBC) $(INFO).o $(OBJS) $(HEADERS)
+ $(QUIET) $(LD) $(LDFLAGS) -o $@ $(CRT0) $(INFO).o $(OBJS) $(LIB_OBJS) $(ARCH_LIB_OBJS)
+ $(QUIET) $(STRIPCMD) $@
+
+$(DAEMON): $(LIBC) $(DAEMON).o $(OBJS) udevd.h
+ $(QUIET) $(LD) $(LDFLAGS) -o $@ $(CRT0) $(DAEMON).o $(OBJS) $(LIB_OBJS) $(ARCH_LIB_OBJS)
+ $(QUIET) $(STRIPCMD) $@
+
+$(SENDER): $(LIBC) $(SENDER).o $(OBJS) udevd.h
+ $(QUIET) $(LD) $(LDFLAGS) -o $@ $(CRT0) $(SENDER).o $(OBJS) $(LIB_OBJS) $(ARCH_LIB_OBJS)
+ $(QUIET) $(STRIPCMD) $@
+
+.c.o:
+ $(QUIET) $(CC) $(CFLAGS) -c -o $@ $<