Debian Codegraph @

src/Makefile.am

raw
1 #
2 # fontconfig/src/Makefile.am
3 #
4 # Copyright © 2003 Keith Packard
5 #
6 # Permission to use, copy, modify, distribute, and sell this software and its
7 # documentation for any purpose is hereby granted without fee, provided that
8 # the above copyright notice appear in all copies and that both that
9 # 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 # representations about the suitability of this software for any purpose. It
14 # is provided "as is" without express or implied warranty.
15 #
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 # CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
20 # DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
21 # TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
22 # PERFORMANCE OF THIS SOFTWARE.
23
24 EXTRA_DIST =
25
26 if OS_WIN32
27
28 export_symbols = -export-symbols fontconfig.def
29
30 fontconfig_def_dependency = fontconfig.def
31
32 # gcc import library install/uninstall
33
34 install-libtool-import-lib: libfontconfig.la
35 $(MKDIR_P) $(DESTDIR)$(libdir)
36 $(INSTALL) .libs/libfontconfig.dll.a $(DESTDIR)$(libdir)/libfontconfig.dll.a
37 $(INSTALL) fontconfig.def $(DESTDIR)$(libdir)/fontconfig.def
38
39 uninstall-libtool-import-lib:
40 $(RM) $(DESTDIR)$(libdir)/libfontconfig.dll.a $(DESTDIR)$(libdir)/fontconfig.def
41
42 else
43
44 install-libtool-import-lib:
45 uninstall-libtool-import-lib:
46
47 fontconfig_def_dependency =
48
49 endif
50
51 if MS_LIB_AVAILABLE
52
53 # Microsoft import library install/uninstall
54
55 noinst_DATA = fontconfig.lib
56
57 fontconfig.lib : libfontconfig.la
58 lib -name:libfontconfig-@[email protected] -def:fontconfig.def -out:$@
59
60 install-ms-import-lib:
61 $(INSTALL) fontconfig.lib $(DESTDIR)$(libdir)
62
63 uninstall-ms-import-lib:
64 $(RM) $(DESTDIR)$(libdir)/fontconfig.lib
65
66 else
67
68 install-ms-import-lib:
69 uninstall-ms-import-lib:
70
71 endif
72
73 AM_CPPFLAGS = \
74 -I$(top_builddir) \
75 -I$(top_srcdir) \
76 -I$(top_srcdir)/src \
77 -I$(top_builddir)/fc-lang \
78 $(FREETYPE_CFLAGS) \
79 $(ICONV_CFLAGS) \
80 $(LIBXML2_CFLAGS) \
81 $(EXPAT_CFLAGS) \
82 $(WARN_CFLAGS) \
83 -DFC_CACHEDIR='"$(FC_CACHEDIR)"' \
84 -DCONFIGDIR='"$(CONFIGDIR)"' \
85 -DFONTCONFIG_PATH='"$(BASECONFIGDIR)"' \
86 -DFC_TEMPLATEDIR='"$(TEMPLATEDIR)"'
87 LDADD = $(LIBINTL)
88
89 EXTRA_DIST += makealias
90
91 noinst_HEADERS=fcint.h fcftint.h fcdeprecate.h fcfoundry.h fcmd5.h fcstdint.h
92
93 ALIAS_FILES = fcalias.h fcaliastail.h fcftalias.h fcftaliastail.h
94
95 BUILT_SOURCES = $(ALIAS_FILES) \
96 ../fc-case/fccase.h \
97 ../fc-lang/fclang.h \
98 stamp-fcstdint \
99 $(builddir)/fcobjshash.h \
100 fcobjshash.gperf
101
102 noinst_PROGRAMS = fcarch
103
104 ../fc-case/fccase.h:
105 cd ../fc-case && $(MAKE) $(AM_MAKEFLAGS) fccase.h
106 ../fc-lang/fclang.h:
107 cd ../fc-lang && $(MAKE) $(AM_MAKEFLAGS) fclang.h
108
109 fcobjshash.gperf: Makefile stamp-fcobjshash.gperf
110 -@$(RM) stamp-fcobjshash.gperf
111 @$(MAKE) stamp-fcobjshash.gperf
112 @touch -r stamp-fcobjshash.gperf $@
113 stamp-fcobjshash.gperf: fcobjshash.gperf.h fcobjs.h
114 $(AM_V_GEN) $(CPP) -I$(top_builddir) -I$(top_srcdir) $(CPPFLAGS) $< | \
115 $(SED) 's/^ *//;s/ *, */,/' | \
116 awk ' \
117 /CUT_OUT_BEGIN/ { no_write=1; next; }; \
118 /CUT_OUT_END/ { no_write=0; next; }; \
119 /^$$/||/^#/ { next; }; \
120 { if (!no_write) print; next; }; \
121 ' - > [email protected] && \
122 mv -f [email protected] fcobjshash.gperf && touch $@ || ( $(RM) [email protected] && false )
123
124 $(builddir)/fcobjshash.h: Makefile fcobjshash.gperf
125 $(AM_V_GEN) $(GPERF) --pic -m 100 fcobjshash.gperf > [email protected] && \
126 mv -f [email protected] $@ || ( $(RM) [email protected] && false )
127
128 EXTRA_DIST += \
129 fcobjshash.gperf.h
130
131 libfontconfig_la_SOURCES = \
132 fcarch.h \
133 fcatomic.c \
134 fcatomic.h \
135 fccache.c \
136 fccfg.c \
137 fccharset.c \
138 fccompat.c \
139 fcdbg.c \
140 fcdefault.c \
141 fcdir.c \
142 fcformat.c \
143 fcfreetype.c \
144 fcfs.c \
145 fcptrlist.c \
146 fchash.c \
147 fcinit.c \
148 fclang.c \
149 fclist.c \
150 fcmatch.c \
151 fcmatrix.c \
152 fcmutex.h \
153 fcname.c \
154 fcobjs.c \
155 fcobjs.h \
156 fcpat.c \
157 fcrange.c \
158 fcserialize.c \
159 fcstat.c \
160 fcstr.c \
161 fcweight.c \
162 fcwindows.h \
163 fcxml.c \
164 ftglue.h \
165 ftglue.c
166
167 lib_LTLIBRARIES = libfontconfig.la
168
169 libfontconfig_la_LDFLAGS = \
170 -version-info @LIBT_VERSION_INFO@ -no-undefined $(export_symbols)
171
172 libfontconfig_la_LIBADD = $(ICONV_LIBS) $(FREETYPE_LIBS) $(LIBXML2_LIBS) $(EXPAT_LIBS) $(LTLIBINTL)
173
174 libfontconfig_la_DEPENDENCIES = $(fontconfig_def_dependency)
175
176 if ENABLE_SHARED
177 install-data-local: install-ms-import-lib install-libtool-import-lib
178
179 uninstall-local: uninstall-ms-import-lib uninstall-libtool-import-lib
180 endif
181
182 PUBLIC_FILES = \
183 $(top_builddir)/fontconfig/fontconfig.h \
184 $(top_srcdir)/src/fcdeprecate.h \
185 $(top_srcdir)/fontconfig/fcprivate.h
186
187 PUBLIC_FT_FILES = \
188 $(top_srcdir)/fontconfig/fcfreetype.h
189
190 fcaliastail.h: fcalias.h
191
192 fcalias.h: $(top_srcdir)/src/makealias $(PUBLIC_FILES)
193 $(AM_V_GEN) sh $(top_srcdir)/src/makealias "$(top_srcdir)/src" fcalias.h fcaliastail.h $(PUBLIC_FILES)
194
195 fcftaliastail.h: fcftalias.h
196
197 fcftalias.h: $(top_srcdir)/src/makealias $(PUBLIC_FT_FILES)
198 $(AM_V_GEN) sh $(top_srcdir)/src/makealias "$(top_srcdir)/src" fcftalias.h fcftaliastail.h $(PUBLIC_FT_FILES)
199
200 stamp-fcstdint: $(top_builddir)/config.status
201 $(AM_V_GEN) cd $(top_builddir) && \
202 $(SHELL) ./config.status src/fcstdint.h
203 @touch $@
204
205 CLEANFILES = \
206 $(ALIAS_FILES) \
207 fontconfig.def \
208 $(builddir)/fcobjshash.h
209
210 DISTCLEANFILES = \
211 stamp-fcstdint \
212 fcstdint.h \
213 stamp-fcobjshash.gperf \
214 fcobjshash.gperf
215
216 fontconfig.def: $(PUBLIC_FILES) $(PUBLIC_FT_FILES)
217 echo Generating $@
218 (echo EXPORTS; \
219 (cat $(PUBLIC_FILES) $(PUBLIC_FT_FILES) || echo 'FcERROR ()' ) | \
220 $(GREP) '^Fc[^ ]* *(' | $(SED) -e 's/ *(.*$$//' -e 's/^/ /' | \
221 sort; \
222 echo LIBRARY libfontconfig-@[email protected]; \
223 echo VERSION @LIBT_CURRENT@.@LIBT_REVISION@) >$@
224 @ ! $(GREP) -q FcERROR $@ || ($(RM) $@; false)
225
226 -include $(top_srcdir)/git.mk