-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
54 lines (42 loc) · 2.14 KB
/
build.xml
File metadata and controls
54 lines (42 loc) · 2.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?xml version="1.0" encoding="UTF-8"?>
<project name="http-parser" default="build" basedir=".">
<property file="${user.home}/.avatar-js.properties"/>
<import file="${avatar-js.home}/common.xml"/>
<target name="setup" depends="init, copy-source-files"/>
<target name="build" depends="setup, jar"/>
<target name="init" depends="common-init">
<property name="product.name" value="http-parser-java"/>
<property name="build.type" value="Debug"/>
<property name="src.java.dir" location="src/main/java"/>
<property name="test.java.dir" location="src/test/java"/>
<property name="javac.debug" value="true"/>
<property name="javac.debuglevel" value="lines"/>
<path id="javac.classpath.id"/>
<path id="javac.test.classpath.id"/>
</target>
<target name="javah" depends="compile">
<javah destdir="${native.build.dir}" classpath="${classes.dir}">
<class name="com.oracle.httpparser.HttpParser"/>
</javah>
</target>
<target name="copy-source-files">
<property name="native.build.dir" value="${basedir}/out/${build.type}/obj.target/${product.name}/"/>
<copy todir="${native.build.dir}">
<fileset dir="${source.home}/deps/http_parser" includes="**/http_parser.c"/>
<fileset dir="${source.home}/deps/http_parser" includes="**/http_parser.h"/>
</copy>
</target>
<target name="configure-unix" depends="config-gyp" if="isLinux">
<gyp format="make" library="shared_library" target="${build.type}"/>
</target>
<target name="configure-mac" depends="config-gyp" if="isMacOSX">
<gyp format="make" library="shared_library" target="${build.type}"/>
</target>
<target name="configure-windows" depends="config-gyp" if="isWindows">
<gyp format="msvs" library="shared_library" target="${build.type}"/>
</target>
<target name="jar" depends="setup, compile, make, shlib-linux, shlib-macos, shlib-windows">
<property name="product.jar" value="${dist.dir}/${product.name}.jar"/>
<jar basedir="${classes.dir}" destfile="${product.jar}"/>
</target>
</project>