]> git.lyx.org Git - lyx.git/blob - src/support/Makefile.am
5744f815fa7673a5927cc0737adb27582070e8ec
[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 CLEANFILES += $(MOCEDFILES)
19 BUILT_SOURCES += $(MOCEDFILES)
20
21 MOCEDFILES = $(MOCHEADER:%.h=%_moc.cpp)
22
23 %_moc.cpp: %.h
24         $(MOC4) -o $@ $<
25
26 MOCHEADER =
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         convert.cpp \
45         convert.h \
46         copied_ptr.h \
47         debug.cpp \
48         debug.h \
49         docstream.cpp \
50         docstream.h \
51         docstring.cpp \
52         docstring.h \
53         environment.h \
54         environment.cpp \
55         ExceptionMessage.h \
56         FileFilterList.cpp \
57         FileFilterList.h \
58         FileName.cpp \
59         FileName.h \
60         filetools.cpp \
61         filetools.h \
62         ForkedCalls.cpp \
63         ForkedCalls.h \
64         gettext.cpp \
65         gettext.h \
66         gzstream.cpp \
67         gzstream.h \
68         kill.cpp \
69         limited_stack.h \
70         lstrings.cpp \
71         lstrings.h \
72         lyxalgo.h \
73         lyxlib.h \
74         lyxtime.cpp \
75         lyxtime.h \
76         lyxsum.cpp \
77         Messages.cpp \
78         Messages.h \
79         os.cpp \
80         os.h \
81         Path.cpp \
82         Path.h \
83         Package.cpp \
84         Package.h \
85         qstring_helpers.h \
86         socktools.cpp \
87         socktools.h \
88         strfwd.h \
89         Systemcall.cpp \
90         Systemcall.h \
91         SignalSlot.cpp \
92         SignalSlot.h \
93         SignalSlotPrivate.h \
94         textutils.h \
95         Translator.h \
96         Timeout.cpp \
97         Timeout.h \
98         types.h \
99         userinfo.cpp \
100         userinfo.h \
101         unicode.cpp \
102         unicode.h \
103         minizip/crypt.h \
104         minizip/ioapi.c \
105         minizip/ioapi.h \
106         minizip/iowin32.c \
107         minizip/iowin32.h \
108         minizip/unzip.c \
109         minizip/unzip.h \
110         minizip/zip.c \
111         minizip/zip.h \
112         minizip/zipunzip.cpp
113
114 if INSTALL_MACOSX
115 liblyxsupport_la_SOURCES += \
116         linkback/LinkBack.h \
117         linkback/LinkBack.m \
118         linkback/LinkBackProxy.h \
119         linkback/LinkBackProxy.m \
120         linkback/LinkBackServer.h \
121         linkback/LinkBackServer.m
122 endif
123
124 ############################## Tests ##################################
125
126 EXTRA_DIST += \
127         tests/test_convert \
128         tests/test_filetools \
129         tests/test_lstrings \
130         tests/regfiles/convert \
131         tests/regfiles/filetools \
132         tests/regfiles/lstrings
133
134
135 TESTS = \
136         test_convert \
137         test_filetools \
138         test_lstrings
139
140 check_PROGRAMS = \
141         check_convert \
142         check_filetools \
143         check_lstrings
144
145 check_convert_LDADD = ../debug.o convert.o docstring.o lstrings.o unicode.o \
146         $(BOOST_LIBS) $(QT4_CORE_LIB)
147 check_convert_LDFLAGS = $(QT4_CORE_LDFLAGS)
148 check_convert_SOURCES = \
149         tests/check_convert.cpp \
150         tests/boost.cpp
151
152 check_filetools_LDADD = ../debug.o libsupport.la $(BOOST_LIBS)
153 check_filetools_SOURCES = \
154         tests/check_filetools.cpp \
155         tests/boost.cpp
156
157 check_lstrings_LDADD = ../debug.o lstrings.o convert.o docstring.o unicode.o \
158         $(QT4_CORE_LIB)
159 check_lstrings_LDFLAGS = $(QT4_CORE_LDFLAGS)
160 check_lstrings_SOURCES = \
161         tests/check_lstrings.cpp \
162         tests/boost.cpp
163
164 makeregfiles: ${check_PROGRAMS}
165         for all in ${check_PROGRAMS} ; do \
166                 ./$$all > ${srcdir}/regfiles/$$all ; \
167         done