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