From a7c2001059cc976b587f8fee862c4fc3b810cd7e Mon Sep 17 00:00:00 2001 From: Rui Paulo Date: Sun, 1 Aug 2010 12:10:32 +0000 Subject: [PATCH] Use CFLAGS and LDFLAGS when compiling mkmagic. This ensures that all the correct flags are being used (esp. NO_WERROR wrt clang). Submitted by: Dimitry Andric Reviewed by: ru --- lib/libmagic/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/libmagic/Makefile b/lib/libmagic/Makefile index 36d736a3164b..4d5ab9d57e0c 100644 --- a/lib/libmagic/Makefile +++ b/lib/libmagic/Makefile @@ -40,8 +40,7 @@ magic.mgc: mkmagic magic CLEANFILES+= mkmagic build-tools: mkmagic mkmagic: apprentice.c funcs.c magic.c print.c - ${CC} -DHAVE_CONFIG_H -DCOMPILE_ONLY \ - -I${.CURDIR} -I${CONTRDIR} -o ${.TARGET} ${.ALLSRC} + ${CC} ${CFLAGS} -DCOMPILE_ONLY ${LDFLAGS} -o ${.TARGET} ${.ALLSRC} FILEVER!= awk '$$1 == "\#define" && $$2 == "VERSION" { print $$3; exit }' \ ${.CURDIR}/config.h