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