commit 02ba25e35f334db5515fa4c115f106d5116fdf0c from: Martijn van Duren date: Sun May 16 19:31:25 2021 UTC Allow filter-dkimsign to be build with OpenSSL. Use an environment variable to build ED25519. commit - 6bcbc7986fcc2a27f034b3cddaae5ee99ac00f23 commit + 02ba25e35f334db5515fa4c115f106d5116fdf0c blob - 7e6d565348258244ea4df4c2258f1a93df024bd2 blob + 5fc3f96827fffc98f2e94f64bb376657b53ad1c7 --- Makefile +++ Makefile @@ -1,21 +1,37 @@ LOCALBASE?= /usr/local/ -PROG= filter-dkimsign -MAN= filter-dkimsign.8 -BINDIR= ${LOCALBASE}/libexec/smtpd/ -MANDIR= ${LOCALBASE}/man/man +PROG= filter-dkimsign +MAN= filter-dkimsign.8 +BINDIR= ${LOCALBASE}/libexec/smtpd/ +MANDIR= ${LOCALBASE}/man/man -SRCS+= main.c mheader.c +SRCS+= main.c mheader.c -CFLAGS+=-I${LOCALBASE}/include -CFLAGS+=-Wall -I${.CURDIR} -CFLAGS+=-Wstrict-prototypes -Wmissing-prototypes -CFLAGS+=-Wmissing-declarations -CFLAGS+=-Wshadow -Wpointer-arith -Wcast-qual -CFLAGS+=-Wsign-compare -LDFLAGS+=-L${LOCALBASE}/lib -LDADD+= -lcrypto -lopensmtpd -DPADD= ${LIBCRYPTO} +.ifdef LIBCRYPTOPC +CRYPT_CFLAGS!= pkg-config --cflags ${LIBCRYPTOPC} +CRYPT_LDFLAGS!= pkg-config --libs-only-L ${LIBCRYPTOPC} +CRYPT_LDADD!= pkg-config --libs-only-l ${LIBCRYPTOPC} +.else +CRYPT_CFLAGS= +CRYPT_LDFLAGS= +CRYPT_LDADD= -lcrypto +.endif +CFLAGS+= -I${LOCALBASE}/include -I${.CURDIR}/openbsd-compat +CFLAGS+= -Wall -I${.CURDIR} +CFLAGS+= -Wstrict-prototypes -Wmissing-prototypes +CFLAGS+= -Wmissing-declarations +CFLAGS+= -Wshadow -Wpointer-arith -Wcast-qual +CFLAGS+= -Wsign-compare +CFLAGS+= ${CRYPT_CFLAGS} +.ifdef HAVE_ED25519 +CFLAGS+= -DHAVE_ED25519 +.endif + +LDFLAGS+= -L${LOCALBASE}/lib +LDFLAGS+= ${CRYPT_LDFLAGS} +LDADD+= ${CRYPT_LDADD} -lopensmtpd +DPADD= ${LIBCRYPTO} + bindir: ${INSTALL} -d ${DESTDIR}${BINDIR}