xref: /freebsd/lib/libexpat/Makefile (revision ff0ba87247820afbdfdc1b307c803f7923d0e4d3)
1# $FreeBSD$
2
3EXPAT=		${.CURDIR}/../../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, get rid of some VMS stuff and use
21# FreeBSD-style include guards.  We also want to point it at the new
22# bsdxml_external.h rather than the old expat_external.h file.
23bsdxml.h: expat.h
24	unifdef -U__VMS < ${.ALLSRC} | \
25	sed -e 's/XmlParse_INCLUDED/_BSD_XML_H_/' \
26	    -e 's/COPYING/src\/contrib\/expat\/COPYING/' \
27	    -e 's/expat_external/bsdxml_external/' \
28		> ${.TARGET}
29
30bsdxml_external.h: expat_external.h
31	cp -f ${.ALLSRC} ${.TARGET}
32
33.include <bsd.lib.mk>
34