build.xml revision 5469721c1092af35a9250a24eaf3b637f8b96481
<project name="Inkscape" default="dist" basedir=".">
<description>
Build file for the Inkscape SVG editor. This file
was written for GTK-2.10 on Win32, but it should work
well for other types of builds with only minor adjustments.
</description>
<!-- set global properties for this build -->
<property name="version" location="0.45"/>
<property name="src" location="src"/>
<property name="gtk" location="c:/gtk210"/>
<property name="lib" location="lib"/>
<property name="build" location="build"/>
<property name="dist" location="inkscape"/>
<target name="init">
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}"/>
<mkdir dir="${dist}"/>
<makefile file="config.h">
#ifndef _CONFIG_H_
#define _CONFIG_H_
#ifndef WIN32
#define WIN32
#endif
/*######################################
## This is for require-config.h, whose
## purpose I cannot fathom.
######################################*/
#define PACKAGE_TARNAME
/*######################################
#### RESOURCE DIRECTORIES
######################################*/
#define INKSCAPE_DATADIR "."
#define PACKAGE_LOCALE_DIR "locale"
/*######################################
#### OTHER DEFINITIONS
######################################*/
#define GETTEXT_PACKAGE "inkscape"
#define PACKAGE_STRING VERSION
#define HAVE_GETOPT_H 1
#define HAVE_STRING_H 1
#define HAVE_LIBINTL_H 1
#define HAVE_MALLOC_H 1
#define HAVE_STDLIB_H 1
#define HAVE_SYS_STAT_H 1
#define ENABLE_LCMS 1
#define ENABLE_NLS 1
#define HAVE_BIND_TEXTDOMAIN_CODESET 1
/* keep binreloc off */
#define BR_PTHREADS 0
#undef ENABLE_BINRELOC
/* CairoPDF options */
#define HAVE_CAIRO_PDF 1
#define PANGO_ENABLE_ENGINE 1
#define RENDER_WITH_PANGO_CAIRO 1
#define HAVE_GTK_WINDOW_FULLSCREEN 1
#define g_ascii_strtod fixed_g_ascii_strtod
#endif /* _CONFIG_H_ */
</makefile>
</target>
<target name="compile" depends="init"
description="compile the source " >
<!-- Compile from source to build -->
<cc cc="gcc" cxx="g++" destdir="${build}/obj">
<fileset dir="${src}">
<!-- THINGS TO EXCLUDE -->
<exclude name="ast/.*"/>
<exclude name="bonobo/.*"/>
<exclude name="deptool.cpp"/>
<exclude name="dialogs/filedialog-win32.cpp"/>
<exclude name="display/testnr.cpp"/>
<exclude name="display/bezier-utils-test.cpp"/>
<exclude name="dom/jsdombind.cpp"/>
<exclude name="dom/odf/SvgOdg.cpp"/>
<exclude name="extension/script/bindtest.cpp"/>
<exclude name="extension/script/cpptest.cpp"/>
<exclude name="extract-uri-test.cpp"/>
<exclude name="helper/units-test.cpp"/>
<exclude name="inkview.cpp"/>
<exclude name="libnr/in-svg-plane-test.cpp"/>
<exclude name="libnr/nr-compose-reference.cpp"/>
<exclude name="libnr/nr-compose-test.cpp"/>
<exclude name="libnr/nr-matrix-test.cpp"/>
<exclude name="libnr/nr-point-fns-test.cpp"/>
<exclude name="libnr/nr-rotate-fns-test.cpp"/>
<exclude name="libnr/nr-rotate-test.cpp"/>
<exclude name="libnr/nr-scale-test.cpp"/>
<exclude name="libnr/nr-translate-test.cpp"/>
<exclude name="libnr/nr-types-test.cpp"/>
<exclude name="livarot/Path-test.cpp"/>
<exclude name="mod360-test.cpp"/>
<exclude name="trace/potrace/potest.cpp"/>
<exclude name="round-test.cpp"/>
<exclude name="sp-gradient-test.cpp"/>
<exclude name="utest/.*"/>
<exclude name="widgets/test-widgets.cpp"/>
<exclude name="xml/quote-test.cpp"/>
<exclude name="xml/repr-action-test.cpp"/>
<exclude name="io/streamtest.cpp"/>
<!--JABBER-->
<exclude name="pedro/pedrogui.cpp"/>
<exclude name="pedro/pedrogui.h"/>
<!--WHITEBOARD-->
<exclude name="ui/dialog/session-player.cpp"/>
<exclude name="ui/dialog/whiteboard-connect.cpp"/>
<exclude name="ui/dialog/whiteboard-sharewithchat.cpp"/>
<exclude name="ui/dialog/whiteboard-sharewithuser.cpp"/>
<exclude name="dialogs/whiteboard-connect-dialog.cpp"/>
<exclude name="dialogs/whiteboard-common-dialog.cpp"/>
<exclude name="dialogs/whiteboard-sharewithchat-dialog.cpp"/>
<exclude name="dialogs/whiteboard-sharewithuser-dialog.cpp"/>
<exclude name="jabber_whiteboard/node-tracker.cpp"/>
<exclude name="jabber_whiteboard/node-utilities.cpp"/>
<!--WHITEBOARD-->
<exclude name="removeoverlap/placement_SolveVPSC.cpp"/>
<exclude name="removeoverlap/placement_SolveVPSC.h"/>
<exclude name="removeoverlap/test.cpp"/>
<exclude name="removeoverlap/remove_rectangle_overlap-test.cpp"/>
<exclude name="removeoverlap/remove_rectangle_overlap-test.h"/>
</fileset>
<flags>
-Wall -g -O3
-mms-bitfields
</flags>
<defines>
-DVERSION=\"${version}\"
-DHAVE_CONFIG_H
-DXP_WIN <!-- for JS -->
-D_INTL_REDIRECT_INLINE
-DWITH_INKBOARD -DHAVE_SSL <!-- inkboard -->
</defines>
<includes>
-I${gtk}/include
<!-- GTK / GTKMM -->
-I${gtk}/include/glibmm-2.4
-I${gtk}/include/pangomm-1.4
-I${gtk}/include/cairomm-1.0
<!-- OTHER -->
<!-- PERL -->
<!-- PYTHON -->
</includes>
</cc>
</target>
<target name="lib" depends="compile">
<staticlib file="${build}/libinkscape.a">
<fileset dir="${build}/obj">
<exclude name="main,o"/>
<exclude name="winmain,o"/>
</fileset>
</staticlib>
</target>
<target name="i18n" depends="compile">
<msgfmt todir="${build}/locale" owndir="true">
<fileset dir="po">
</fileset>
</msgfmt>
</target>
<target name="link" depends="lib">
<rc command="windres -o"
file="${src}/inkscape.rc"
out="${build}/inkres.o">
<flags>
--include-dir=${src}
</flags>
</rc>
<flags>
</flags>
<fileset dir="${build}">
<include name="inkres.o"/>
<include name="libinkscape.a"/>
</fileset>
<libs>
-L${gtk}/lib
-lgtkmm-2.4 -lgdkmm-2.4 -lglibmm-2.4
-latkmm-1.6 -lpangomm-1.4 -lsigc-2.0
-lgtk-win32-2.0 -lgdk-win32-2.0 -latk-1.0
-lgdk_pixbuf-2.0
-lpangocairo-1.0 -lpangoft2-1.0 -lpangowin32-1.0 -lpango-1.0
-lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lglib-2.0 -lcairo
<!-- PERL -->
<!-- PYTHON -->
${gtk}/bin/libxml2.dll
-lssl -lcrypto
-lgc -mwindows -lws2_32 -lintl -lm
</libs>
</link>
<!--<strip file="${build}/inkscape.exe"/>-->
</target>
<target name="dist" depends="link,i18n"
description="generate the distribution" >
<!-- Create the distribution directory -->
<copy file="AUTHORS" todir="${dist}"/>
<copy file="COPYING" todir="${dist}"/>
<copy file="NEWS" todir="${dist}"/>
<copy file="README" todir="${dist}"/>
<copy file="TRANSLATORS" todir="${dist}"/>
<!-- MSGFMT files -->
<copy todir="${dist}">
<fileset dir="${build}/locale">
<exclude name=".*\.am"/>
</fileset>
</copy>
<!-- GTK -->
<copy todir="${dist}"> <fileset dir="${gtk}/etc"/> </copy>
<copy todir="${dist}">
<fileset dir="share">
<exclude name=".*\.am"/>
</fileset>
</copy>
<mkdir dir="${dist}/data"/>
<mkdir dir="${dist}/locale"/>
<mkdir dir="${dist}/modules"/>
<mkdir dir="${dist}/plugins"/>
<!-- PERL -->
<!-- PYTHON -->
</target>
<target name="clean"
description="clean up" >
<!-- Delete the ${build} and ${dist} directory trees -->
<delete dir="${build}"/>
<delete dir="${dist}"/>
</target>
</project>