]> git.lyx.org Git - lyx.git/blob - src/support/Makefile.am
also check for moc files in src/support
[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         SystemcallPrivate.h
28
29 liblyxsupport_la_DEPENDENCIES = $(MOCEDFILES)
30
31 #
32 #################################################################
33
34 AM_CPPFLAGS += $(PCH_FLAGS) -I$(srcdir)/.. $(BOOST_INCLUDES)
35 AM_CPPFLAGS += $(QT4_CPPFLAGS) $(QT4_CORE_INCLUDES) -I$(srcdir)/minizip
36
37 # force the use of C++ compiler for minizip/*.c files, because
38 # gcc can not go through the included boost files.
39 liblyxsupport_la_CFLAGS = -x c++
40
41 liblyxsupport_la_SOURCES = \
42         $(MOCHEADER) \
43         FileMonitor.h \
44         FileMonitor.cpp \
45         RandomAccessList.h \
46         abort.cpp \
47         convert.cpp \
48         convert.h \
49         copy.cpp \
50         copied_ptr.h \
51         debug.cpp \
52         debug.h \
53         docstream.cpp \
54         docstream.h \
55         docstring.cpp \
56         docstring.h \
57         environment.h \
58         environment.cpp \
59         ExceptionMessage.h \
60         FileFilterList.cpp \
61         FileFilterList.h \
62         FileName.cpp \
63         FileName.h \
64         filetools.cpp \
65         filetools.h \
66         ForkedCalls.cpp \
67         ForkedCalls.h \
68         gettext.cpp \
69         gettext.h \
70         getcwd.cpp \
71         gzstream.cpp \
72         gzstream.h \
73         kill.cpp \
74         limited_stack.h \
75         lstrings.cpp \
76         lstrings.h \
77         lyxalgo.h \
78         lyxlib.h \
79         lyxtime.cpp \
80         lyxtime.h \
81         lyxsum.cpp \
82         Messages.cpp \
83         Messages.h \
84         mkdir.cpp \
85         os.cpp \
86         os.h \
87         Path.cpp \
88         Path.h \
89         Package.cpp \
90         Package.h \
91         qstring_helpers.h \
92         rename.cpp \
93         socktools.cpp \
94         socktools.h \
95         strfwd.h \
96         Systemcall.cpp \
97         Systemcall.h \
98         SystemcallPrivate.cpp \
99         ProgressInterface.h \
100         SignalSlot.cpp \
101         SignalSlot.h \
102         SignalSlotPrivate.h \
103         tempname.cpp \
104         textutils.h \
105         Translator.h \
106         Timeout.cpp \
107         Timeout.h \
108         types.h \
109         userinfo.cpp \
110         userinfo.h \
111         unicode.cpp \
112         unicode.h \
113         minizip/crypt.h \
114         minizip/ioapi.c \
115         minizip/ioapi.h \
116         minizip/iowin32.c \
117         minizip/iowin32.h \
118         minizip/unzip.c \
119         minizip/unzip.h \
120         minizip/zip.c \
121         minizip/zip.h \
122         minizip/zipunzip.cpp
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