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