Code

Make dist fixes for src/ directory.
[inkscape.git] / src / Makefile.am
1 ## Process this file with automake to produce Makefile.in
3 # ################################################
4 #  G L O B A L
5 # ################################################
7 # Should work in either automake1.7 or 1.8, but 1.6 doesn't
8 # handle foo/libfoo_a_CPPFLAGS properly (if at all).
9 # Update: We now avoid setting foo/libfoo_a_CPPFLAGS,
10 # so perhaps 1.6 will work.
11 AUTOMAKE_OPTIONS = 1.7 subdir-objects
13 # Executables compiled by "make" and installed by "make install"
14 bin_PROGRAMS = inkscape inkview
16 # Libraries which should be compiled by "make" but not installed.
17 # Use this only for libraries that are really standalone, rather than for
18 # source tree subdirectories.
19 #if WITH_INKBOARD
20 #libpedro = pedro/libpedro.a
21 #endif
22 noinst_LIBRARIES =      \
23         libinkscape.a           \
24         dom/libdom.a            \
25         libcroco/libcroco.a     \
26         libavoid/libavoid.a     \
27         libgdl/libgdl.a         \
28         libcola/libcola.a       \
29         libvpsc/libvpsc.a       \
30         livarot/libvarot.a      \
31         2geom/lib2geom.a        \
32         $(libpedro)             \
33         libinkversion.a
35 all_libs =                      \
36         $(noinst_LIBRARIES)     \
37         $(INKSCAPE_LIBS)        \
38         $(GNOME_VFS_LIBS)       \
39         $(XFT_LIBS)             \
40         $(FREETYPE_LIBS)        \
41         $(kdeldadd)             \
42         $(win32ldflags)         \
43         $(CARBON_LDFLAGS)       \
44         $(PERL_LIBS)            \
45         $(PYTHON_LIBS)          \
46         $(INKBOARD_LIBS)        \
47         $(LIBWPG_LIBS)          \
48         $(IMAGEMAGICK_LIBS)
50 # Add sources common for Inkscape and Inkview to this variable.
51 ink_common_sources =
52 # Add Inkscape-only sources here.
53 inkscape_SOURCES =
54 # Add Inkview-only sources here.
55 inkview_SOURCES =
57 INCLUDES =      \
58         $(PERL_CFLAGS) $(PYTHON_CFLAGS) \
59         $(FREETYPE_CFLAGS)      \
60         $(GNOME_PRINT_CFLAGS)   \
61         $(GNOME_VFS_CFLAGS)     \
62         $(IMAGEMAGICK_CFLAGS) \
63         $(INKBOARD_CFLAGS) \
64         $(LIBWPG_CFLAGS) \
65         $(XFT_CFLAGS)   \
66         $(LCMS_CFLAGS)  \
67         $(POPPLER_CFLAGS)       \
68         $(POPPLER_GLIB_CFLAGS)  \
69         -DPOTRACE=\"potrace\"   \
70         $(INKSCAPE_CFLAGS) \
71         -I$(top_srcdir)/cxxtest \
72         $(WIN32_CFLAGS) \
73         -I$(srcdir)/bind/javainc \
74         -I$(srcdir)/bind/javainc/linux \
75         $(AM_CPPFLAGS)
77 CXXTEST_TEMPLATE = $(srcdir)/cxxtest-template.tpl
78 CXXTESTGENFLAGS = --root --have-eh --template=$(CXXTEST_TEMPLATE)
79 CXXTESTGEN = $(top_srcdir)/cxxtest/cxxtestgen.pl $(CXXTESTGENFLAGS)
80 # Add test cases to this variable
81 CXXTEST_TESTSUITES =
83 # ################################################
84 #
85 #  E X T R A 
86 #
87 # ################################################
89 if PLATFORM_WIN32
90 win32_sources = winmain.cpp registrytool.cpp registrytool.h
91 win32ldflags = -lcomdlg32 -lmscms
92 mwindows = -mwindows
93 endif 
95 if INKJAR
96 inkjar_dir = inkjar
97 inkjar_libs = inkjar/libinkjar.a
98 endif
100 # Include all partial makefiles from subdirectories
101 include Makefile_insert
102 include application/Makefile_insert
103 include bind/Makefile_insert
104 include dialogs/Makefile_insert
105 include display/Makefile_insert
106 include dom/Makefile_insert
107 include extension/Makefile_insert
108 include extension/implementation/Makefile_insert
109 include extension/internal/Makefile_insert
110 include extension/script/Makefile_insert
111 include filters/Makefile_insert
112 include helper/Makefile_insert
113 include io/Makefile_insert
114 #include pedro/Makefile_insert
115 #include jabber_whiteboard/Makefile_insert
116 include libcroco/Makefile_insert
117 include libgdl/Makefile_insert
118 include libnr/Makefile_insert
119 include libnrtype/Makefile_insert
120 include libavoid/Makefile_insert
121 include livarot/Makefile_insert
122 include live_effects/Makefile_insert
123 include live_effects/parameter/Makefile_insert
124 include libvpsc/Makefile_insert
125 include libcola/Makefile_insert
126 include svg/Makefile_insert
127 include widgets/Makefile_insert
128 include debug/Makefile_insert
129 include xml/Makefile_insert
130 include ui/Makefile_insert
131 include ui/cache/Makefile_insert
132 include ui/dialog/Makefile_insert
133 include ui/tool/Makefile_insert
134 include ui/view/Makefile_insert
135 include ui/widget/Makefile_insert
136 include util/Makefile_insert
137 include trace/Makefile_insert
138 include 2geom/Makefile_insert
140 # Extra files not mentioned as sources to include in the source tarball
141 EXTRA_DIST =    \
142         $(top_srcdir)/Doxyfile  \
143         sp-skeleton.cpp sp-skeleton.h   \
144         util/makefile.in        \
145         application/makefile.in \
146         bind/makefile.in        \
147         debug/makefile.in       \
148         dialogs/makefile.in     \
149         display/makefile.in     \
150         dom/makefile.in         \
151         extension/implementation/makefile.in    \
152         extension/internal/makefile.in  \
153         extension/makefile.in   \
154         extension/script/makefile.in    \
155         filters/makefile.in \
156         helper/makefile.in      \
157         io/makefile.in  \
158         io/crystalegg.xml       \
159         io/doc2html.xsl         \
160         pedro/makefile.in       \
161         jabber_whiteboard/makefile.in   \
162         libgdl/makefile.in      \
163         libcroco/makefile.in    \
164         libnr/makefile.in       \
165         libnrtype/makefile.in   \
166         libavoid/makefile.in    \
167         livarot/makefile.in     \
168         live_effects/makefile.in        \
169         live_effects/parameter/makefile.in      \
170         svg/makefile.in         \
171         trace/makefile.in       \
172         ui/makefile.in          \
173         ui/cache/makefile.in    \
174         ui/dialog/makefile.in   \
175         ui/view/makefile.in     \
176         ui/widget/makefile.in   \
177         util/makefile.in        \
178         widgets/makefile.in     \
179         xml/makefile.in         \
180         2geom/makefile.in       \
181         extension/internal/win32.cpp    \
182         extension/internal/win32.h      \
183         extension/internal/emf-win32-inout.cpp  \
184         extension/internal/emf-win32-inout.h    \
185         extension/internal/emf-win32-print.cpp  \
186         extension/internal/emf-win32-print.h    \
187         helper/sp-marshal.list  \
188         show-preview.bmp \
189         $(jabber_whiteboard_SOURCES) \
190         $(CXXTEST_TEMPLATE)
192 # Extra files to remove when doing "make distclean"
193 DISTCLEANFILES =        \
194         helper/sp-marshal.cpp   \
195         helper/sp-marshal.h     \
196         inkscape-version.cpp
198 # ################################################
199 #  B I N A R I E S
200 # ################################################
202 # this should speed up the build
203 libinkscape_a_SOURCES = $(ink_common_sources)
205 inkscape_SOURCES += main.cpp $(win32_sources)
206 inkscape_LDADD = $(all_libs)
207 inkscape_LDFLAGS = --export-dynamic $(kdeldflags) $(mwindows)
209 inkview_SOURCES += inkview.cpp $(win32_sources)
210 inkview_LDADD = $(all_libs)
211 inkview_LDFLAGS = $(mwindows) 
213 # ################################################
214 #  VERSION REPORTING
215 # ################################################
217 libinkversion_a_SOURCES = inkscape-version.cpp inkscape-version.h
219 if USE_BZR_VERSION
220 inkscape_version_deps = $(top_srcdir)/.bzr/branch/last-revision
221 endif
223 # If this is an BZR snapshot build, regenerate this file every time
224 # someone updates the BZR working directory.
225 inkscape-version.cpp: $(inkscape_version_deps)
226         VER_PREFIX="$(VERSION)";\
227         VER_BZRREV=" r`bzr revno`"; \
228         if test ! -z "`bzr status -S -V $(srcdir)`"; then \
229             VER_CUSTOM=" custom"; \
230         fi; \
231         VERSION="$$VER_PREFIX$$VER_BZRREV$$VER_CUSTOM"; \
232         echo "namespace Inkscape { " \
233              "char const *version_string = \"$$VERSION\"; " \
234              "}" > inkscape-version.new.cpp; \
235         if cmp -s inkscape-version.new.cpp inkscape-version.cpp; then \
236              rm inkscape-version.new.cpp; \
237         else \
238              mv inkscape-version.new.cpp inkscape-version.cpp; \
239         fi; \
240         echo $$VERSION
242 # #################################
243 # ## TESTING STUFF (make check) ###
244 # #################################
246 # List of all programs that should be built before testing. Note that this is
247 # different from TESTS, because some tests can be scripts that don't
248 # need to be built. There should be one test program per directory.
249 # automake adds $(EXEEXT) to check_PROGRAMS items but not to TESTS items:
250 # TESTS items can be scripts etc.
251 check_PROGRAMS = cxxtests
253 # streamtest is unfinished and can't handle the relocations done during
254 # "make distcheck".
256 # List of all tests to be run.
257 TESTS = $(check_PROGRAMS) ../share/extensions/test/run-all-extension-tests
258 XFAIL_TESTS = $(check_PROGRAMS) ../share/extensions/test/run-all-extension-tests
260 # including the the testsuites here ensures that they get distributed
261 cxxtests_SOURCES = cxxtests.cpp libnr/nr-compose-reference.cpp $(CXXTEST_TESTSUITES)
262 cxxtests_LDADD = $(all_libs)
264 cxxtests.cpp: $(CXXTEST_TESTSUITES) $(CXXTEST_TEMPLATE)
265         $(CXXTESTGEN) -o cxxtests.cpp $(CXXTEST_TESTSUITES)
267 # ################################################
268 #  D I S T
269 # ################################################
271 dist-hook:
272         mkdir $(distdir)/pixmaps
273         cp $(srcdir)/pixmaps/*xpm $(distdir)/pixmaps
275 distclean-local:
276         rm -f cxxtests.xml cxxtests.log