summaryrefslogtreecommitdiff
path: root/lib/freetype/Makefile
blob: 7f890bfc2a4c2fb4f040a1e9b73c7a35428b73cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
#	$OpenBSD: Makefile,v 1.55 2020/11/11 09:27:24 matthieu Exp $

.include <bsd.own.mk>

FREETYPESRC=	${.CURDIR}/src

# Get it from builds/unix/configure.ac
FT_VERSION_INFO= 23.4.17

INSTALL_PROGRAM = ${INSTALL} ${INSTALL_COPY} -m 755 -o $(BINOWN) -g $(BINGRP)

.ifmake includes
SUBDIR=	include
.endif

DEBUG?=

LIB=	freetype
LDADD=	-lz

SRCS=   ftbase.c ftbbox.c ftbdf.c ftbitmap.c ftdebug.c ftcache.c \
	ftcid.c ftfstype.c ftgasp.c ftglyph.c ftgxval.c ftotval.c \
	ftpatent.c ftinit.c ftlzw.c ftmm.c ftpfr.c ftstroke.c \
	ftsynth.c ftsystem.c fttype1.c ftwinfnt.c autofit.c bdf.c \
	cff.c ftgzip.c pcf.c pfr.c psaux.c pshinter.c psnames.c \
	raster.c sfnt.c smooth.c truetype.c type1.c type1cid.c \
	type42.c winfnt.c

CPPFLAGS+= -I${.CURDIR}/include -I${.CURDIR}/builds/unix -I${.CURDIR}/src/lzw -DFT2_BUILD_LIBRARY -DFT_CONFIG_CONFIG_H='<ftconfig.h>'

.if ${COMPILER_VERSION} != "gcc3"
CFLAGS+= -fvisibility=hidden
PICFLAG= -fPIC
VERSION_SCRIPT= ${.CURDIR}/Symbols.map
.endif

CLEANFILES+=	freetype-config freetype2.pc

obj:	_xenocara_obj

beforedepend:	freetype-config freetype2.pc
BUILDFIRST =	freetype-config freetype2.pc

beforeinstall:
	cd ${.CURDIR} ; exec ${MAKE} ${MAKE_FLAGS} includes

includes: _SUBDIRUSE
	@cmp -s ${DESTDIR}${X11BASE}/include/freetype2/ft2build.h \
	  ${.CURDIR}/include/ft2build.h || \
	${INSTALL_DATA} ${.CURDIR}/include/ft2build.h \
	  ${DESTDIR}${X11BASE}/include/freetype2/ft2build.h
	@cmp -s ${DESTDIR}${X11BASE}/include/freetype2/freetype/config/ftconfig.h \
	  ${.CURDIR}/builds/unix/ftconfig.h || \
	${INSTALL_DATA} ${.CURDIR}/builds/unix/ftconfig.h \
	  ${DESTDIR}${X11BASE}/include/freetype2/freetype/config/ftconfig.h

install-pc: freetype2.pc
	${INSTALL_DATA} freetype2.pc ${DESTDIR}${LIBDIR}/pkgconfig

install-config: freetype-config
	${INSTALL_PROGRAM} freetype-config ${DESTDIR}${X11BASE}/bin

freetype2.pc: freetype2.in Makefile
	sed -e s,%prefix%,${X11BASE}, -e s,%exec_prefix%,${X11BASE}, \
		-e s,%ft_version%,${FT_VERSION_INFO}, \
		-e s,%includedir%,${INCSDIR}, -e s,%libdir%,${LIBDIR}, \
		-e s,%LIBS_PRIVATE%,-lz, -e s,%REQUIRES_PRIVATE%,, \
		< ${.CURDIR}/builds/unix/freetype2.in > freetype2.pc

freetype-config: freetype-config.in
	sed -e s,%prefix%,${X11BASE}, -e s,%exec_prefix%,${X11BASE}, \
		-e s,%includedir%,${INCSDIR}, -e s,%libdir%,${LIBDIR}, \
		-e 's,%LIBSSTATIC_CONFIG%,-lfreetype -lz,' \
		-e 's,%hardcode_libdir_flag_spec%,,' \
		-e 's,%ft_version%,${FT_VERSION_INFO},' -e 's,%wl%,,' \
		-e 's,%build_libtool_libs%,yes,' \
		< ${.CURDIR}/builds/unix/freetype-config.in \
		> freetype-config

realinstall:	install-pc install-config

NOPROFILE=

.include <bsd.lib.mk>
.include <bsd.xorg.mk>

.PATH:	${.CURDIR}/builds/unix
.PATH:	${FREETYPESRC}/autofit
.PATH:  ${FREETYPESRC}/base
.PATH:  ${FREETYPESRC}/bdf
.PATH:	${FREETYPESRC}/cache
.PATH:  ${FREETYPESRC}/cff
.PATH:  ${FREETYPESRC}/cid
.PATH:  ${FREETYPESRC}/gzip
.PATH:	${FREETYPESRC}/lzw
.PATH:  ${FREETYPESRC}/pcf
.PATH:  ${FREETYPESRC}/pfr
.PATH:  ${FREETYPESRC}/psaux
.PATH:  ${FREETYPESRC}/pshinter
.PATH:  ${FREETYPESRC}/psnames
.PATH:  ${FREETYPESRC}/raster
.PATH:  ${FREETYPESRC}/sfnt
.PATH:  ${FREETYPESRC}/smooth
.PATH:  ${FREETYPESRC}/truetype
.PATH:  ${FREETYPESRC}/type1
.PATH:  ${FREETYPESRC}/type42
.PATH:  ${FREETYPESRC}/winfonts

.include <bsd.subdir.mk>