Home | History | Annotate | Download | only in dhcpcd
      1 # Makefile based on BSD make.
      2 # Our mk stubs also work with GNU make.
      3 # Copyright 2008 Roy Marples <roy (at] marples.name>
      4 
      5 PROG=		dhcpcd
      6 SRCS=		common.c dhcp.c dhcpcd.c logger.c net.c signals.c
      7 SRCS+=		configure.c client.c
      8 SRCS+=		${SRC_IF} ${SRC_PF}
      9 
     10 LIBEXECDIR?=	${PREFIX}/system/etc/dhcpcd
     11 SCRIPT=		${LIBEXECDIR}/dhcpcd-run-hooks
     12 HOOKDIR=	${LIBEXECDIR}/dhcpcd-hooks
     13 
     14 BINDIR=		${PREFIX}/sbin
     15 DBDIR=		/data/misc/dhcp
     16 SYSCONFDIR?=	${PREFIX}/system/etc/dhcpcd
     17 
     18 MAN=		dhcpcd.conf.5 dhcpcd.8 dhcpcd-run-hooks.8
     19 CLEANFILES=	dhcpcd.conf.5 dhcpcd.8 dhcpcd-run-hooks.8
     20 
     21 SCRIPTS=	dhcpcd-run-hooks
     22 SCRIPTSDIR=	${LIBEXECDIR}
     23 CLEANFILES+=	dhcpcd-run-hooks
     24 
     25 FILES=		dhcpcd.conf
     26 FILESDIR=	${SYSCONFDIR}
     27 
     28 CPPFLAGS+=	-DDBDIR=\"${DBDIR}\"
     29 CPPFLAGS+=	-DSCRIPT=\"${SCRIPT}\"
     30 CPPFLAGS+=	-DSYSCONFDIR=\"${SYSCONFDIR}\"
     31 LDADD+=		${LIBRT}
     32 
     33 SUBDIRS=	dhcpcd-hooks
     34 
     35 .SUFFIXES:	.in .sh.in
     36 
     37 SED_DBDIR=	-e 's:@DBDIR@:${DBDIR}:g'
     38 SED_HOOKDIR=	-e 's:@HOOKDIR@:${HOOKDIR}:g'
     39 SED_SCRIPT=	-e 's:@SCRIPT@:${SCRIPT}:g'
     40 SED_SYS=	-e 's:@SYSCONFDIR@:${SYSCONFDIR}:g'
     41 
     42 .in:
     43 	${SED} ${SED_DBDIR} ${SED_HOOKDIR} ${SED_SCRIPT} ${SED_SYS} $< > $@
     44 
     45 .sh.in.sh:
     46 	${SED} ${SED_HOOKDIR} ${SED_SCRIPT} ${SED_SYS} $< > $@
     47 
     48 MK=		mk
     49 include ${MK}/sys.mk
     50 include ${MK}/os.mk
     51 include ${MK}/prog.mk
     52