Makefile.am revision 953daeba
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 -DFONTCONFIG_PATH='"$(BASECONFIGDIR)"' 83 84EXTRA_DIST += makealias 85 86noinst_HEADERS=fcint.h fcftint.h fcdeprecate.h fcstdint.h 87 88ALIAS_FILES = fcalias.h fcaliastail.h fcftalias.h fcftaliastail.h 89 90BUILT_SOURCES = $(ALIAS_FILES) \ 91 ../fc-case/fccase.h \ 92 ../fc-glyphname/fcglyphname.h \ 93 ../fc-lang/fclang.h \ 94 stamp-fcstdint \ 95 fcobjshash.h \ 96 fcobjshash.gperf 97 98noinst_PROGRAMS = fcarch 99 100../fc-case/fccase.h: 101 cd ../fc-case && $(MAKE) $(AM_MAKEFLAGS) fccase.h 102../fc-glyphname/fcglyphname.h: 103 cd ../fc-glyphname && $(MAKE) $(AM_MAKEFLAGS) fcglyphname.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) $< | \ 113 $(SED) 's/^ *//;s/ *, */,/' | \ 114 $(GREP) '^[^#]' | \ 115 awk ' \ 116 /CUT_OUT_BEGIN/ { no_write=1; next; }; \ 117 /CUT_OUT_END/ { no_write=0; next; }; \ 118 { if (!no_write) print; next; }; \ 119 ' - > $@.tmp && \ 120 mv -f $@.tmp fcobjshash.gperf && touch $@ || ( $(RM) $@.tmp && false ) 121 122fcobjshash.h: Makefile fcobjshash.gperf 123 $(AM_V_GEN) $(GPERF) -m 100 fcobjshash.gperf > $@.tmp && \ 124 mv -f $@.tmp $@ || ( $(RM) $@.tmp && false ) 125 126EXTRA_DIST += \ 127 fcobjshash.gperf.h \ 128 fcobjshash.gperf 129 130libfontconfig_la_SOURCES = \ 131 fcarch.h \ 132 fcatomic.c \ 133 fcatomic.h \ 134 fcblanks.c \ 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 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 fcobjshash.h \ 155 fcpat.c \ 156 fcrange.c \ 157 fcserialize.c \ 158 fcstat.c \ 159 fcstr.c \ 160 fcweight.c \ 161 fcwindows.h \ 162 fcxml.c \ 163 ftglue.h \ 164 ftglue.c 165 166lib_LTLIBRARIES = libfontconfig.la 167 168libfontconfig_la_LDFLAGS = \ 169 -version-info @LIBT_VERSION_INFO@ -no-undefined $(export_symbols) 170 171libfontconfig_la_LIBADD = $(ICONV_LIBS) $(FREETYPE_LIBS) $(LIBXML2_LIBS) $(EXPAT_LIBS) 172 173libfontconfig_la_DEPENDENCIES = $(fontconfig_def_dependency) 174 175if ENABLE_SHARED 176install-data-local: install-ms-import-lib install-libtool-import-lib 177 178uninstall-local: uninstall-ms-import-lib uninstall-libtool-import-lib 179endif 180 181PUBLIC_FILES = \ 182 $(top_srcdir)/fontconfig/fontconfig.h \ 183 $(top_srcdir)/src/fcdeprecate.h \ 184 $(top_srcdir)/fontconfig/fcprivate.h 185 186PUBLIC_FT_FILES = \ 187 $(top_srcdir)/fontconfig/fcfreetype.h 188 189fcaliastail.h: fcalias.h 190 191fcalias.h: $(top_srcdir)/src/makealias $(PUBLIC_FILES) 192 $(AM_V_GEN) sh $(top_srcdir)/src/makealias "$(top_srcdir)/src" fcalias.h fcaliastail.h $(PUBLIC_FILES) 193 194fcftaliastail.h: fcftalias.h 195 196fcftalias.h: $(top_srcdir)/src/makealias $(PUBLIC_FT_FILES) 197 $(AM_V_GEN) sh $(top_srcdir)/src/makealias "$(top_srcdir)/src" fcftalias.h fcftaliastail.h $(PUBLIC_FT_FILES) 198 199stamp-fcstdint: $(top_builddir)/config.status 200 $(AM_V_GEN) cd $(top_builddir) && \ 201 $(SHELL) ./config.status src/fcstdint.h 202 @touch $@ 203 204CLEANFILES = $(ALIAS_FILES) fontconfig.def 205DISTCLEANFILES = \ 206 stamp-fcstdint \ 207 fcstdint.h \ 208 stamp-fcobjshash.gperf \ 209 fcobjshash.h \ 210 fcobjshash.gperf 211 212fontconfig.def: $(PUBLIC_FILES) $(PUBLIC_FT_FILES) 213 echo Generating $@ 214 (echo EXPORTS; \ 215 (cat $(PUBLIC_FILES) $(PUBLIC_FT_FILES) || echo 'FcERROR ()' ) | \ 216 $(GREP) '^Fc[^ ]* *(' | $(SED) -e 's/ *(.*$$//' -e 's/^/ /' | \ 217 sort; \ 218 echo LIBRARY libfontconfig-@LIBT_CURRENT_MINUS_AGE@.dll; \ 219 echo VERSION @LIBT_CURRENT@.@LIBT_REVISION@) >$@ 220 @ ! $(GREP) -q FcERROR $@ || ($(RM) $@; false) 221 222-include $(top_srcdir)/git.mk 223