]> git.lyx.org Git - lyx.git/blob - src/support/Makefile.am
fix warning on possibly(?) unused precompiled headers due to different -fPic settings...
[lyx.git] / src / support / Makefile.am
1 include $(top_srcdir)/config/common.am
2
3 CLEANFILES += $(BUILT_SOURCES)
4
5 EXTRA_DIST = Package.cpp.in pch.h \
6         os_cygwin.cpp os_unix.cpp os_win32.cpp os_win32.h
7
8 pkglib_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) Package.cpp
14
15 AM_CPPFLAGS += $(PCH_FLAGS) -I$(srcdir)/.. $(BOOST_INCLUDES)
16 AM_CPPFLAGS += $(QT4_CPPFLAGS) $(QT4_CORE_INCLUDES)
17
18 liblyxsupport_la_SOURCES = \
19         FileMonitor.h \
20         FileMonitor.cpp \
21         RandomAccessList.h \
22         abort.cpp \
23         chdir.cpp \
24         convert.cpp \
25         convert.h \
26         copy.cpp \
27         copied_ptr.h \
28         cow_ptr.h \
29         debugstream.h \
30         docstream.cpp \
31         docstream.h \
32         docstring.cpp \
33         docstring.h \
34         environment.h \
35         environment.cpp \
36         ExceptionMessage.h \
37         FileFilterList.cpp \
38         FileFilterList.h \
39         FileName.cpp \
40         FileName.h \
41         filetools.cpp \
42         filetools.h \
43         Forkedcall.cpp \
44         Forkedcall.h \
45         ForkedCallQueue.cpp \
46         ForkedCallQueue.h \
47         ForkedcallsController.cpp \
48         ForkedcallsController.h \
49         fs_extras.cpp \
50         fs_extras.h \
51         getcwd.cpp \
52         gzstream.cpp \
53         gzstream.h \
54         kill.cpp \
55         limited_stack.h \
56         lstrings.cpp \
57         lstrings.h \
58         lyxalgo.h \
59         lyxlib.h \
60         lyxmanip.h \
61         lyxtime.cpp \
62         lyxtime.h \
63         lyxsum.cpp \
64         mkdir.cpp \
65         os.cpp \
66         os.h \
67         Path.cpp \
68         Path.h \
69         Package.cpp \
70         Package.h \
71         qstring_helpers.cpp \
72         qstring_helpers.h \
73         rename.cpp \
74         socktools.cpp \
75         socktools.h \
76         std_istream.h \
77         std_ostream.h \
78         Systemcall.cpp \
79         Systemcall.h \
80         tempname.cpp \
81         textutils.cpp \
82         textutils.h \
83         Translator.h \
84         Timeout.cpp \
85         Timeout.h \
86         types.h \
87         userinfo.cpp \
88         userinfo.h \
89         unicode.cpp \
90         unicode.h \
91         unlink.cpp
92
93
94 Package.cpp: build_package
95
96 # Solaris sed does not like spaces bewteen the ;-delimited commands
97 build_package: Package.cpp.in
98         @rm -f tmp_package ;\
99         sed "s,@LYX_DIR@,$(LYX_ABS_INSTALLED_DATADIR),;\
100 s,@LOCALEDIR@,$(LYX_ABS_INSTALLED_LOCALEDIR),;\
101 s,@TOP_SRCDIR@,$(LYX_ABS_TOP_SRCDIR),;\
102 s,@PROGRAM_SUFFIX@,$(program_suffix)," \
103                 $(srcdir)/Package.cpp.in > tmp_package ;\
104         if cmp -s tmp_package Package.cpp ; then \
105                 rm -f tmp_package ;\
106         else \
107                 rm -f Package.cpp ;\
108                 mv tmp_package Package.cpp ;\
109         fi
110
111
112 ############################## Tests ##################################
113
114 EXTRA_DIST += test_convert test_filetools test_lstrings regfiles
115
116 TESTS = \
117         test_convert \
118         test_filetools \
119         test_lstrings
120
121 check_PROGRAMS = \
122         check_convert \
123         check_filetools \
124         check_lstrings
125
126 check_convert_LDADD = ../debug.o convert.o docstring.o lstrings.o unicode.o \
127         qstring_helpers.o $(BOOST_LIBS) $(QT4_CORE_LIB)
128 check_convert_LDFLAGS = $(QT4_CORE_LDFLAGS)
129 check_convert_SOURCES = \
130         tests/check_convert.cpp \
131         tests/boost.cpp
132
133 check_filetools_LDADD = ../debug.o libsupport.la $(BOOST_LIBS)
134 check_filetools_SOURCES = \
135         tests/check_filetools.cpp \
136         tests/boost.cpp
137
138 check_lstrings_LDADD = ../debug.o lstrings.o convert.o docstring.o unicode.o \
139         qstring_helpers.o $(QT4_CORE_LIB)
140 check_lstrings_LDFLAGS = $(QT4_CORE_LDFLAGS)
141 check_lstrings_SOURCES = \
142         tests/check_lstrings.cpp \
143         tests/boost.cpp
144
145 makeregfiles: ${check_PROGRAMS}
146         for all in ${check_PROGRAMS} ; do \
147                 ./$$all > ${srcdir}/regfiles/$$all ; \
148         done