xref: /freebsd/lib/libexpat/Makefile (revision daaf5759104f210a9315f49f80f1e0f01a8b3bff)
14e07a41bSPoul-Henning Kamp# $FreeBSD$
24e07a41bSPoul-Henning Kamp
34e07a41bSPoul-Henning KampEXPAT=		${.CURDIR}/../../contrib/expat
44e07a41bSPoul-Henning Kamp
58a349ed8SPoul-Henning KampLIB=		bsdxml
641d8423fSGordon TetlowSHLIBDIR?=	/lib
73ca3047aSKen SmithSHLIB_MAJOR=	4
88a349ed8SPoul-Henning KampSRCS=		xmlparse.c xmlrole.c xmltok.c
9c4ca06b9SColeman KaneINCS=		bsdxml.h bsdxml_external.h
108a349ed8SPoul-Henning KampMAN=		libbsdxml.3
114e07a41bSPoul-Henning Kamp
124e07a41bSPoul-Henning Kamp.PATH:		${EXPAT}/lib
134e07a41bSPoul-Henning Kamp
14c4ca06b9SColeman KaneCFLAGS+= 	-I${.CURDIR} -DHAVE_EXPAT_CONFIG_H
15c4ca06b9SColeman KaneCLEANFILES=	bsdxml.h bsdxml_external.h
164e07a41bSPoul-Henning Kamp
17daaf5759SEd SchoutenWARNS?=		2
18daaf5759SEd Schouten
198a349ed8SPoul-Henning Kamp# OK, so it is not entirely unadultered: we ammend the COPYING
208a349ed8SPoul-Henning Kamp# to point people to the right place, get rid of some VMS stuff
21c4ca06b9SColeman Kane# and use FreeBSD style indempotency #ifndefs. We also want to
22c4ca06b9SColeman Kane# point it at the new bsdxml_external.h rather than the old
23c4ca06b9SColeman Kane# expat_external.h file.
248a349ed8SPoul-Henning Kamp#
258a349ed8SPoul-Henning Kampbsdxml.h: expat.h
268a349ed8SPoul-Henning Kamp	unifdef -U__VMS < ${.ALLSRC} | \
278a349ed8SPoul-Henning Kamp	sed -e 's/XmlParse_INCLUDED/_BSD_XML_H_/' \
288a349ed8SPoul-Henning Kamp	    -e 's/COPYING/src\/contrib\/expat\/COPYING/' \
29c4ca06b9SColeman Kane	    -e 's/expat_external/bsdxml_external/' \
308a349ed8SPoul-Henning Kamp		> ${.TARGET}
314e07a41bSPoul-Henning Kamp
32c4ca06b9SColeman Kanebsdxml_external.h: expat_external.h
33c4ca06b9SColeman Kane	cp ${.ALLSRC} ${.TARGET}
34c4ca06b9SColeman Kane
354e07a41bSPoul-Henning Kamp.include <bsd.lib.mk>
36