cryptsetup(8): Tidy up Makefile
authorAaron LI <aly@aaronly.me>
Sat, 9 Jun 2018 15:35:32 +0000 (23:35 +0800)
committerAaron LI <aly@aaronly.me>
Sun, 1 Jul 2018 09:34:14 +0000 (17:34 +0800)
gnu/sbin/cryptsetup/Makefile

index 5292c4f..c90f35b 100644 (file)
@@ -1,25 +1,25 @@
-CRYPTSETUP_DIR=        ${.CURDIR}/../../../contrib/cryptsetup
-
-CRYPTSETUP_SRCDIR=     ${CRYPTSETUP_DIR}/src
-CRYPTSETUP_LUKSDIR=    ${CRYPTSETUP_DIR}/luks
-CRYPTSETUP_LIBDIR=     ${CRYPTSETUP_DIR}/lib
-.PATH:  ${CRYPTSETUP_DIR}/man
+CRYPTSETUP_DIR=                ${.CURDIR}/../../../contrib/cryptsetup
 
 PROG=          cryptsetup
 
-# Add a backend...
-SRCS+=         backends.c libdevmapper.c setup.c utils.c \
-               utils_debug.c
+.PATH:         ${CRYPTSETUP_DIR}/src
+CFLAGS+=       -I${CRYPTSETUP_DIR}/src
+SRCS=          cryptsetup.c
 
-SRCS+=         af.c hexprint.c  keyencryption.c keymanage.c \
+.PATH:         ${CRYPTSETUP_DIR}/luks
+CFLAGS+=       -I${CRYPTSETUP_DIR}/luks
+SRCS+=         af.c hexprint.c keyencryption.c keymanage.c \
                pbkdf.c random.c
 
-SRCS+=         cryptsetup.c
+.PATH:         ${CRYPTSETUP_DIR}/lib
+CFLAGS+=       -I${CRYPTSETUP_DIR}/lib
+SRCS+=         backends.c libdevmapper.c setup.c utils.c \
+               utils_debug.c
 
+.PATH:         ${CRYPTSETUP_DIR}/man
 MAN=           cryptsetup.8
 
-CFLAGS+=       -I${CRYPTSETUP_SRCDIR} -I${CRYPTSETUP_LIBDIR} \
-               -I${CRYPTSETUP_LUKSDIR} -I. -I${CRYPTSETUP_DIR} -D_BSD_SOURCE
+CFLAGS+=       -I. -I${CRYPTSETUP_DIR} -D_BSD_SOURCE
 
 DPADD+=                ${LIBDM} ${LIBPROP}
 LDADD+=                -ldm -lprop
@@ -29,8 +29,4 @@ LDADD+=               -lprivate_crypto
 LDFLAGS+=      ${PRIVATELIB_LDFLAGS}
 CFLAGS+=       -I${.CURDIR}/../../../crypto/libressl/include
 
-.PATH: ${CRYPTSETUP_SRCDIR}
-.PATH: ${CRYPTSETUP_LUKSDIR}
-.PATH: ${CRYPTSETUP_LIBDIR}
-
 .include <bsd.prog.mk>