Fix building with a dev manager

This commit is contained in:
Roy Marples 2013-09-12 17:08:34 +00:00
parent a68c246036
commit 52dc01927b
3 changed files with 7 additions and 6 deletions

View File

@ -7,6 +7,7 @@ SRCS+= dhcp-common.c
CFLAGS?= -O2
CSTD?= c99
MKDIRS=
include config.mk
CFLAGS+= -std=${CSTD}
@ -27,7 +28,7 @@ CLEANFILES+= .depend
FILES= dhcpcd.conf
FILESDIR= ${SYSCONFDIR}
SUBDIRS= dhcpcd-hooks dev
SUBDIRS= dhcpcd-hooks ${MKDIRS}
SED_DBDIR= -e 's:@DBDIR@:${DBDIR}:g'
SED_LIBDIR= -e 's:@LIBDIR@:${LIBDIR}:g'

6
configure vendored
View File

@ -607,10 +607,9 @@ if [ "$DEV" != no -a "$UDEV" != no ]; then
printf "Checking for libudev ... "
LIBUDEV_CFLAGS=$(pkg-config --cflags libudev 2>/dev/null)
LIBUDEV_LIBS=$(pkg-config --libs libudev 2>/dev/null)
[ -z "$DEV" ] && DEV=yes
fi
if [ "$DEV" != no -a "$UDEV" != no -a -n "$LIBUDEV_LIBS" ]; then
echo "yes"
[ -z "$DEV" ] && DEV=yes
echo "DEV_PLUGINS+= udev" >>$CONFIG_MK
if [ -n "$LIBUDEV_CFLAGS" ]; then
echo "LIBUDEV_CFLAGS= $LIBUDEV_CFLAGS" >>$CONFIG_MK
@ -641,7 +640,8 @@ fi
if [ "$DEV" = yes ]; then
echo "SRCS+= dev.c" >>$CONFIG_MK
echo "CPPFLAGS+= -DPLUGIN_DEV" >>$CONFIG_MK
echo "LDFLAGS+= -Wl,--export-dynamic" >>$CONFIG_MK
echo "LDFLAGS+= -Wl,--export-dynamic" >>$CONFIG_MK
echo "MKDIRS+= dev"
fi
if [ -z "$SERVICECMD" ]; then

4
dev.h
View File

@ -46,8 +46,8 @@ void dev_stop(void);
#else
#define dev_initialized(a) 1
#define dev_listening() 0
#define dev_start(a)
#define dev_stop()
#define dev_start(a) {}
#define dev_stop() {}
#endif
#endif