Use `%top' in flex file to include `config.h'.
[ttfautohint.git] / lib / Makefile.am
blobb44f36bfb96b25537ee2ec0992d1563325db57d3
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 AM_CPPFLAGS = -I$(top_builddir)/gnulib/src \
14               -I$(top_srcdir)/gnulib/src \
15               $(FREETYPE_CPPFLAGS) \
16               $(HARFBUZZ_CFLAGS)
18 noinst_LTLIBRARIES = \
19   libsds.la \
20   libnumberset.la \
21   libttfautohint.la
23 libsds_la_SOURCES = \
24   sds-wrapper.c sds.h
26 libnumberset_la_SOURCES = \
27   numberset.c numberset.h
29 # We have to bypass automake's default handling of flex (.l) and bison (.y)
30 # files, since such files are always treated as traditional lex and yacc
31 # files, not allowing for flex and bison extensions.  For this reason, we
32 # call our source files `tacontrol.flex' and `tacontrol.bison' and write
33 # explicit dependency rules.
35 libttfautohint_la_SOURCES = \
36   llrb.h \
37   ta.h \
38   tablue.c tablue.h \
39   tabytecode.c tabytecode.h \
40   tacontrol.c tacontrol.h \
41   tacontrol-flex.c tacontrol-flex.h \
42   tacontrol-bison.c tacontrol-bison.h \
43   tacvt.c \
44   tadsig.c \
45   tadummy.c tadummy.h \
46   tadump.c \
47   taerror.c \
48   tafeature.c \
49   tafile.c \
50   tafont.c \
51   tafpgm.c \
52   tagasp.c \
53   tagloadr.c tagloadr.h \
54   taglobal.c taglobal.h \
55   taglyf.c \
56   tagpos.c \
57   tahints.c tahints.h \
58   tahmtx.c \
59   talatin.c talatin.h \
60   taloader.c taloader.h \
61   taloca.c \
62   tamaxp.c \
63   taname.c \
64   tapost.c \
65   taprep.c \
66   taranges.c taranges.h \
67   tascript.c \
68   tasfnt.c \
69   tashaper.c tashaper.h \
70   tasort.c tasort.h \
71   tastyles.h \
72   tatables.c tatables.h \
73   tatime.c \
74   tattc.c \
75   tattf.c \
76   tattfa.c \
77   tatypes.h \
78   tawrtsys.h \
79   ttfautohint.c \
80   ttfautohint.h ttfautohint-errors.h \
81   ttfautohint-scripts.h ttfautohint-coverages.h
83 libttfautohint_la_LIBADD = \
84   libsds.la \
85   libnumberset.la \
86   $(LIBM) \
87   $(FREETYPE_LIBS) \
88   $(HARFBUZZ_LIBS)
90 BUILT_SOURCES = \
91   tablue.c tablue.h \
92   tacontrol-flex.c tacontrol-flex.h \
93   tacontrol-bison.c tacontrol-bison.h
95 EXTRA_DIST = \
96   afblue.pl \
97   sds.c \
98   tablue.cin tablue.hin \
99   tablue.dat \
100   tacontrol.flex tacontrol.bison tacontrol-flex.c
102 tablue.c: tablue.dat tablue.cin
103         $(AM_V_GEN)rm -f $@-t $@ \
104         && perl $(srcdir)/afblue.pl $(srcdir)/tablue.dat \
105                                     < $(srcdir)/tablue.cin \
106                                     > $@-t \
107         && mv $@-t $@
109 tablue.h: tablue.dat tablue.hin
110         $(AM_V_GEN)rm -f $@-t $@ \
111         && perl $(srcdir)/afblue.pl $(srcdir)/tablue.dat \
112                                     < $(srcdir)/tablue.hin \
113                                     > $@-t \
114         && mv $@-t $@
116 TA_V_FLEX = $(TA_V_FLEX_@AM_V@)
117 TA_V_FLEX_ = $(TA_V_FLEX_@AM_DEFAULT_V@)
118 TA_V_FLEX_0 = @echo "  FLEX    " $@;
120 # we use `touch' to make the created .h file newer than the created .c file
122 tacontrol-flex.c tacontrol-flex.h: tacontrol.flex
123         $(TA_V_FLEX)$(FLEX) $(srcdir)/tacontrol.flex \
124         && touch tacontrol-flex.h
125 tacontrol-flex.h: tacontrol-flex.c
127 TA_V_BISON = $(TA_V_BISON_@AM_V@)
128 TA_V_BISON_ = $(TA_V_BISON_@AM_DEFAULT_V@)
129 TA_V_BISON_0 = @echo "  BISON   " $@;
131 tacontrol-bison.c tacontrol-bison.h: tacontrol.bison
132         $(TA_V_BISON)$(BISON) $(srcdir)/tacontrol.bison \
133         && touch tacontrol-bison.h
134 tacontrol-bison.h: tacontrol-bison.c
136 ## end of Makefile.am