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 | |||||
.include <src.opts.mk> | |||||
DISTDIR= ${.CURDIR}/../../contrib/dhcpcd | |||||
PACKAGE= dhcpcd | |||||
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 | |||||
bz: This will need MK_INET (and below MK_INET6 checks so one can compile out one or the other… | |||||
CFLAGS+= -DPRIVSEP -DPRIVSEP_USER='"_dhcp"' | |||||
SRCS+= privsep.c privsep-root.c privsep-inet.c privsep-control.c | |||||
SRCS+= privsep-bsd.c | |||||
.if ${MK_INET_SUPPORT} != "no" | |||||
CFLAGS+= -DINET | |||||
SRCS+= bpf.c dhcp.c ipv4.c | |||||
SRCS+= privsep-bpf.c | |||||
CFLAGS+= -DARP -DARPING | |||||
SRCS+= arp.c | |||||
CFLAGS+= -DIPV4LL | |||||
SRCS+= ipv4ll.c | |||||
.endif | |||||
.if ${MK_INET6_SUPPORT} != "no" | |||||
CFLAGS+= -DINET6 | |||||
SRCS+= ipv6.c ipv6nd.c | |||||
CFLAGS+= -DDHCP6 | |||||
SRCS+= dhcp6.c | |||||
.endif | |||||
.PATH: ${DISTDIR}/compat | |||||
SRCS+= pidfile.c rb.c strtoi.c strtou.c | |||||
.PATH: ${DISTDIR}/compat/crypt | |||||
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… | |||||
CFLAGS+= -lmd | |||||
SRCS+= hmac.c | |||||
_LIBEXECDIR= /libexec | |||||
_DATADIR= /usr/share/examples | |||||
_HOOKDIR= ${_LIBEXECDIR}/dhcpcd-hooks | |||||
MAN= dhcpcd.conf.5 dhcpcd.8 | |||||
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 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 | |||||
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/? | |||||
FILES+= ${f} | |||||
FILESDIR_${f}= ${_DATADIR}/dhcpcd/hooks | |||||
.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)