xref: /freebsd/lib/libsm/Makefile (revision 70e0bbedef95258a4dadc996d641a9bebd3f107d)
1# $FreeBSD$
2
3.include <bsd.own.mk>
4
5SENDMAIL_DIR=${.CURDIR}/../../contrib/sendmail
6.PATH:	${SENDMAIL_DIR}/libsm
7
8CFLAGS+=-I${SENDMAIL_DIR}/src -I${SENDMAIL_DIR}/include -I.
9CFLAGS+=-DNEWDB -DNIS -DMAP_REGEX -DNOT_SENDMAIL
10CFLAGS+=-DHAVE_NANOSLEEP
11
12.if ${MK_INET6_SUPPORT} != "no"
13CFLAGS+=-DNETINET6
14.endif
15
16# User customizations to the sendmail build environment
17CFLAGS+=${SENDMAIL_CFLAGS}
18
19WARNS?=	2
20
21.if ${CC:T:Mclang} == "clang"
22# Unfortunately, clang gives warnings about sendmail code that cannot
23# be turned off yet.  Since this is contrib code, and we don't really
24# care about the warnings, just make them non-fatal for now.
25NO_WERROR=
26.endif
27
28LIB=	sm
29
30SRCS+=	sm_os.h
31SRCS+=	assert.c debug.c errstring.c exc.c heap.c match.c rpool.c \
32	strdup.c strerror.c strl.c clrerr.c fclose.c feof.c ferror.c \
33	fflush.c fget.c fpos.c findfp.c flags.c fopen.c fprintf.c \
34	fpurge.c fput.c fread.c fscanf.c fseek.c fvwrite.c fwalk.c \
35	fwrite.c get.c makebuf.c put.c refill.c rewind.c setvbuf.c \
36	smstdio.c snprintf.c sscanf.c stdio.c strio.c ungetc.c \
37	vasprintf.c vfprintf.c vfscanf.c vprintf.c vsnprintf.c \
38	wbuf.c wsetup.c string.c stringf.c \
39	xtrap.c strto.c test.c path.c strcasecmp.c strrevcmp.c \
40	signal.c clock.c config.c sem.c shm.c mbdb.c strexit.c cf.c ldap.c \
41	niprop.c mpeix.c memstat.c util.c
42CLEANFILES+=sm_os.h
43
44INTERNALLIB=
45
46sm_os.h:
47	ln -sf ${SENDMAIL_DIR}/include/sm/os/sm_os_freebsd.h sm_os.h
48
49.include <bsd.lib.mk>
50