summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2014-01-31 15:55:16 +0000
committerRoy Marples <roy@marples.name>2014-01-31 15:55:16 +0000
commitb1aadc616eb1717b920d420bcd064d82f99f9b83 (patch)
tree42f0a42310db037bf29fdebd4212b0745bee190d /Makefile
parent07e2a9508e82f6e507677de8d66f09c39a193da6 (diff)
downloaddhcpcd-b1aadc616eb1717b920d420bcd064d82f99f9b83.tar.xz
Tweak stuff for importing
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile24
1 files changed, 18 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index b6fe6dea..c672f235 100644
--- a/Makefile
+++ b/Makefile
@@ -17,10 +17,11 @@ SRCS+= ${DHCPCD_SRCS}
VPATH= . ./crypt
+SRCS+= auth.c
CPPFLAGS+= -I./crypt
-SRCS+= auth.c hmac_md5.c ${MD5_SRC}
+CRYPT_SRCS= hmac_md5.c ${MD5_SRC}
-OBJS+= ${SRCS:.c=.o} ${COMPAT_SRCS:.c=.o}
+OBJS+= ${SRCS:.c=.o} ${COMPAT_SRCS:.c=.o} ${CRYPT_SRCS:.c=.o}
SCRIPT= ${LIBEXECDIR}/dhcpcd-run-hooks
HOOKDIR= ${LIBEXECDIR}/dhcpcd-hooks
@@ -156,18 +157,28 @@ import: ${SRCS}
sed -e 's/^.*\.c //g' -e 's/.*\.c$$//g' -e 's/\\//g' | \
tr ' ' '\n' | \
sed -e '/^compat\//d' | \
- sort -u) /tmp/${DISTPREFIX}
+ sed -e '/^crypt\//d' | \
+ sort -u) /tmp/${DISTPREFIX}; \
+ if test -n "${CRYPT_SRCS}"; then \
+ ${INSTALL} -d /tmp/${DISTPREFIX}/crypt; \
+ cp crypt/${CRYPT_SRCS} /tmp/${DISTPREFIX}/crypt; \
+ cp $$(cd crypt && ${CC} ${CPPFLAGS} -MM ${CRYPT_SRCS} | \
+ sed -e 's/^.*c //g' -e 's/.*\.c$$//g' -e 's/\\//g' | \
+ tr ' ' '\n' | sed -e 's:^:crypt/:g' | \
+ sort -u) /tmp/${DISTPREFIX}/crypt; \
+ fi;
if test -n "${COMPAT_SRCS}"; then \
${INSTALL} -d /tmp/${DISTPREFIX}/compat; \
- cp ${COMPAT_SRCS} /tmp/${DISTPREFIX}/compat; \
- cp $$(${CC} ${CPPFLAGS} -MM ${COMPAT_SRCS} | \
+ cp compat/${COMPAT_SRCS} /tmp/${DISTPREFIX}/compat; \
+ cp $$(cd compat && ${CC} ${CPPFLAGS} -MM ${COMPAT_SRCS} | \
sed -e 's/^.*c //g' -e 's/.*\.c$$//g' -e 's/\\//g' | \
- tr ' ' '\n' | \
+ tr ' ' '\n' | sed -e 's:^:compat/:g' | \
sort -u) /tmp/${DISTPREFIX}/compat; \
fi;
if test -n "${IMPORT_RCSID}"; then \
for x in \
/tmp/${DISTPREFIX}/*.c \
+ /tmp/${DISTPREFIX}/crypt/*.c \
/tmp/${DISTPREFIX}/compat/*.c \
; do \
if test -e "$$x"; then \
@@ -180,6 +191,7 @@ import: ${SRCS}
if test -n "${IMPORT_HID}"; then \
for x in \
/tmp/${DISTPREFIX}/*.h \
+ /tmp/${DISTPREFIX}/crypt/*.h \
/tmp/${DISTPREFIX}/compat/*.h \
; do \
if test -e "$$x"; then \