summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2013-09-12 15:43:20 +0000
committerRoy Marples <roy@marples.name>2013-09-12 15:43:20 +0000
commit413652c1b372b0eddcb1c03ba9a89e202266f7aa (patch)
tree2a22a3e2bc85f825dbc9abce96ff3a4db026cc59 /Makefile
parent7c3225083f99af0f4c2787d015707883150897ea (diff)
downloaddhcpcd-413652c1b372b0eddcb1c03ba9a89e202266f7aa.tar.xz
Instead of linking directly to libudev, create a plugin system for /dev
management. This allows dhcpcd to work even if udev removed and adds the ability to change from udev to something else in the future.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile16
1 files changed, 13 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 0669cfbb..31da4f16 100644
--- a/Makefile
+++ b/Makefile
@@ -27,9 +27,10 @@ CLEANFILES+= .depend
FILES= dhcpcd.conf
FILESDIR= ${SYSCONFDIR}
-SUBDIRS= dhcpcd-hooks
+SUBDIRS= dhcpcd-hooks dev
SED_DBDIR= -e 's:@DBDIR@:${DBDIR}:g'
+SED_LIBDIR= -e 's:@LIBDIR@:${LIBDIR}:g'
SED_HOOKDIR= -e 's:@HOOKDIR@:${HOOKDIR}:g'
SED_SERVICEEXISTS= -e 's:@SERVICEEXISTS@:${SERVICEEXISTS}:g'
SED_SERVICECMD= -e 's:@SERVICECMD@:${SERVICECMD}:g'
@@ -51,16 +52,21 @@ DISTFILE?= ${DISTPREFIX}.tar.bz2
CLEANFILES+= *.tar.bz2
-.PHONY: import import-bsd
+.PHONY: import import-bsd dev
.SUFFIXES: .in
.in:
- ${SED} ${SED_DBDIR} ${SED_HOOKDIR} ${SED_SCRIPT} ${SED_SYS} \
+ ${SED} ${SED_DBDIR} ${SED_LIBDIR} ${SED_HOOKDIR} ${SED_SCRIPT} \
+ ${SED_SYS} \
${SED_SERVICEEXISTS} ${SED_SERVICECMD} ${SED_SERVICESTATUS} \
$< > $@
all: config.h ${PROG} ${SCRIPTS} ${MAN5} ${MAN8}
+ for x in ${SUBDIRS}; do cd $$x; ${MAKE} $@; cd ..; done
+
+dev:
+ cd dev && ${MAKE}
.c.o:
${CC} ${CFLAGS} ${CPPFLAGS} -c $< -o $@
@@ -78,6 +84,9 @@ _proginstall: ${PROG}
${INSTALL} -m ${BINMODE} ${PROG} ${DESTDIR}${SBINDIR}
${INSTALL} -d ${DESTDIR}${DBDIR}
+proginstall: _proginstall
+ for x in ${SUBDIRS}; do cd $$x; ${MAKE} $@; cd ..; done
+
_scriptsinstall: ${SCRIPTS}
${INSTALL} -d ${DESTDIR}${SCRIPTSDIR}
${INSTALL} -m ${BINMODE} ${SCRIPTS} ${DESTDIR}${SCRIPTSDIR}
@@ -98,6 +107,7 @@ install: _proginstall _scriptsinstall _maninstall _confinstall
clean:
rm -f ${OBJS} ${PROG} ${PROG}.core ${CLEANFILES}
+ for x in ${SUBDIRS}; do cd $$x; ${MAKE} $@; cd ..; done
distclean: clean
rm -f .depend config.h config.mk