xref: /freebsd/lib/libexpat/Makefile (revision f126890ac5386406dadf7c4cfa9566cbb56537c5)
1
2PACKAGE=	runtime
3EXPAT=		${SRCTOP}/contrib/expat
4
5LIB=		bsdxml
6SHLIBDIR?=	/lib
7SHLIB_MAJOR=	4
8SRCS=		xmlparse.c xmlrole.c xmltok.c
9INCS=		bsdxml.h bsdxml_external.h
10MAN=		libbsdxml.3
11
12.PATH:		${EXPAT}/lib
13
14CFLAGS+= 	-I${.CURDIR} -DHAVE_EXPAT_CONFIG_H
15CLEANFILES=	bsdxml.h bsdxml_external.h
16
17WARNS?=		2
18
19# OK, so it is not entirely unadulterated: we amend the COPYING to
20# point people to the right place and use FreeBSD-style include guards.
21# We also want to point it at the new bsdxml_external.h rather than the
22# old expat_external.h file.
23bsdxml.h: expat.h
24	sed -e 's/XmlParse_INCLUDED/_BSD_XML_H_/' \
25	    -e 's/COPYING/src\/contrib\/expat\/COPYING/' \
26	    -e 's/expat_external/bsdxml_external/' ${.ALLSRC} \
27		> ${.TARGET}
28
29bsdxml_external.h: expat_external.h
30	${CP} ${.ALLSRC} ${.TARGET}
31
32.include <bsd.lib.mk>
33