1#	$NetBSD: Makefile,v 1.15 2013/06/10 17:37:22 mrg Exp $
2
3.include <bsd.own.mk>
4
5SUBDIR=	config
6
7.PATH:	${X11SRCDIR.freetype}/include/freetype
8
9INCSDIR=${X11INCDIR}/freetype2/freetype
10
11INCS=	freetype.h ftadvanc.h ftbbox.h ftbdf.h ftbitmap.h ftbzip2.h ftcache.h \
12	ftchapters.h ftcid.h fterrdef.h fterrors.h ftgasp.h ftglyph.h \
13	ftgxval.h ftgzip.h ftimage.h ftincrem.h ftlcdfil.h ftlist.h \
14	ftlzw.h ftmac.h ftmm.h ftmodapi.h ftmoderr.h ftotval.h ftoutln.h \
15	ftpfr.h ftrender.h ftsizes.h ftsnames.h ftstroke.h ftsynth.h \
16	ftsystem.h fttrigon.h fttypes.h ftwinfnt.h ftxf86.h \
17	t1tables.h ttnameid.h tttables.h tttags.h ttunpat.h \
18	ftautoh.h ftcffdrv.h
19
20SCRIPTS=	freetype-config
21
22CLEANFILES+=	${SCRIPTS}
23
24FT_VERSION!=	sed -n '/^version_info=/{s/version_info=.\([0-9]*\):\([0-9]*\):\([0-9]*\)./\1.\2.\3/;p;q;}' < ${X11SRCDIR.freetype}/builds/unix/configure.ac
25
26# XXX hijack config-subst from Xft
27CONFIG_SUBST=	${TOOL_SED} \
28		-e 's,%prefix%,${X11ROOTDIR},' \
29		-e 's,%exec_prefix%,${X11BINDIR},' \
30		-e 's,%libdir%,${X11USRLIBDIR},g' \
31		-e 's,%includedir%,${X11INCDIR},' \
32		-e 's,%ft_version%,${FT_VERSION},' \
33		-e 's,%build_libtool_libs%,yes,' \
34		-e 's,%FT2_EXTRA_LIBS%,,' \
35		-e 's,%LIBZ%,-lz,' \
36		-e 's,%LIBBZ2%,-lbz2,' \
37		-e 's,@FT2_EXTRA_LIBS@,,' \
38		-e 's,@LIBZ@,-lz,' \
39		-e 's,@LIBBZ2@,-lbz2,'
40
41.PATH: ${X11SRCDIR.freetype}/builds/unix
42freetype-config: freetype-config.in
43	${_MKTARGET_CREATE}
44	${CONFIG_SUBST} < ${.ALLSRC} > ${.TARGET}
45
46.include <bsd.x11.mk>
47.include <bsd.prog.mk>
48.include <bsd.subdir.mk>
49