Changeset View
Standalone View
sbin/dhcpcd/Makefile
- This file was added.
# $FreeBSD$ | |||||
# Derived from DragonFly BSD's Makefile for dhcpcd, | |||||
# which was derived from NetBSD's Makefile for dhcpcd | |||||
DISTDIR= ${.CURDIR}/../../contrib/dhcpcd | |||||
PACKAGE= runtime | |||||
PROG= dhcpcd | |||||
WARNS?= 0 | |||||
SRCDIR= ${DISTDIR}/src | |||||
.PATH: ${SRCDIR} | |||||
CFLAGS+= -DHAVE_CONFIG_H -I${.CURDIR} -I${SRCDIR} -I${DISTDIR} | |||||
SRCS= common.c control.c dhcpcd.c duid.c eloop.c logerr.c | |||||
SRCS+= if.c if-options.c route.c sa.c script.c | |||||
SRCS+= dhcp-common.c dhcpcd-embedded.c | |||||
SRCS+= if-bsd.c | |||||
CFLAGS+= -DAUTH | |||||
SRCS+= auth.c | |||||
CFLAGS+= -DINET | |||||
SRCS+= bpf.c dhcp.c ipv4.c | |||||
bz: This will need MK_INET (and below MK_INET6 checks so one can compile out one or the other… | |||||
CFLAGS+= -DARP -DARPING | |||||
SRCS+= arp.c | |||||
CFLAGS+= -DIPV4LL | |||||
SRCS+= ipv4ll.c | |||||
CFLAGS+= -DINET6 | |||||
SRCS+= ipv6.c ipv6nd.c | |||||
CFLAGS+= -DDHCP6 | |||||
SRCS+= dhcp6.c | |||||
.PATH: ${DISTDIR}/compat | |||||
SRCS+= pidfile.c rb.c strtoi.c strtou.c | |||||
.PATH: ${DISTDIR}/compat/crypt | |||||
CFLAGS+= -lmd | |||||
SRCS+= hmac.c | |||||
# system directories | |||||
_SYSCONFDIR= /etc | |||||
_LIBDIR= /lib | |||||
_LIBEXECDIR= /libexec | |||||
_DBDIR= /var/db/dhcpcd | |||||
_RUNDIR= /var/run | |||||
CFLAGS+= -DSYSCONFDIR='"${_SYSCONFDIR}"' \ | |||||
-DSBINDIR='"${BINDIR}"' \ | |||||
Done Inline ActionsThis section should not be need as this is all defined in config.h which you included above. roy_marples.name: This section should not be need as this is all defined in config.h which you included above. | |||||
Done Inline ActionsCan you confirm the line which includes it above is this one? CFLAGS+= -DHAVE_CONFIG_H -I${.CURDIR} -I${SRCDIR} -I${DISTDIR} It looks like the DragonFlyBSD Makefile and config.h files (where these FreeBSD ones were copied from) both have this section also? woodsb02: Can you confirm the line which includes it above is this one?
```
CFLAGS+= -DHAVE_CONFIG_H… | |||||
-DLIBDIR='"${_LIBDIR}"' \ | |||||
-DLIBEXECDIR='"${_LIBEXECDIR}"' \ | |||||
-DDBDIR='"${_DBDIR}"' \ | |||||
-DRUNDIR='"${_RUNDIR}"' | |||||
_DATADIR= /usr/share/examples | |||||
_HOOKDIR= ${_LIBEXECDIR}/dhcpcd-hooks | |||||
_SED_CMDS= -e 's:@SYSCONFDIR@:${_SYSCONFDIR}:g' \ | |||||
-e 's:@DATADIR@:${_DATADIR}:g' \ | |||||
-e 's:@DBDIR@:${_DBDIR}:g' \ | |||||
-e 's:@LIBDIR@:${_LIBDIR}:g' \ | |||||
-e 's:@RUNDIR@:${_RUNDIR}:g' \ | |||||
-e 's:@HOOKDIR@:${_HOOKDIR}:g' \ | |||||
-e 's:@SCRIPT@:${_LIBEXECDIR}/dhcpcd-run-hooks:g' \ | |||||
-e 's:@SERVICEEXISTS@::g' \ | |||||
-e 's:@SERVICECMD@::g' \ | |||||
-e 's:@SERVICESTATUS@::g' \ | |||||
-e 's:@STATUSARG@::g' \ | |||||
-e 's:@YPDOMAIN_DIR@::g' \ | |||||
-e 's:@YPDOMAIN_SUFFIX@::g' | |||||
MAN= dhcpcd.conf.5 dhcpcd.8 | |||||
.for f in dhcpcd.conf.5 dhcpcd.8 | |||||
CLEANFILES+= ${f} | |||||
${f}: ${f}.in | |||||
sed ${_SED_CMDS} ${SRCDIR}/${f}.in > $@ | |||||
.endfor | |||||
Done Inline ActionsI may be wrong but normally we do generate these files on import rather than on every build? bz: I may be wrong but normally we do generate these files on import rather than on every build? | |||||
Done Inline Actions
Newer dhcpcd sports an import-src target which sets up headers and sources for import to avoid generation but leaves hooks and manual pages intact. I can easily adjust the target to include the manual pages but I would need to review the hooks first, but should be doable. roy_marples.name: > I may be wrong but normally we do generate these files on import rather than on every build? | |||||
Done Inline ActionsThis has now been improved upstream here: So you could import like so: Just ensure that any specific path changes you need other than the default are given, and ideally let me know so I can change the defaults. roy_marples.name: This has now been improved upstream here:
https://roy.marples.name/cgit/dhcpcd.git/commit/? | |||||
CONFS= dhcpcd.conf | |||||
CONFDIR= /etc | |||||
CONFMODE= 644 | |||||
# | |||||
# Hooks | |||||
# | |||||
HOOKSRC= ${DISTDIR}/hooks | |||||
.PATH: ${HOOKSRC} | |||||
SCRIPTS= dhcpcd-run-hooks | |||||
SCRIPTSDIR= ${_LIBEXECDIR} | |||||
MAN+= dhcpcd-run-hooks.8 | |||||
FILES= 01-test 02-dump 20-resolv.conf 30-hostname | |||||
FILESDIR= ${_HOOKDIR} | |||||
# Example hooks that should not be installed by default | |||||
.for f in 10-wpa_supplicant 15-timezone 29-lookup-hostname 50-ypbind | |||||
FILES+= ${f} | |||||
FILESDIR_${f}= ${_DATADIR}/dhcpcd/hooks | |||||
.endfor | |||||
.for f in dhcpcd-run-hooks dhcpcd-run-hooks.8 50-ypbind | |||||
CLEANFILES+= ${f} | |||||
${f}: ${f}.in | |||||
sed ${_SED_CMDS} ${HOOKSRC}/${f}.in > $@ | |||||
.endfor | |||||
.include <bsd.prog.mk> |
This will need MK_INET (and below MK_INET6 checks so one can compile out one or the other protocol family)