Synchronize with FreeType.
[ttfautohint.git] / lib / Makefile.am
blob19916c382064806171cea1e476dc3a964643959e
1 ## Makefile.am
3 # Copyright (C) 2011-2018 by Werner Lemberg.
5 # This file is part of the ttfautohint library, and may only be used,
6 # modified, and distributed under the terms given in `COPYING'.  By
7 # continuing to use, modify, or distribute this file you indicate that you
8 # have read `COPYING' and understand and accept it fully.
10 # The file `COPYING' mentioned in the previous paragraph is distributed
11 # with the ttfautohint library.
13 ABI_CURRENT = 1
14 ABI_REVISION = 1
15 ABI_AGE = 0
18 AM_CPPFLAGS = -I$(top_builddir)/gnulib/src \
19               -I$(top_srcdir)/gnulib/src \
20               $(FREETYPE_CPPFLAGS) \
21               $(HARFBUZZ_CFLAGS)
23 noinst_LTLIBRARIES = \
24   libsds.la \
25   libnumberset.la
27 lib_LTLIBRARIES = libttfautohint.la
29 include_HEADERS = \
30   ttfautohint-errors.h \
31   ttfautohint-scripts.h \
32   ttfautohint-coverages.h
34 nodist_include_HEADERS = \
35   ttfautohint.h
37 libttfautohint_la_LDFLAGS = \
38   -no-undefined \
39   -version-info $(ABI_CURRENT):$(ABI_REVISION):$(ABI_AGE) \
40   -export-symbols-regex "TTF_autohint"
42 libsds_la_SOURCES = \
43   sds-wrapper.c sds.h
45 libnumberset_la_SOURCES = \
46   numberset.c numberset.h
48 # We have to bypass automake's default handling of flex (.l) and bison (.y)
49 # files, since such files are always treated as traditional lex and yacc
50 # files, not allowing for flex and bison extensions.  For this reason, we
51 # call our source files `tacontrol.flex' and `tacontrol.bison' and write
52 # explicit dependency rules.
54 libttfautohint_la_SOURCES = \
55   llrb.h \
56   ta.h \
57   tablue.c tablue.h \
58   tabytecode.c tabytecode.h \
59   tacontrol.c tacontrol.h \
60   tacontrol-flex.c tacontrol-flex.h \
61   tacontrol-bison.c tacontrol-bison.h \
62   tacvt.c \
63   tadsig.c \
64   tadummy.c tadummy.h \
65   tadump.c \
66   taerror.c \
67   tafeature.c \
68   tafile.c \
69   tafont.c \
70   tafpgm.c \
71   tagasp.c \
72   tagloadr.c tagloadr.h \
73   taglobal.c taglobal.h \
74   taglyf.c \
75   tagpos.c \
76   tahints.c tahints.h \
77   tahmtx.c \
78   talatin.c talatin.h \
79   taloader.c taloader.h \
80   taloca.c \
81   tamaxp.c \
82   taname.c \
83   tapost.c \
84   taprep.c \
85   taranges.c taranges.h \
86   tascript.c \
87   tasfnt.c \
88   tashaper.c tashaper.h \
89   tasort.c tasort.h \
90   tastyles.h \
91   tatables.c tatables.h \
92   tatime.c \
93   tattc.c \
94   tattf.c \
95   tattfa.c \
96   tatypes.h \
97   taversion.c \
98   tawrtsys.h \
99   ttfautohint.c
101 libttfautohint_la_LIBADD = \
102   $(noinst_LTLIBRARIES) \
103   $(top_builddir)/gnulib/src/libgnu.la \
104   $(LIBM) \
105   $(FREETYPE_LIBS) \
106   $(HARFBUZZ_LIBS)
108 BUILT_SOURCES = \
109   tablue.c tablue.h \
110   tacontrol-flex.c tacontrol-flex.h \
111   tacontrol-bison.c tacontrol-bison.h \
112   ttfautohint.h
114 EXTRA_DIST = \
115   afblue.pl \
116   sds.c \
117   tablue.cin tablue.hin \
118   tablue.dat \
119   tacontrol.flex tacontrol.bison \
120   ttfautohint.pc.in \
121   numberset-test.c \
122   ttfautohint.h.in
124 pkgconfigdir = $(libdir)/pkgconfig
125 pkgconfig_DATA = ttfautohint.pc
127 CLEANFILES = $(pkgconfig_DATA)
129 ttfautohint.pc: ttfautohint.pc.in $(top_builddir)/config.status
130         $(AM_V_GEN)$(SED) \
131           -e 's@%prefix%@$(prefix)@g' \
132           -e 's@%exec_prefix%@$(exec_prefix)@g' \
133           -e 's@%includedir%@$(includedir)@g' \
134           -e 's@%libdir%@$(libdir)@g' \
135           -e 's@%version%@$(ABI_CURRENT).$(ABI_REVISION).$(ABI_AGE)@g' \
136           "$<" \
137           > "$@" \
138         || (rm "$@"; false)
140 tablue.c: tablue.dat tablue.cin
141         $(AM_V_GEN)rm -f $@-t $@ \
142         && perl $(srcdir)/afblue.pl $(srcdir)/tablue.dat \
143                                     < $(srcdir)/tablue.cin \
144                                     > $@-t \
145         && mv $@-t $@
147 tablue.h: tablue.dat tablue.hin
148         $(AM_V_GEN)rm -f $@-t $@ \
149         && perl $(srcdir)/afblue.pl $(srcdir)/tablue.dat \
150                                     < $(srcdir)/tablue.hin \
151                                     > $@-t \
152         && mv $@-t $@
154 ttfautohint.h: ttfautohint.h.in
155         $(AM_V_GEN)$(SED) \
156           -e 's@%TTFAUTOHINT_MAJOR%@$(ttfautohint_major)@g' \
157           -e 's@%TTFAUTOHINT_MINOR%@$(ttfautohint_minor)@g' \
158           -e 's@%TTFAUTOHINT_REVISION%@$(ttfautohint_revision)@g' \
159           -e 's@%TTFAUTOHINT_VERSION%@$(VERSION)@g' \
160           "$<" \
161           > "$@" \
162         || (rm "$@"; false)
164 TA_V_FLEX = $(TA_V_FLEX_@AM_V@)
165 TA_V_FLEX_ = $(TA_V_FLEX_@AM_DEFAULT_V@)
166 TA_V_FLEX_0 = @echo "  FLEX    " $@;
168 # we use `touch' to make the created .h file newer than the created .c file
170 tacontrol-flex.c tacontrol-flex.h: tacontrol.flex
171         $(TA_V_FLEX)$(FLEX) $(srcdir)/tacontrol.flex \
172         && touch tacontrol-flex.h
173 tacontrol-flex.h: tacontrol-flex.c
175 TA_V_BISON = $(TA_V_BISON_@AM_V@)
176 TA_V_BISON_ = $(TA_V_BISON_@AM_DEFAULT_V@)
177 TA_V_BISON_0 = @echo "  BISON   " $@;
179 tacontrol-bison.c tacontrol-bison.h: tacontrol.bison
180         $(TA_V_BISON)$(BISON) $(srcdir)/tacontrol.bison \
181         && touch tacontrol-bison.h
182 tacontrol-bison.h: tacontrol-bison.c
184 ## end of Makefile.am