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