Makefile.am 4.55 KB
Newer Older
1
#
Behdad Esfahbod's avatar
Behdad Esfahbod committed
2
# fontconfig/src/Makefile.am
3 4 5 6 7 8 9
#
# Copyright © 2003 Keith Packard
#
# Permission to use, copy, modify, distribute, and sell this software and its
# documentation for any purpose is hereby granted without fee, provided that
# the above copyright notice appear in all copies and that both that
# 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 14 15
# representations about the suitability of this software for any purpose.  It
# 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 20 21 22 23
# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
# DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.

Tor Lillqvist's avatar
Tor Lillqvist committed
24 25 26 27
if OS_WIN32

export_symbols = -export-symbols fontconfig.def

28 29
fontconfig_def_dependency = fontconfig.def

Tor Lillqvist's avatar
Tor Lillqvist committed
30 31 32 33
# gcc import library install/uninstall

install-libtool-import-lib: 
	$(INSTALL) .libs/libfontconfig.dll.a $(DESTDIR)$(libdir)
Tor Lillqvist's avatar
Tor Lillqvist committed
34
	$(INSTALL) fontconfig.def $(DESTDIR)$(libdir)/fontconfig.def
Tor Lillqvist's avatar
Tor Lillqvist committed
35 36

uninstall-libtool-import-lib:
37
	$(RM) $(DESTDIR)$(libdir)/libfontconfig.dll.a $(DESTDIR)$(libdir)/fontconfig.def
Tor Lillqvist's avatar
Tor Lillqvist committed
38 39 40 41 42 43

else

install-libtool-import-lib:
uninstall-libtool-import-lib:

44 45
fontconfig_def_dependency = 

Tor Lillqvist's avatar
Tor Lillqvist committed
46 47 48 49 50 51 52 53 54
endif

if MS_LIB_AVAILABLE

# Microsoft import library install/uninstall

noinst_DATA = fontconfig.lib

fontconfig.lib : libfontconfig.la
55
	lib -name:libfontconfig-@LIBT_CURRENT_MINUS_AGE@.dll -def:fontconfig.def -out:$@
Tor Lillqvist's avatar
Tor Lillqvist committed
56 57 58 59 60

install-ms-import-lib:
	$(INSTALL) fontconfig.lib $(DESTDIR)$(libdir)

uninstall-ms-import-lib:
61
	$(RM) $(DESTDIR)$(libdir)/fontconfig.lib
Tor Lillqvist's avatar
Tor Lillqvist committed
62 63 64

else

65 66
install-ms-import-lib:
uninstall-ms-import-lib:
Tor Lillqvist's avatar
Tor Lillqvist committed
67 68 69

endif

Keith Packard's avatar
Keith Packard committed
70
INCLUDES = 						\
71 72
	-I$(top_srcdir)					\
	-I$(top_srcdir)/src				\
Keith Packard's avatar
Keith Packard committed
73
	$(FREETYPE_CFLAGS)				\
74
	$(ICONV_CFLAGS)					\
75
	$(LIBXML2_CFLAGS)				\
Keith Packard's avatar
Keith Packard committed
76
	$(EXPAT_CFLAGS)					\
77
	$(WARN_CFLAGS)					\
78
	-DFC_CACHEDIR='"$(FC_CACHEDIR)"'                \
79
	-DFONTCONFIG_PATH='"$(BASECONFIGDIR)"'
Tor Lillqvist's avatar
Tor Lillqvist committed
80

81
EXTRA_DIST = makealias
Tor Lillqvist's avatar
Tor Lillqvist committed
82

83
noinst_HEADERS=fcint.h fcftint.h fcdeprecate.h
84

85
ALIAS_FILES = fcalias.h fcaliastail.h fcftalias.h fcftaliastail.h
86

87 88 89 90
BUILT_SOURCES = $(ALIAS_FILES) \
	../fc-case/fccase.h \
	../fc-glyphname/fcglyphname.h \
	../fc-lang/fclang.h
91

92 93
noinst_PROGRAMS = fcarch

94 95
../fc-case/fccase.h:
	cd ../fc-case && $(MAKE) $(AM_MAKEFLAGS) fccase.h
96 97
../fc-glyphname/fcglyphname.h:
	cd ../fc-glyphname && $(MAKE) $(AM_MAKEFLAGS) fcglyphname.h
98 99
../fc-lang/fclang.h:
	cd ../fc-lang && $(MAKE) $(AM_MAKEFLAGS) fclang.h
100

Keith Packard's avatar
Keith Packard committed
101
libfontconfig_la_SOURCES = \
102
	fcarch.h \
Keith Packard's avatar
Keith Packard committed
103 104 105 106 107 108 109 110
	fcatomic.c \
	fcblanks.c \
	fccache.c \
	fccfg.c \
	fccharset.c \
	fcdbg.c \
	fcdefault.c \
	fcdir.c \
111
	fcformat.c \
Keith Packard's avatar
Keith Packard committed
112 113 114 115 116 117 118 119 120
	fcfreetype.c \
	fcfs.c \
	fcinit.c \
	fclang.c \
	fclist.c \
	fcmatch.c \
	fcmatrix.c \
	fcname.c \
	fcpat.c \
121
	fcserialize.c \
122
	fcstat.c \
Keith Packard's avatar
Keith Packard committed
123
	fcstr.c \
124 125 126
	fcxml.c \
	ftglue.h \
	ftglue.c
Tor Lillqvist's avatar
Tor Lillqvist committed
127

Keith Packard's avatar
Keith Packard committed
128 129 130
lib_LTLIBRARIES = libfontconfig.la

libfontconfig_la_LDFLAGS =			\
131
	-version-info @LIBT_VERSION_INFO@ -no-undefined $(export_symbols)
Keith Packard's avatar
Keith Packard committed
132

133
libfontconfig_la_LIBADD = $(ICONV_LIBS) $(FREETYPE_LIBS) $(LIBXML2_LIBS) $(EXPAT_LIBS)
Keith Packard's avatar
Keith Packard committed
134

135 136
libfontconfig_la_DEPENDENCIES = $(fontconfig_def_dependency)

137
if ENABLE_SHARED
Tor Lillqvist's avatar
Tor Lillqvist committed
138 139 140
install-data-local: install-ms-import-lib install-libtool-import-lib

uninstall-local: uninstall-ms-import-lib uninstall-libtool-import-lib
141
endif
Tor Lillqvist's avatar
Tor Lillqvist committed
142

143 144
PUBLIC_FILES = \
	$(top_srcdir)/fontconfig/fontconfig.h \
145 146
	$(top_srcdir)/src/fcdeprecate.h \
	$(top_srcdir)/fontconfig/fcprivate.h
147

148 149 150
PUBLIC_FT_FILES = \
	$(top_srcdir)/fontconfig/fcfreetype.h

151 152 153
fcaliastail.h: fcalias.h

fcalias.h: $(top_srcdir)/src/makealias $(PUBLIC_FILES)
154
	$(AM_V_GEN) sh $(top_srcdir)/src/makealias "$(top_srcdir)/src" fcalias.h fcaliastail.h $(PUBLIC_FILES)
155 156 157 158

fcftaliastail.h: fcftalias.h

fcftalias.h: $(top_srcdir)/src/makealias $(PUBLIC_FT_FILES)
159
	$(AM_V_GEN) sh $(top_srcdir)/src/makealias "$(top_srcdir)/src" fcftalias.h fcftaliastail.h $(PUBLIC_FT_FILES)
160

161
CLEANFILES = $(ALIAS_FILES)
162

163
fontconfig.def: $(PUBLIC_FILES) $(PUBLIC_FT_FILES)
164 165
	echo Generating $@
	(echo EXPORTS; \
166
	(cat $(PUBLIC_FILES) $(PUBLIC_FT_FILES) || echo 'FcERROR ()' ) | \
167
	grep '^Fc[^ ]* *(' | sed -e 's/ *(.*$$//' -e 's/^/	/' | \
168
	sort; \
169 170
	echo LIBRARY libfontconfig-@LIBT_CURRENT_MINUS_AGE@.dll; \
	echo VERSION @LIBT_CURRENT@.@LIBT_REVISION@) >$@
171
	@ ! grep -q FcERROR $@ || ($(RM) $@; false)