Add file missing in previous commit.
[ttfautohint.git] / lib / Makefile.am
blobb77b3a7141481bf97250ca7fc8133f2889d88ce1
1 ## Makefile.am
3 # Copyright (C) 2011-2017 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 = 0
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 = ttfautohint.h ttfautohint-errors.h
31 libttfautohint_la_LDFLAGS = \
32   -no-undefined \
33   -version-info $(ABI_CURRENT):$(ABI_REVISION):$(ABI_AGE) \
34   -export-symbols-regex "TTF_autohint"
36 libsds_la_SOURCES = \
37   sds-wrapper.c sds.h
39 libnumberset_la_SOURCES = \
40   numberset.c numberset.h
42 # We have to bypass automake's default handling of flex (.l) and bison (.y)
43 # files, since such files are always treated as traditional lex and yacc
44 # files, not allowing for flex and bison extensions.  For this reason, we
45 # call our source files `tacontrol.flex' and `tacontrol.bison' and write
46 # explicit dependency rules.
48 libttfautohint_la_SOURCES = \
49   llrb.h \
50   ta.h \
51   tablue.c tablue.h \
52   tabytecode.c tabytecode.h \
53   tacontrol.c tacontrol.h \
54   tacontrol-flex.c tacontrol-flex.h \
55   tacontrol-bison.c tacontrol-bison.h \
56   tacvt.c \
57   tadsig.c \
58   tadummy.c tadummy.h \
59   tadump.c \
60   taerror.c \
61   tafeature.c \
62   tafile.c \
63   tafont.c \
64   tafpgm.c \
65   tagasp.c \
66   tagloadr.c tagloadr.h \
67   taglobal.c taglobal.h \
68   taglyf.c \
69   tagpos.c \
70   tahints.c tahints.h \
71   tahmtx.c \
72   talatin.c talatin.h \
73   taloader.c taloader.h \
74   taloca.c \
75   tamaxp.c \
76   taname.c \
77   tapost.c \
78   taprep.c \
79   taranges.c taranges.h \
80   tascript.c \
81   tasfnt.c \
82   tashaper.c tashaper.h \
83   tasort.c tasort.h \
84   tastyles.h \
85   tatables.c tatables.h \
86   tatime.c \
87   tattc.c \
88   tattf.c \
89   tattfa.c \
90   tatypes.h \
91   taversion.c \
92   tawrtsys.h \
93   ttfautohint.c \
94   ttfautohint-scripts.h ttfautohint-coverages.h
96 libttfautohint_la_LIBADD = \
97   ${noinst_LTLIBRARIES} \
98   $(top_builddir)/gnulib/src/libgnu.la \
99   $(LIBM) \
100   $(FREETYPE_LIBS) \
101   $(HARFBUZZ_LIBS)
103 BUILT_SOURCES = \
104   tablue.c tablue.h \
105   tacontrol-flex.c tacontrol-flex.h \
106   tacontrol-bison.c tacontrol-bison.h \
107   ttfautohint.h
109 EXTRA_DIST = \
110   afblue.pl \
111   sds.c \
112   tablue.cin tablue.hin \
113   tablue.dat \
114   tacontrol.flex tacontrol.bison \
115   ttfautohint.pc.in \
116   numberset-test.c \
117   ttfautohint.h.in
119 pkgconfigdir = $(libdir)/pkgconfig
120 pkgconfig_DATA = ttfautohint.pc
122 CLEANFILES = $(pkgconfig_DATA)
124 ttfautohint.pc: ttfautohint.pc.in $(top_builddir)/config.status
125         $(AM_V_GEN)$(SED) \
126           -e 's@%prefix%@$(prefix)@g' \
127           -e 's@%exec_prefix%@$(exec_prefix)@g' \
128           -e 's@%includedir%@$(includedir)@g' \
129           -e 's@%libdir%@$(libdir)@g' \
130           -e 's@%version%@$(ABI_CURRENT).$(ABI_REVISION).$(ABI_AGE)@g' \
131           "$<" \
132           > "$@" \
133         || (rm "$@"; false)
135 tablue.c: tablue.dat tablue.cin
136         $(AM_V_GEN)rm -f $@-t $@ \
137         && perl $(srcdir)/afblue.pl $(srcdir)/tablue.dat \
138                                     < $(srcdir)/tablue.cin \
139                                     > $@-t \
140         && mv $@-t $@
142 tablue.h: tablue.dat tablue.hin
143         $(AM_V_GEN)rm -f $@-t $@ \
144         && perl $(srcdir)/afblue.pl $(srcdir)/tablue.dat \
145                                     < $(srcdir)/tablue.hin \
146                                     > $@-t \
147         && mv $@-t $@
149 ttfautohint.h: ttfautohint.h.in
150         $(AM_V_GEN)$(SED) \
151           -e 's@%TTFAUTOHINT_MAJOR%@$(ttfautohint_major)@g' \
152           -e 's@%TTFAUTOHINT_MINOR%@$(ttfautohint_minor)@g' \
153           -e 's@%TTFAUTOHINT_REVISION%@$(ttfautohint_revision)@g' \
154           -e 's@%TTFAUTOHINT_VERSION%@$(VERSION)@g' \
155           "$<" \
156           > "$@" \
157         || (rm "$@"; false)
159 TA_V_FLEX = $(TA_V_FLEX_@AM_V@)
160 TA_V_FLEX_ = $(TA_V_FLEX_@AM_DEFAULT_V@)
161 TA_V_FLEX_0 = @echo "  FLEX    " $@;
163 # we use `touch' to make the created .h file newer than the created .c file
165 tacontrol-flex.c tacontrol-flex.h: tacontrol.flex
166         $(TA_V_FLEX)$(FLEX) $(srcdir)/tacontrol.flex \
167         && touch tacontrol-flex.h
168 tacontrol-flex.h: tacontrol-flex.c
170 TA_V_BISON = $(TA_V_BISON_@AM_V@)
171 TA_V_BISON_ = $(TA_V_BISON_@AM_DEFAULT_V@)
172 TA_V_BISON_0 = @echo "  BISON   " $@;
174 tacontrol-bison.c tacontrol-bison.h: tacontrol.bison
175         $(TA_V_BISON)$(BISON) $(srcdir)/tacontrol.bison \
176         && touch tacontrol-bison.h
177 tacontrol-bison.h: tacontrol-bison.c
179 ## end of Makefile.am