]> git.lyx.org Git - lyx.git/blob - src/support/Makefile.am
d6b5c84a01e95ff799574d9ca0194933fbcd4cb8
[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
8 noinst_LTLIBRARIES = liblyxsupport.la
9
10 liblyxsupport_la_LIBADD = $(LIBSHLWAPI) $(QT4_CORE_LIB) $(BOOST_SIGNALS)
11 liblyxsupport_la_LDFLAGS = $(QT4_CORE_LDFLAGS)
12
13 BUILT_SOURCES = $(PCH_FILE)
14
15 #########################  Qt stuff  #############################
16 #
17
18 MOCHEADER = SignalSlotPrivate.h
19
20 MOCEDFILES = $(MOCHEADER:%.h=%_moc.cpp)
21
22 CLEANFILES += $(MOCEDFILES)
23 BUILT_SOURCES += $(MOCEDFILES)
24
25 %_moc.cpp: %.h
26         $(MOC4) -o $@ $<
27
28 liblyxsupport_la_DEPENDENCIES = $(MOCEDFILES)
29
30 #
31 ##################################################################
32
33 AM_CPPFLAGS += $(PCH_FLAGS) -I$(srcdir)/.. $(BOOST_INCLUDES)
34 AM_CPPFLAGS += $(QT4_CPPFLAGS) $(QT4_CORE_INCLUDES) -I$(srcdir)/minizip
35
36 # force the use of C++ compiler for minizip/*.c files, because
37 # gcc can not go through the included boost files.
38 liblyxsupport_la_CFLAGS = -x c++
39
40 liblyxsupport_la_SOURCES = \
41         FileMonitor.h \
42         FileMonitor.cpp \
43         RandomAccessList.h \
44         assert.h \
45         convert.cpp \
46         convert.h \
47         copied_ptr.h \
48         debug.cpp \
49         debug.h \
50         docstream.cpp \
51         docstream.h \
52         docstring.cpp \
53         docstring.h \
54         environment.h \
55         environment.cpp \
56         ExceptionMessage.h \
57         FileFilterList.cpp \
58         FileFilterList.h \
59         FileName.cpp \
60         FileName.h \
61         FileNameList.h \
62         filetools.cpp \
63         filetools.h \
64         FileZipListDir.h \
65         foreach.h \
66         ForkedCalls.cpp \
67         ForkedCalls.h \
68         gettext.cpp \
69         gettext.h \
70         gzstream.cpp \
71         gzstream.h \
72         kill.cpp \
73         limited_stack.h \
74         lstrings.cpp \
75         lstrings.h \
76         lyxalgo.h \
77         lyxlib.h \
78         lyxtime.cpp \
79         lyxtime.h \
80         lyxsum.cpp \
81         Messages.cpp \
82         Messages.h \
83         os.cpp \
84         os.h \
85         Path.cpp \
86         Path.h \
87         Package.cpp \
88         Package.h \
89         qstring_helpers.h \
90         socktools.cpp \
91         socktools.h \
92         strfwd.h \
93         Systemcall.cpp \
94         Systemcall.h \
95         SignalSlot.cpp \
96         SignalSlot.h \
97         SignalSlotPrivate.cpp \
98         SignalSlotPrivate.h \
99         textutils.h \
100         Translator.h \
101         Timeout.cpp \
102         Timeout.h \
103         types.h \
104         userinfo.cpp \
105         userinfo.h \
106         unicode.cpp \
107         unicode.h \
108         weighted_btree.h \
109         minizip/crypt.h \
110         minizip/ioapi.c \
111         minizip/ioapi.h \
112         minizip/iowin32.c \
113         minizip/iowin32.h \
114         minizip/unzip.c \
115         minizip/unzip.h \
116         minizip/zip.c \
117         minizip/zip.h \
118         minizip/zipunzip.cpp
119
120 if INSTALL_MACOSX
121 liblyxsupport_la_SOURCES += \
122         linkback/LinkBack.h \
123         linkback/LinkBack.m \
124         linkback/LinkBackProxy.h \
125         linkback/LinkBackProxy.m \
126         linkback/LinkBackServer.h \
127         linkback/LinkBackServer.m
128 endif
129
130 ############################## Tests ##################################
131
132 EXTRA_DIST += \
133         tests/test_convert \
134         tests/test_filetools \
135         tests/test_lstrings \
136         tests/regfiles/convert \
137         tests/regfiles/filetools \
138         tests/regfiles/lstrings
139
140
141 TESTS = \
142         tests/test_convert \
143         tests/test_filetools \
144         tests/test_lstrings
145
146 check_PROGRAMS = \
147         check_convert \
148         check_filetools \
149         check_lstrings
150
151 check_convert_LDADD = liblyxsupport.la  \
152         $(BOOST_LIBS) $(QT4_CORE_LIB)
153 check_convert_LDFLAGS = $(QT4_CORE_LDFLAGS)
154 check_convert_SOURCES = \
155         tests/check_convert.cpp \
156         tests/boost.cpp
157
158 check_filetools_LDADD = liblyxsupport.la $(BOOST_LIBS)
159 check_filetools_SOURCES = \
160         tests/check_filetools.cpp \
161         tests/boost.cpp
162
163 check_lstrings_LDADD = liblyxsupport.la $(BOOST_LIBS) $(QT4_CORE_LIB)
164 check_lstrings_LDFLAGS = $(QT4_CORE_LDFLAGS)
165 check_lstrings_SOURCES = \
166         tests/check_lstrings.cpp \
167         tests/boost.cpp
168
169 makeregfiles: ${check_PROGRAMS}
170         for all in ${check_PROGRAMS} ; do \
171                 ./$$all > ${srcdir}/tests/regfiles/$$all ; \
172         done