Makefile.am 4.46 KB
Newer Older
1
#
Behdad Esfahbod's avatar
Behdad Esfahbod committed
2
# fontconfig/src/Makefile.am
3
4
5
6
7
8
9
#
# Copyright © 2003 Keith Packard
#
# Permission to use, copy, modify, distribute, and sell this software and its
# documentation for any purpose is hereby granted without fee, provided that
# the above copyright notice appear in all copies and that both that
# copyright notice and this permission notice appear in supporting
10
# documentation, and that the name of the author(s) not be used in
11
# advertising or publicity pertaining to distribution of the software without
12
# specific, written prior permission.  The authors make no
13
14
15
# representations about the suitability of this software for any purpose.  It
# is provided "as is" without express or implied warranty.
#
16
# THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
17
# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
18
# EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
19
20
21
22
23
# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
# DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.

Tor Lillqvist's avatar
Tor Lillqvist committed
24
25
26
27
if OS_WIN32

export_symbols = -export-symbols fontconfig.def

28
29
fontconfig_def_dependency = fontconfig.def

Tor Lillqvist's avatar
Tor Lillqvist committed
30
31
32
33
# gcc import library install/uninstall

install-libtool-import-lib: 
	$(INSTALL) .libs/libfontconfig.dll.a $(DESTDIR)$(libdir)
Tor Lillqvist's avatar
Tor Lillqvist committed
34
	$(INSTALL) fontconfig.def $(DESTDIR)$(libdir)/fontconfig.def
Tor Lillqvist's avatar
Tor Lillqvist committed
35
36
37
38
39
40
41
42
43

uninstall-libtool-import-lib:
	-rm $(DESTDIR)$(libdir)/libfontconfig.dll.a $(DESTDIR)$(libdir)/fontconfig.def

else

install-libtool-import-lib:
uninstall-libtool-import-lib:

44
45
fontconfig_def_dependency = 

Tor Lillqvist's avatar
Tor Lillqvist committed
46
47
48
49
50
51
52
53
54
endif

if MS_LIB_AVAILABLE

# Microsoft import library install/uninstall

noinst_DATA = fontconfig.lib

fontconfig.lib : libfontconfig.la
Tor Lillqvist's avatar
Tor Lillqvist committed
55
	lib -name:libfontconfig-@LIBT_CURRENT_MINUS_AGE@.dll -def:fontconfig.def -out:$@
Tor Lillqvist's avatar
Tor Lillqvist committed
56
57
58
59
60
61
62
63
64

install-ms-import-lib:
	$(INSTALL) fontconfig.lib $(DESTDIR)$(libdir)

uninstall-ms-import-lib:
	-rm $(DESTDIR)$(libdir)/fontconfig.lib

else

65
66
install-ms-import-lib:
uninstall-ms-import-lib:
Tor Lillqvist's avatar
Tor Lillqvist committed
67
68
69

endif

Keith Packard's avatar
Keith Packard committed
70
INCLUDES = 						\
71
72
	-I$(top_srcdir)					\
	-I$(top_srcdir)/src				\
Keith Packard's avatar
Keith Packard committed
73
	$(FREETYPE_CFLAGS)				\
74
	$(LIBXML2_CFLAGS)				\
Keith Packard's avatar
Keith Packard committed
75
	$(EXPAT_CFLAGS)					\
76
	$(WARN_CFLAGS)					\
77
	-DFC_CACHEDIR='"$(FC_CACHEDIR)"'                \
78
	-DFONTCONFIG_PATH='"$(CONFDIR)"'
Tor Lillqvist's avatar
Tor Lillqvist committed
79

80
EXTRA_DIST = makealias
Tor Lillqvist's avatar
Tor Lillqvist committed
81

Keith Packard's avatar
Keith Packard committed
82
noinst_HEADERS=fcint.h fcftint.h fcdeprecate.h
83

84
ALIAS_FILES = fcalias.h fcaliastail.h fcftalias.h fcftaliastail.h
85

Behdad Esfahbod's avatar
Behdad Esfahbod committed
86
87
88
89
BUILT_SOURCES = $(ALIAS_FILES) \
	../fc-case/fccase.h \
	../fc-glyphname/fcglyphname.h \
	../fc-lang/fclang.h
90

91
92
noinst_PROGRAMS = fcarch

Behdad Esfahbod's avatar
Behdad Esfahbod committed
93
94
../fc-case/fccase.h:
	cd ../fc-case && $(MAKE) $(AM_MAKEFLAGS) fccase.h
95
96
../fc-glyphname/fcglyphname.h:
	cd ../fc-glyphname && $(MAKE) $(AM_MAKEFLAGS) fcglyphname.h
Behdad Esfahbod's avatar
Behdad Esfahbod committed
97
98
../fc-lang/fclang.h:
	cd ../fc-lang && $(MAKE) $(AM_MAKEFLAGS) fclang.h
99

Keith Packard's avatar
Keith Packard committed
100
libfontconfig_la_SOURCES = \
101
	fcarch.h \
Keith Packard's avatar
Keith Packard committed
102
103
104
105
106
107
108
109
	fcatomic.c \
	fcblanks.c \
	fccache.c \
	fccfg.c \
	fccharset.c \
	fcdbg.c \
	fcdefault.c \
	fcdir.c \
110
	fcformat.c \
Keith Packard's avatar
Keith Packard committed
111
112
113
114
115
116
117
118
119
	fcfreetype.c \
	fcfs.c \
	fcinit.c \
	fclang.c \
	fclist.c \
	fcmatch.c \
	fcmatrix.c \
	fcname.c \
	fcpat.c \
120
	fcserialize.c \
Keith Packard's avatar
Keith Packard committed
121
	fcstr.c \
122
123
124
	fcxml.c \
	ftglue.h \
	ftglue.c
Tor Lillqvist's avatar
Tor Lillqvist committed
125

Keith Packard's avatar
Keith Packard committed
126
127
128
lib_LTLIBRARIES = libfontconfig.la

libfontconfig_la_LDFLAGS =			\
129
	-version-info @LIBT_VERSION_INFO@ -no-undefined $(export_symbols)
Keith Packard's avatar
Keith Packard committed
130

131
libfontconfig_la_LIBADD = $(ICONV_LIBS) $(FREETYPE_LIBS) $(LIBXML2_LIBS) $(EXPAT_LIBS)
Keith Packard's avatar
Keith Packard committed
132

133
134
libfontconfig_la_DEPENDENCIES = $(fontconfig_def_dependency)

Tor Lillqvist's avatar
Tor Lillqvist committed
135
136
137
138
install-data-local: install-ms-import-lib install-libtool-import-lib

uninstall-local: uninstall-ms-import-lib uninstall-libtool-import-lib

139
140
PUBLIC_FILES = \
	$(top_srcdir)/fontconfig/fontconfig.h \
141
142
	$(top_srcdir)/src/fcdeprecate.h \
	$(top_srcdir)/fontconfig/fcprivate.h
Akira TAGOH's avatar
Akira TAGOH committed
143

144
145
146
PUBLIC_FT_FILES = \
	$(top_srcdir)/fontconfig/fcfreetype.h

147
148
149
fcaliastail.h: fcalias.h

fcalias.h: $(top_srcdir)/src/makealias $(PUBLIC_FILES)
150
151
152
153
154
155
	sh $(top_srcdir)/src/makealias "$(top_srcdir)/src" fcalias.h fcaliastail.h $(PUBLIC_FILES)

fcftaliastail.h: fcftalias.h

fcftalias.h: $(top_srcdir)/src/makealias $(PUBLIC_FT_FILES)
	sh $(top_srcdir)/src/makealias "$(top_srcdir)/src" fcftalias.h fcftaliastail.h $(PUBLIC_FT_FILES)
156

157
CLEANFILES = $(ALIAS_FILES)
158

159
fontconfig.def: $(PUBLIC_FILES) $(PUBLIC_FT_FILES)
160
161
	echo Generating $@
	(echo EXPORTS; \
162
	(cat $(PUBLIC_FILES) $(PUBLIC_FT_FILES) || echo 'FcERROR ()' ) | \
Akira TAGOH's avatar
Akira TAGOH committed
163
	grep '^Fc[^ ]* *(' | sed -e 's/ *(.*$$//' -e 's/^/	/' | \
164
	sort; \
165
166
	echo LIBRARY libfontconfig-@LIBT_CURRENT_MINUS_AGE@.dll; \
	echo VERSION @LIBT_CURRENT@.@LIBT_REVISION@) >$@
167
	@ ! grep -q FcERROR $@ || (rm $@; false)