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 24EXTRA_DIST = 25 26if OS_WIN32 27 28export_symbols = -export-symbols fontconfig.def 29 30fontconfig_def_dependency = fontconfig.def 31 32# gcc import library install/uninstall 33 34install-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 39uninstall-libtool-import-lib: 40 $(RM) $(DESTDIR)$(libdir)/libfontconfig.dll.a $(DESTDIR)$(libdir)/fontconfig.def 41 42else 43 44install-libtool-import-lib: 45uninstall-libtool-import-lib: 46 47fontconfig_def_dependency = 48 49endif 50 51if MS_LIB_AVAILABLE 52 53# Microsoft import library install/uninstall 54 55noinst_DATA = fontconfig.lib 56 57fontconfig.lib : libfontconfig.la 58 lib -name:libfontconfig-@LIBT_CURRENT_MINUS_AGE@.dll -def:fontconfig.def -out:$@ 59 60install-ms-import-lib: 61 $(INSTALL) fontconfig.lib $(DESTDIR)$(libdir) 62 63uninstall-ms-import-lib: 64 $(RM) $(DESTDIR)$(libdir)/fontconfig.lib 65 66else 67 68install-ms-import-lib: 69uninstall-ms-import-lib: 70 71endif 72 73AM_CPPFLAGS = \ 74 -I$(top_srcdir) \ 75 -I$(top_srcdir)/src \ 76 $(FREETYPE_CFLAGS) \ 77 $(ICONV_CFLAGS) \ 78 $(LIBXML2_CFLAGS) \ 79 $(EXPAT_CFLAGS) \ 80 $(WARN_CFLAGS) \ 81 -DFC_CACHEDIR='"$(FC_CACHEDIR)"' \ 82 -DCONFIGDIR='"$(CONFIGDIR)"' \ 83 -DFONTCONFIG_PATH='"$(BASECONFIGDIR)"' \ 84 -DFC_TEMPLATEDIR='"$(TEMPLATEDIR)"' 85LDADD = $(LIBINTL) 86 87EXTRA_DIST += makealias 88 89noinst_HEADERS=fcint.h fcftint.h fcdeprecate.h fcfoundry.h fcmd5.h fcstdint.h 90 91ALIAS_FILES = fcalias.h fcaliastail.h fcftalias.h fcftaliastail.h 92 93BUILT_SOURCES = $(ALIAS_FILES) \ 94 ../fc-case/fccase.h \ 95 ../fc-lang/fclang.h \ 96 stamp-fcstdint \ 97 $(builddir)/fcobjshash.h \ 98 fcobjshash.gperf 99 100noinst_PROGRAMS = fcarch 101 102../fc-case/fccase.h: 103 cd ../fc-case && $(MAKE) $(AM_MAKEFLAGS) fccase.h 104../fc-lang/fclang.h: 105 cd ../fc-lang && $(MAKE) $(AM_MAKEFLAGS) fclang.h 106 107fcobjshash.gperf: Makefile stamp-fcobjshash.gperf 108 -@$(RM) stamp-fcobjshash.gperf 109 @$(MAKE) stamp-fcobjshash.gperf 110 @touch -r stamp-fcobjshash.gperf $@ 111stamp-fcobjshash.gperf: fcobjshash.gperf.h fcobjs.h 112 $(AM_V_GEN) $(CPP) -I$(top_srcdir) $(CPPFLAGS) $< | \ 113 $(SED) 's/^ *//;s/ *, */,/' | \ 114 awk ' \ 115 /CUT_OUT_BEGIN/ { no_write=1; next; }; \ 116 /CUT_OUT_END/ { no_write=0; next; }; \ 117 /^$$/||/^#/ { next; }; \ 118 { if (!no_write) print; next; }; \ 119 ' - > $@.tmp && \ 120 mv -f $@.tmp fcobjshash.gperf && touch $@ || ( $(RM) $@.tmp && false ) 121 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 ) 125 126EXTRA_DIST += \ 127 fcobjshash.gperf.h 128 129libfontconfig_la_SOURCES = \ 130 fcarch.h \ 131 fcatomic.c \ 132 fcatomic.h \ 133 fccache.c \ 134 fccfg.c \ 135 fccharset.c \ 136 fccompat.c \ 137 fcdbg.c \ 138 fcdefault.c \ 139 fcdir.c \ 140 fcformat.c \ 141 fcfreetype.c \ 142 fcfs.c \ 143 fcptrlist.c \ 144 fchash.c \ 145 fcinit.c \ 146 fclang.c \ 147 fclist.c \ 148 fcmatch.c \ 149 fcmatrix.c \ 150 fcmutex.h \ 151 fcname.c \ 152 fcobjs.c \ 153 fcobjs.h \ 154 fcpat.c \ 155 fcrange.c \ 156 fcserialize.c \ 157 fcstat.c \ 158 fcstr.c \ 159 fcweight.c \ 160 fcwindows.h \ 161 fcxml.c \ 162 ftglue.h \ 163 ftglue.c 164 165lib_LTLIBRARIES = libfontconfig.la 166 167libfontconfig_la_LDFLAGS = \ 168 -version-info @LIBT_VERSION_INFO@ -no-undefined $(export_symbols) 169 170libfontconfig_la_LIBADD = $(ICONV_LIBS) $(FREETYPE_LIBS) $(LIBXML2_LIBS) $(EXPAT_LIBS) $(LTLIBINTL) 171 172libfontconfig_la_DEPENDENCIES = $(fontconfig_def_dependency) 173 174if ENABLE_SHARED 175install-data-local: install-ms-import-lib install-libtool-import-lib 176 177uninstall-local: uninstall-ms-import-lib uninstall-libtool-import-lib 178endif 179 180PUBLIC_FILES = \ 181 $(top_srcdir)/fontconfig/fontconfig.h \ 182 $(top_srcdir)/src/fcdeprecate.h \ 183 $(top_srcdir)/fontconfig/fcprivate.h 184 185PUBLIC_FT_FILES = \ 186 $(top_srcdir)/fontconfig/fcfreetype.h 187 188fcaliastail.h: fcalias.h 189 190fcalias.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) 192 193fcftaliastail.h: fcftalias.h 194 195fcftalias.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) 197 198stamp-fcstdint: $(top_builddir)/config.status 199 $(AM_V_GEN) cd $(top_builddir) && \ 200 $(SHELL) ./config.status src/fcstdint.h 201 @touch $@ 202 203CLEANFILES = \ 204 $(ALIAS_FILES) \ 205 fontconfig.def \ 206 $(builddir)/fcobjshash.h 207 208DISTCLEANFILES = \ 209 stamp-fcstdint \ 210 fcstdint.h \ 211 stamp-fcobjshash.gperf \ 212 fcobjshash.gperf 213 214fontconfig.def: $(PUBLIC_FILES) $(PUBLIC_FT_FILES) 215 echo Generating $@ 216 (echo EXPORTS; \ 217 (cat $(PUBLIC_FILES) $(PUBLIC_FT_FILES) || echo 'FcERROR ()' ) | \ 218 $(GREP) '^Fc[^ ]* *(' | $(SED) -e 's/ *(.*$$//' -e 's/^/ /' | \ 219 sort; \ 220 echo LIBRARY libfontconfig-@LIBT_CURRENT_MINUS_AGE@.dll; \ 221 echo VERSION @LIBT_CURRENT@.@LIBT_REVISION@) >$@ 222 @ ! $(GREP) -q FcERROR $@ || ($(RM) $@; false) 223 224-include $(top_srcdir)/git.mk 225