]> git.lyx.org Git - features.git/blob - src/support/Makefile.am
bbdc02c1aa2f9275b9760f8b4c1256ae2041e135
[features.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         any.h \
39         bind.h \
40         Cache.h \
41         Changer.h \
42         checksum.cpp \
43         checksum.h \
44         ConsoleApplication.cpp \
45         ConsoleApplication.h \
46         ConsoleApplicationPrivate.h \
47         convert.cpp \
48         convert.h \
49         copied_ptr.h \
50         counter_reps.cpp \
51         counter_reps.h \
52         debug.cpp \
53         debug.h \
54         docstream.cpp \
55         docstream.h \
56         docstring.cpp \
57         docstring.h \
58         docstring_list.h \
59         environment.h \
60         environment.cpp \
61         ExceptionMessage.h \
62         FileName.cpp \
63         FileName.h \
64         FileNameList.h \
65         filetools.cpp \
66         filetools.h \
67         ForkedCalls.cpp \
68         ForkedCalls.h \
69         functional.h \
70         gettext.cpp \
71         gettext.h \
72         gzstream.cpp \
73         gzstream.h \
74         kill.cpp \
75         lassert.h \
76         lassert.cpp \
77         Length.cpp \
78         Length.h \
79         lengthcommon.cpp \
80         limited_stack.h \
81         lstrings.cpp \
82         lstrings.h \
83         lyxalgo.h \
84         lyxlib.h \
85         lyxmagic.h \
86         lyxtime.cpp \
87         lyxtime.h \
88         mutex.h \
89         mutex.cpp \
90         Messages.cpp \
91         Messages.h \
92         numpunct_lyx_char_type.h \
93         os.cpp \
94         os.h \
95         PathChanger.cpp \
96         PathChanger.h \
97         Package.cpp \
98         Package.h \
99         ProgressInterface.h \
100         pmprof.h \
101         qstring_helpers.cpp \
102         qstring_helpers.h \
103         regex.h \
104         signals.h \
105         socktools.cpp \
106         socktools.h \
107         strfwd.h \
108         Systemcall.cpp \
109         Systemcall.h \
110         SystemcallPrivate.h \
111         TempFile.cpp \
112         TempFile.h \
113         textutils.h \
114         Translator.h \
115         Timeout.cpp \
116         Timeout.h \
117         trivstring.cpp \
118         trivstring.h \
119         types.h \
120         unique_ptr.h \
121         userinfo.cpp \
122         userinfo.h \
123         unicode.cpp \
124         unicode.h \
125         weighted_btree.h
126
127 if INSTALL_MACOSX
128 liblyxsupport_a_SOURCES += \
129         AppleSpeller.h \
130         AppleSpeller.m \
131         AppleScript.h \
132         AppleScript.m \
133         AppleScriptProxy.cpp \
134         AppleSupport.h \
135         AppleSupport.m \
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 = \
171         -framework QtCore -framework AppKit -framework ApplicationServices \
172         -Wl,-rpath,@loader_path/../Frameworks \
173         -Wl,-rpath,@executable_path/../Frameworks \
174         -Wl,-headerpad_max_install_names
175 endif
176
177 check_convert_LDADD = liblyxsupport.a $(LIBICONV) $(QT_CORE_LIBS) $(LIBSHLWAPI) @LIBS@
178 check_convert_LDFLAGS = $(QT_CORE_LDFLAGS) $(ADD_FRAMEWORKS)
179 check_convert_SOURCES = \
180         tests/check_convert.cpp \
181         tests/dummy_functions.cpp \
182         tests/boost.cpp
183
184 check_filetools_LDADD = liblyxsupport.a $(LIBICONV) $(QT_CORE_LIBS) $(LIBSHLWAPI) @LIBS@
185 check_filetools_LDFLAGS = $(QT_CORE_LDFLAGS) $(ADD_FRAMEWORKS)
186 check_filetools_SOURCES = \
187         tests/check_filetools.cpp \
188         tests/dummy_functions.cpp \
189         tests/boost.cpp
190
191 check_lstrings_LDADD = liblyxsupport.a $(LIBICONV) $(QT_CORE_LIBS) $(LIBSHLWAPI) @LIBS@
192 check_lstrings_LDFLAGS = $(QT_CORE_LDFLAGS) $(ADD_FRAMEWORKS)
193 check_lstrings_SOURCES = \
194         tests/check_lstrings.cpp \
195         tests/dummy_functions.cpp \
196         tests/boost.cpp
197
198 check_trivstring_LDADD = liblyxsupport.a $(LIBICONV) $(QT_CORE_LIBS) $(LIBSHLWAPI) @LIBS@
199 check_trivstring_LDFLAGS = $(QT_CORE_LDFLAGS) $(ADD_FRAMEWORKS)
200 check_trivstring_SOURCES = \
201         tests/check_trivstring.cpp \
202         tests/dummy_functions.cpp \
203         tests/boost.cpp
204
205 makeregfiles: ${check_PROGRAMS}
206         for all in ${check_PROGRAMS} ; do \
207                 ./$$all > ${srcdir}/tests/regfiles/$$all ; \
208         done