autotroll.m4: Clean up Qt path stuff.
[ttfautohint.git] / frontend / Makefile.am
blobb99c584bd49d3f482ec89dc3f177d9a78db18710
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 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'
22 .h.moc.cpp:
23         $(moc_verbose)$(MOC) \
24           `echo $(QT_CPPFLAGS) | sed 's/-isystem/-I/g'` \
25           $(EXTRA_CPPFLAGS) \
26           $< -o $@
28 DISTCLEANFILES = $(BUILT_SOURCES)
30 AM_CPPFLAGS = -I$(top_srcdir)/lib \
31               -I$(top_builddir)/gnulib/src \
32               -I$(top_srcdir)/gnulib/src \
33               $(FREETYPE_CPPFLAGS)
34 LDADD = $(top_builddir)/lib/libttfautohint.la \
35         $(top_builddir)/gnulib/src/libgnu.la \
36         $(LTLIBINTL) \
37         $(LTLIBTHREAD) \
38         $(FREETYPE_LIBS)
40 bin_PROGRAMS = ttfautohint
41 ttfautohint_SOURCES = info.cpp \
42                       info.h \
43                       main.cpp
44 manpages = ttfautohint.1
46 if USE_QT
47   bin_PROGRAMS += ttfautohintGUI
48   ttfautohintGUI_SOURCES = ddlineedit.cpp \
49                            ddlineedit.h \
50                            info.cpp \
51                            info.h \
52                            main.cpp \
53                            maingui.cpp \
54                            maingui.h \
55                            ttlineedit.cpp \
56                            ttlineedit.h
57   nodist_ttfautohintGUI_SOURCES = ddlineedit.moc.cpp \
58                                   maingui.moc.cpp \
59                                   ttlineedit.moc.cpp
61   ttfautohintGUI_CXXFLAGS = $(QT_CXXFLAGS)
62   ttfautohintGUI_LDFLAGS = $(QT_LDFLAGS)
63   ttfautohintGUI_CPPFLAGS = $(AM_CPPFLAGS) \
64                             $(QT_CPPFLAGS) \
65                             -DBUILD_GUI
66   ttfautohintGUI_LDADD = $(LDADD) \
67                          $(QT_LIBS)
69   BUILT_SOURCES = ddlineedit.moc.cpp \
70                   maingui.moc.cpp \
71                   ttlineedit.moc.cpp
73   manpages += ttfautohintGUI.1
74 endif
76 if WITH_DOC
77   dist_man_MANS = $(manpages)
78 endif
80 # `ttfautohint.h' holds default values for some options,
81 # `ttfautohint-scripts.' the list of available scripts
82 ttfautohint.1: $(top_srcdir)/frontend/main.cpp \
83                $(top_srcdir)/lib/ttfautohint.h \
84                $(top_srcdir)/lib/ttfautohint-scripts.h \
85                $(top_builddir)/.version
86         $(MAKE) $(AM_MAKEFLAGS) ttfautohint$(EXEEXT)
87         $(HELP2MAN) --output=$@ \
88                     --no-info \
89                     --name="add new, auto-generated hints to a TrueType font" \
90                     ./ttfautohint$(EXEEXT)
92 ttfautohintGUI.1: $(top_srcdir)/frontend/main.cpp \
93                   $(top_srcdir)/lib/ttfautohint.h \
94                   $(top_srcdir)/lib/ttfautohint-scripts.h \
95                   $(top_builddir)/.version
96         $(MAKE) $(AM_MAKEFLAGS) ttfautohintGUI$(EXEEXT)
97         $(HELP2MAN) --output=$@ \
98                     --no-info \
99                     --name="add new, auto-generated hints to a TrueType font" \
100                     --help-option=--help-all \
101                     ./ttfautohintGUI$(EXEEXT)
103 # end of Makefile.am