From af32ee39f2576858321483d77699f7d4a5a8bf24 Mon Sep 17 00:00:00 2001 From: Cem Keylan Date: Thu, 22 Jul 2021 03:23:56 +0300 Subject: add configure script --- Makefile | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 9e9d30d..eefdbe2 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,11 @@ -include config.mk +CFLAGS += -Wall -Wno-pointer-sign -Wno-maybe-uninitialized \ + -Wno-attributes -I${PWD}/includedir \ + -D 'DEF_WEAK(n)=_Static_assert(1, "")' \ + -idirafter ${PWD}/include \ + -idirafter ${PWD}/sys \ + -idirafter ${PWD}/lib/libutil \ + -idirafter ${PWD}/lib/libcrypto + BIN = \ diff \ doas \ @@ -79,6 +86,11 @@ MAN = \ bin/pax/tar.1 \ usr.bin/signify/signify.1 +MANDOCLIBS = ${LIB} +GREPLIBS = ${LIB} + +include config.mk + .y.c: ${YACC} -o $@ $< .c.o: @@ -89,13 +101,6 @@ MAN = \ all: ${BIN} ${BINOBJ}: ${LIB} -MANDOCLIBS = ${LIB} -GREPLIBS = ${LIB} -ifeq (${ZLIB}, lib/libz/libz.a) - MANDOCLIBS += ${ZLIB} - GREPLIBS += ${ZLIB} -endif - # ------------------------------------------------------------------------------ # diff DIFFOBJ = \ @@ -152,8 +157,8 @@ GREPOBJ = \ usr.bin/grep/util.o BINOBJ += ${GREPOBJ} -grep: ${GREPOBJ} ${LIB} - ${CC} ${LDFLAGS} -o $@ ${GREPOBJ} ${LIB} -lz +grep: ${GREPOBJ} ${GREPLIBS} + ${CC} ${LDFLAGS} -o $@ ${GREPOBJ} ${LIB} ${ZLIB} ${LIBFTS} # ------------------------------------------------------------------------------ # m4 -- cgit v1.2.3