2 # fontconfig/src/Makefile.am
4 # Copyright © 2003 Keith Packard
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.
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.
28 export_symbols = -export-symbols fontconfig.def
30 fontconfig_def_dependency = fontconfig.def
32 # gcc import library install/uninstall
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
39 uninstall-libtool-import-lib:
40 $(RM) $(DESTDIR)$(libdir)/libfontconfig.dll.a $(DESTDIR)$(libdir)/fontconfig.def
44 install-libtool-import-lib:
45 uninstall-libtool-import-lib:
47 fontconfig_def_dependency =
53 # Microsoft import library install/uninstall
55 noinst_DATA = fontconfig.lib
57 fontconfig.lib : libfontconfig.la
58 lib -name:libfontconfig-@LIBT_CURRENT_MINUS_AGE@.dll -def:fontconfig.def -out:$@
60 install-ms-import-lib:
61 $(INSTALL) fontconfig.lib $(DESTDIR)$(libdir)
63 uninstall-ms-import-lib:
64 $(RM) $(DESTDIR)$(libdir)/fontconfig.lib
68 install-ms-import-lib:
69 uninstall-ms-import-lib:
81 -DFC_CACHEDIR='"$(FC_CACHEDIR)"' \
82 -DCONFIGDIR='"$(CONFIGDIR)"' \
83 -DFONTCONFIG_PATH='"$(BASECONFIGDIR)"' \
84 -DFC_TEMPLATEDIR='"$(TEMPLATEDIR)"'
87 EXTRA_DIST += makealias
89 noinst_HEADERS=fcint.h fcftint.h fcdeprecate.h fcfoundry.h fcmd5.h fcstdint.h
91 ALIAS_FILES = fcalias.h fcaliastail.h fcftalias.h fcftaliastail.h
93 BUILT_SOURCES = $(ALIAS_FILES) \
97 $(builddir)/fcobjshash.h \
100 noinst_PROGRAMS = fcarch
103 cd ../fc-case && $(MAKE) $(AM_MAKEFLAGS) fccase.h
105 cd ../fc-lang && $(MAKE) $(AM_MAKEFLAGS) fclang.h
107 fcobjshash.gperf: Makefile stamp-fcobjshash.gperf
108 -@$(RM) stamp-fcobjshash.gperf
109 @$(MAKE) stamp-fcobjshash.gperf
110 @touch -r stamp-fcobjshash.gperf $@
111 stamp-fcobjshash.gperf: fcobjshash.gperf.h fcobjs.h
112 $(AM_V_GEN) $(CPP) -I$(top_srcdir) $(CPPFLAGS) $< | \
113 $(SED) 's/^ *//;s/ *, */,/' | \
115 /CUT_OUT_BEGIN/ { no_write=1; next; }; \
116 /CUT_OUT_END/ { no_write=0; next; }; \
117 /^$$/||/^#/ { next; }; \
118 { if (!no_write) print; next; }; \
120 mv -f $@.tmp fcobjshash.gperf && touch $@ || ( $(RM) $@.tmp && false )
122 $(builddir)/fcobjshash.h: Makefile fcobjshash.gperf
123 $(AM_V_GEN) $(GPERF) --pic -m 100 fcobjshash.gperf > $@.tmp && \
124 mv -f $@.tmp $@ || ( $(RM) $@.tmp && false )
129 libfontconfig_la_SOURCES = \
165 lib_LTLIBRARIES = libfontconfig.la
167 libfontconfig_la_LDFLAGS = \
168 -version-info @LIBT_VERSION_INFO@ -no-undefined $(export_symbols)
170 libfontconfig_la_LIBADD = $(ICONV_LIBS) $(FREETYPE_LIBS) $(LIBXML2_LIBS) $(EXPAT_LIBS) $(LTLIBINTL)
172 libfontconfig_la_DEPENDENCIES = $(fontconfig_def_dependency)
175 install-data-local: install-ms-import-lib install-libtool-import-lib
177 uninstall-local: uninstall-ms-import-lib uninstall-libtool-import-lib
181 $(top_srcdir)/fontconfig/fontconfig.h \
182 $(top_srcdir)/src/fcdeprecate.h \
183 $(top_srcdir)/fontconfig/fcprivate.h
186 $(top_srcdir)/fontconfig/fcfreetype.h
188 fcaliastail.h: fcalias.h
190 fcalias.h: $(top_srcdir)/src/makealias $(PUBLIC_FILES)
191 $(AM_V_GEN) sh $(top_srcdir)/src/makealias "$(top_srcdir)/src" fcalias.h fcaliastail.h $(PUBLIC_FILES)
193 fcftaliastail.h: fcftalias.h
195 fcftalias.h: $(top_srcdir)/src/makealias $(PUBLIC_FT_FILES)
196 $(AM_V_GEN) sh $(top_srcdir)/src/makealias "$(top_srcdir)/src" fcftalias.h fcftaliastail.h $(PUBLIC_FT_FILES)
198 stamp-fcstdint: $(top_builddir)/config.status
199 $(AM_V_GEN) cd $(top_builddir) && \
200 $(SHELL) ./config.status src/fcstdint.h
206 $(builddir)/fcobjshash.h
211 stamp-fcobjshash.gperf \
214 fontconfig.def: $(PUBLIC_FILES) $(PUBLIC_FT_FILES)
217 (cat $(PUBLIC_FILES) $(PUBLIC_FT_FILES) || echo 'FcERROR ()' ) | \
218 $(GREP) '^Fc[^ ]* *(' | $(SED) -e 's/ *(.*$$//' -e 's/^/ /' | \
220 echo LIBRARY libfontconfig-@LIBT_CURRENT_MINUS_AGE@.dll; \
221 echo VERSION @LIBT_CURRENT@.@LIBT_REVISION@) >$@
222 @ ! $(GREP) -q FcERROR $@ || ($(RM) $@; false)
224 -include $(top_srcdir)/git.mk