]> git.wh0rd.org - fontconfig.git/blob - src/Makefile.am
ab0e6b407cb72a03e4ef2f46d8662d6270d83939
[fontconfig.git] / src / Makefile.am
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 Keith Packard not be used in
11 # advertising or publicity pertaining to distribution of the software without
12 # specific, written prior permission. Keith Packard makes 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 if OS_WIN32
25
26 export_symbols = -export-symbols fontconfig.def
27
28 fontconfig_def_dependency = fontconfig.def
29
30 # gcc import library install/uninstall
31
32 install-libtool-import-lib:
33 $(INSTALL) .libs/libfontconfig.dll.a $(DESTDIR)$(libdir)
34 $(INSTALL) fontconfig.def $(DESTDIR)$(libdir)/fontconfig.def
35
36 uninstall-libtool-import-lib:
37 -rm $(DESTDIR)$(libdir)/libfontconfig.dll.a $(DESTDIR)$(libdir)/fontconfig.def
38
39 else
40
41 install-libtool-import-lib:
42 uninstall-libtool-import-lib:
43
44 fontconfig_def_dependency =
45
46 endif
47
48 if MS_LIB_AVAILABLE
49
50 # Microsoft import library install/uninstall
51
52 noinst_DATA = fontconfig.lib
53
54 fontconfig.lib : libfontconfig.la
55 lib -name:libfontconfig-$(lt_current_minus_age).dll -def:fontconfig.def -out:$@
56
57 install-ms-import-lib:
58 $(INSTALL) fontconfig.lib $(DESTDIR)$(libdir)
59
60 uninstall-ms-import-lib:
61 -rm $(DESTDIR)$(libdir)/fontconfig.lib
62
63 else
64
65 install-ms-import-lib:
66 uninstall-ms-import-lib:
67
68 endif
69
70 INCLUDES = \
71 -I$(top_srcdir) \
72 -I$(top_srcdir)/src \
73 $(FREETYPE_CFLAGS) \
74 $(LIBXML2_CFLAGS) \
75 $(EXPAT_CFLAGS) \
76 $(WARN_CFLAGS) \
77 -DFC_CACHEDIR='"$(FC_CACHEDIR)"' \
78 -DFONTCONFIG_PATH='"$(CONFDIR)"'
79
80 EXTRA_DIST = makealias
81
82 noinst_HEADERS=fcint.h fcftint.h fcdeprecate.h
83
84 ALIAS_FILES = fcalias.h fcaliastail.h fcftalias.h fcftaliastail.h
85
86 BUILT_SOURCES = $(ALIAS_FILES)
87
88 libfontconfig_la_SOURCES = \
89 fcatomic.c \
90 fcblanks.c \
91 fccache.c \
92 fccfg.c \
93 fccharset.c \
94 fcdbg.c \
95 fcdefault.c \
96 fcdir.c \
97 fcformat.c \
98 fcfreetype.c \
99 fcfs.c \
100 fcinit.c \
101 fclang.c \
102 fclist.c \
103 fcmatch.c \
104 fcmatrix.c \
105 fcname.c \
106 fcpat.c \
107 fcserialize.c \
108 fcstr.c \
109 fcxml.c \
110 ftglue.h \
111 ftglue.c
112
113 lib_LTLIBRARIES = libfontconfig.la
114
115 libfontconfig_la_LDFLAGS = \
116 -version-info @LIBT_VERSION_INFO@ -no-undefined $(export_symbols)
117
118 libfontconfig_la_LIBADD = $(ICONV_LIBS) $(FREETYPE_LIBS) $(LIBXML2_LIBS) $(EXPAT_LIBS)
119
120 libfontconfig_la_DEPENDENCIES = $(fontconfig_def_dependency)
121
122 install-data-local: install-ms-import-lib install-libtool-import-lib
123
124 uninstall-local: uninstall-ms-import-lib uninstall-libtool-import-lib
125
126 PUBLIC_FILES = \
127 $(top_srcdir)/fontconfig/fontconfig.h \
128 $(top_srcdir)/src/fcdeprecate.h \
129 $(top_srcdir)/fontconfig/fcprivate.h
130
131 PUBLIC_FT_FILES = \
132 $(top_srcdir)/fontconfig/fcfreetype.h
133
134 fcaliastail.h: fcalias.h
135
136 fcalias.h: $(top_srcdir)/src/makealias $(PUBLIC_FILES)
137 sh $(top_srcdir)/src/makealias "$(top_srcdir)/src" fcalias.h fcaliastail.h $(PUBLIC_FILES)
138
139 fcftaliastail.h: fcftalias.h
140
141 fcftalias.h: $(top_srcdir)/src/makealias $(PUBLIC_FT_FILES)
142 sh $(top_srcdir)/src/makealias "$(top_srcdir)/src" fcftalias.h fcftaliastail.h $(PUBLIC_FT_FILES)
143
144 CLEANFILES = $(ALIAS_FILES)
145
146 fontconfig.def: $(PUBLIC_FILES) $(PUBLIC_FT_FILES)
147 echo Generating $@
148 (echo EXPORTS; \
149 (cat $(PUBLIC_FILES) $(PUBLIC_FT_FILES) || echo 'FcERROR ()' ) | \
150 grep '^Fc[^ ]* *(' | sed -e 's/ *(.*$$//' -e 's/^/ /' | \
151 sort; \
152 echo LIBRARY libfontconfig-@LIBT_CURRENT_MINUS_AGE@.dll; \
153 echo VERSION @LIBT_CURRENT@.@LIBT_REVISION@) >$@
154 @ ! grep -q FcERROR $@ || ($(RM) $@; false)