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