]> git.lyx.org Git - lyx.git/blob - src/support/Makefile.am
Provide option to prevent unnecessary font loading.
[lyx.git] / src / support / Makefile.am
1 include $(top_srcdir)/config/common.am
2
3 EXTRA_DIST = os_cygwin.cpp os_unix.cpp os_win32.cpp os_win32.h \
4         CMakeLists.txt tests/CMakeLists.txt tests/supporttest.cmake
5
6 noinst_LIBRARIES = liblyxsupport.a
7
8
9 #########################  Qt stuff  #############################
10 #
11
12 MOCHEADER = \
13         ConsoleApplicationPrivate.h \
14         FileMonitor.h \
15         SystemcallPrivate.h
16
17 MOCEDFILES = $(MOCHEADER:%.h=moc_%.cpp)
18
19 CLEANFILES = $(MOCEDFILES)
20 BUILT_SOURCES = $(MOCEDFILES)
21
22 moc_%.cpp: %.h
23         $(AM_V_GEN)$(QT_MOC) -o $@ $<
24
25 liblyxsupport_a_DEPENDENCIES = $(MOCEDFILES)
26
27 #
28 ##################################################################
29
30 AM_CPPFLAGS += -I$(srcdir)/.. \
31         $(BOOST_INCLUDES) $(ICONV_INCLUDES) $(ZLIB_INCLUDES) \
32         $(QT_CPPFLAGS) $(QT_INCLUDES)
33
34 liblyxsupport_a_SOURCES = \
35         FileMonitor.h \
36         FileMonitor.cpp \
37         RandomAccessList.h \
38         bind.h \
39         Cache.h \
40         Changer.h \
41         ConsoleApplication.cpp \
42         ConsoleApplication.h \
43         ConsoleApplicationPrivate.h \
44         convert.cpp \
45         convert.h \
46         copied_ptr.h \
47         counter_reps.cpp \
48         counter_reps.h \
49         debug.cpp \
50         debug.h \
51         docstream.cpp \
52         docstream.h \
53         docstring.cpp \
54         docstring.h \
55         docstring_list.h \
56         environment.h \
57         environment.cpp \
58         ExceptionMessage.h \
59         FileName.cpp \
60         FileName.h \
61         FileNameList.h \
62         filetools.cpp \
63         filetools.h \
64         ForkedCalls.cpp \
65         ForkedCalls.h \
66         functional.h \
67         gettext.cpp \
68         gettext.h \
69         gzstream.cpp \
70         gzstream.h \
71         kill.cpp \
72         lassert.h \
73         lassert.cpp \
74         limited_stack.h \
75         lstrings.cpp \
76         lstrings.h \
77         lyxalgo.h \
78         lyxlib.h \
79         lyxmagic.h \
80         lyxtime.cpp \
81         lyxtime.h \
82         mutex.h \
83         mutex.cpp \
84         Messages.cpp \
85         Messages.h \
86         numpunct_lyx_char_type.h \
87         os.cpp \
88         os.h \
89         PathChanger.cpp \
90         PathChanger.h \
91         Package.cpp \
92         Package.h \
93         ProgressInterface.h \
94         pmprof.h \
95         qstring_helpers.cpp \
96         qstring_helpers.h \
97         regex.h \
98         RefChanger.h \
99         signals.h \
100         socktools.cpp \
101         socktools.h \
102         strfwd.h \
103         Systemcall.cpp \
104         Systemcall.h \
105         SystemcallPrivate.h \
106         TempFile.cpp \
107         TempFile.h \
108         textutils.h \
109         Translator.h \
110         Timeout.cpp \
111         Timeout.h \
112         trivstring.cpp \
113         trivstring.h \
114         types.h \
115         unique_ptr.h \
116         userinfo.cpp \
117         userinfo.h \
118         unicode.cpp \
119         unicode.h \
120         weighted_btree.h
121
122 #if INSTALL_MACOSX
123 #liblyxsupport_a_SOURCES += \
124 #       AppleSpellChecker.h \
125 #       AppleSpellChecker.mm
126 #endif
127
128 if INSTALL_MACOSX
129 liblyxsupport_a_SOURCES += \
130         AppleSpeller.h \
131         AppleSpeller.m \
132         AppleScript.h \
133         AppleScript.m \
134         AppleScriptProxy.cpp \
135         linkback/LinkBack.h \
136         linkback/LinkBack.m \
137         linkback/LinkBackProxy.h \
138         linkback/LinkBackProxy.m \
139         linkback/LinkBackServer.h \
140         linkback/LinkBackServer.m
141 endif
142
143 ############################## Tests ##################################
144
145 EXTRA_DIST += \
146         tests/test_convert \
147         tests/test_filetools \
148         tests/test_lstrings \
149         tests/test_trivstring \
150         tests/regfiles/convert \
151         tests/regfiles/filetools \
152         tests/regfiles/lstrings \
153         tests/regfiles/trivstring
154
155
156 TESTS = \
157         tests/test_convert \
158         tests/test_filetools \
159         tests/test_lstrings \
160         tests/test_trivstring
161
162 check_PROGRAMS = \
163         check_convert \
164         check_filetools \
165         check_lstrings \
166         check_trivstring
167
168 if INSTALL_MACOSX
169 ADD_FRAMEWORKS = \
170         -framework QtCore -framework AppKit -framework ApplicationServices \
171         -Wl,-rpath,@loader_path/../Frameworks \
172         -Wl,-rpath,@executable_path/../Frameworks \
173         -Wl,-headerpad_max_install_names
174 endif
175
176 check_convert_LDADD = liblyxsupport.a $(LIBICONV) $(BOOST_LIBS) $(QT_CORE_LIBS) $(LIBSHLWAPI) @LIBS@
177 check_convert_LDFLAGS = $(QT_CORE_LDFLAGS) $(ADD_FRAMEWORKS)
178 check_convert_SOURCES = \
179         tests/check_convert.cpp \
180         tests/dummy_functions.cpp \
181         tests/boost.cpp
182
183 check_filetools_LDADD = liblyxsupport.a $(LIBICONV) $(BOOST_LIBS) $(QT_CORE_LIBS) $(LIBSHLWAPI) @LIBS@
184 check_filetools_LDFLAGS = $(QT_CORE_LDFLAGS) $(ADD_FRAMEWORKS)
185 check_filetools_SOURCES = \
186         tests/check_filetools.cpp \
187         tests/dummy_functions.cpp \
188         tests/boost.cpp
189
190 check_lstrings_LDADD = liblyxsupport.a $(LIBICONV) $(BOOST_LIBS) $(QT_CORE_LIBS) $(LIBSHLWAPI) @LIBS@
191 check_lstrings_LDFLAGS = $(QT_CORE_LDFLAGS) $(ADD_FRAMEWORKS)
192 check_lstrings_SOURCES = \
193         tests/check_lstrings.cpp \
194         tests/dummy_functions.cpp \
195         tests/boost.cpp
196
197 check_trivstring_LDADD = liblyxsupport.a $(LIBICONV) $(BOOST_LIBS) $(QT_CORE_LIBS) $(LIBSHLWAPI) @LIBS@
198 check_trivstring_LDFLAGS = $(QT_CORE_LDFLAGS) $(ADD_FRAMEWORKS)
199 check_trivstring_SOURCES = \
200         tests/check_trivstring.cpp \
201         tests/dummy_functions.cpp \
202         tests/boost.cpp
203
204 makeregfiles: ${check_PROGRAMS}
205         for all in ${check_PROGRAMS} ; do \
206                 ./$$all > ${srcdir}/tests/regfiles/$$all ; \
207         done