Handle 'lib' as a non-recursive build.
[ttfautohint.git] / frontend / Makefile.am
blob1ed1fad098c2e31f04a9cc54a5bf30598fe2d9a6
1 # Makefile.am
3 # Copyright (C) 2011-2021 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 SUFFIXES = .moc.cpp .h
15 # Make call to `moc' emit just `MOC'.
16 moc_verbose = $(moc_verbose_@AM_V@)
17 moc_verbose_ = $(moc_verbose_@AM_DEFAULT_V@)
18 moc_verbose_0 = @echo "  MOC     " $@;
20 # moc from Qt5 aborts if unknown command line options are supplied;
21 # in particular, it doesn't recognize `-isystem'.
23 # We must also ensure that `config.h' gets included first.
24 .h.moc.cpp:
25         $(moc_verbose){ \
26           echo '#include <config.h>'; \
27           $(MOC) \
28             `echo $(QT_CPPFLAGS) | sed 's/-isystem/-I/g'` \
29             $(EXTRA_CPPFLAGS) \
30             $< ; \
31         } > $@.tmp
32         @mv $@.tmp $@
34 DISTCLEANFILES = $(BUILT_SOURCES)
36 AM_CPPFLAGS = -I$(top_builddir)/lib \
37               -I$(top_srcdir)/lib \
38               -I$(top_builddir)/gnulib/src \
39               -I$(top_srcdir)/gnulib/src \
40               $(FREETYPE_CPPFLAGS)
41 LDADD = $(top_builddir)/lib/libttfautohint.la \
42         $(top_builddir)/lib/libsds.la \
43         $(top_builddir)/lib/libnumberset.la \
44         $(top_builddir)/gnulib/src/libgnu.la \
45         $(LTLIBINTL) \
46         $(LTLIBTHREAD) \
47         $(FREETYPE_LIBS)
49 bin_PROGRAMS = ttfautohint
50 ttfautohint_SOURCES = info.cpp \
51                       info.h \
52                       main.cpp
53 manpages = ttfautohint.1
55 if USE_QT
56   bin_PROGRAMS += ttfautohintGUI
57   ttfautohintGUI_SOURCES = ddlineedit.cpp \
58                            ddlineedit.h \
59                            info.cpp \
60                            info.h \
61                            main.cpp \
62                            maingui.cpp \
63                            maingui.h \
64                            ttlineedit.cpp \
65                            ttlineedit.h
66   nodist_ttfautohintGUI_SOURCES = ddlineedit.moc.cpp \
67                                   maingui.moc.cpp \
68                                   static-plugins.cpp \
69                                   ttlineedit.moc.cpp
71   ttfautohintGUI_CXXFLAGS = $(QT_CXXFLAGS)
72   ttfautohintGUI_LDFLAGS = $(QT_LDFLAGS)
73   ttfautohintGUI_CPPFLAGS = $(AM_CPPFLAGS) \
74                             $(QT_CPPFLAGS) \
75                             -DBUILD_GUI
76   ttfautohintGUI_LDADD = $(LDADD) \
77                          $(QT_LIBS)
79   BUILT_SOURCES = ddlineedit.moc.cpp \
80                   maingui.moc.cpp \
81                   static-plugins.cpp \
82                   ttlineedit.moc.cpp
84   manpages += ttfautohintGUI.1
85 endif
87 if WITH_DOC
88   dist_man_MANS = $(manpages)
89 endif
91 # `ttfautohint.h' holds default values for some options,
92 # `ttfautohint-scripts.' the list of available scripts
93 ttfautohint.1: $(top_srcdir)/frontend/main.cpp \
94                $(top_builddir)/lib/ttfautohint.h \
95                $(top_srcdir)/lib/ttfautohint-scripts.h \
96                $(top_builddir)/.version
97         $(MAKE) $(AM_MAKEFLAGS) ttfautohint$(EXEEXT)
98         $(HELP2MAN) --output=$@ \
99                     --no-info \
100                     --name="add new, auto-generated hints to a TrueType font" \
101                     ./ttfautohint$(EXEEXT)
103 ttfautohintGUI.1: $(top_srcdir)/frontend/main.cpp \
104                   $(top_builddir)/lib/ttfautohint.h \
105                   $(top_srcdir)/lib/ttfautohint-scripts.h \
106                   $(top_builddir)/.version
107         $(MAKE) $(AM_MAKEFLAGS) ttfautohintGUI$(EXEEXT)
108         $(HELP2MAN) --output=$@ \
109                     --no-info \
110                     --name="add new, auto-generated hints to a TrueType font" \
111                     --help-option=--help-all \
112                     ./ttfautohintGUI$(EXEEXT)
114 # end of Makefile.am