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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
|
--- com.amd.aparapi.jni/build.xml.orig 2018-01-22 14:48:34 UTC
+++ com.amd.aparapi.jni/build.xml
@@ -71,6 +71,23 @@ First consider editing the properties in build.propert
</and>
</condition>
+ <available property="freebsd.opencl.exists" file="/usr/local/lib/libOpenCL.so" type="file"/>
+ <condition property="amd.app.sdk.dir" value="/usr/local">
+ <and>
+ <os name="FreeBSD" />
+ <isset property="freebsd.opencl.exists" />
+ <not>
+ <isset property="win32.amd.app.sdk.exists" />
+ </not>
+ <not>
+ <isset property="win64.amd.app.sdk.exists" />
+ </not>
+ <not>
+ <isset property="linux.amd.app.sdk.exists" />
+ </not>
+ </and>
+ </condition>
+
<echo message="amd.app.sdk.dir ${amd.app.sdk.dir}"/>
<!-- Check for Visual Studio Compiler -->
@@ -300,9 +317,16 @@ First consider editing the properties in build.propert
<not>
<os family="mac" />
</not>
+ <not>
+ <os name="FreeBSD" />
+ </not>
</and>
</condition>
+ <condition property="use.clang_freebsd">
+ <os name="FreeBSD" />
+ </condition>
+
<condition property="use.gcc_mac">
<os family="mac" />
</condition>
@@ -352,6 +376,9 @@ First consider editing the properties in build.propert
<os family="mac" />
</not>
<not>
+ <os name="FreeBSD" />
+ </not>
+ <not>
<isset property="amd.app.sdk.dir" />
</not>
</and>
@@ -485,6 +512,46 @@ First consider editing the properties in build.propert
</exec>
</target>
+ <target name="clang_freebsd" if="use.clang_freebsd">
+ <mkdir dir="${basedir}/dist"/>
+ <echo message="freebsdcc ${os.arch}" />
+ <exec executable="clang++" failonerror="true">
+ <arg value="-m${gcc.m.value}" />
+ <arg value="-std=gnu++98" />
+ <arg value="-O3" />
+ <arg value="-g" />
+ <arg value="-fPIC" />
+ <arg value="-DCL_USE_DEPRECATED_OPENCL_1_1_APIS"/>
+ <arg value="-I${java.home}/../include" />
+ <arg value="-I${java.home}/../include/freebsd" />
+ <arg value="-Iinclude" />
+ <arg value="-I/usr/local/include" />
+ <arg value="-Isrc/cpp" />
+ <arg value="-Isrc/cpp/runKernel" />
+ <arg value="-Isrc/cpp/invoke" />
+ <arg value="-shared" />
+ <arg value="-o" />
+ <arg value="${basedir}/dist/libaparapi.so" />
+ <arg value="src/cpp/runKernel/Aparapi.cpp" />
+ <arg value="src/cpp/runKernel/ArrayBuffer.cpp" />
+ <arg value="src/cpp/runKernel/AparapiBuffer.cpp" />
+ <arg value="src/cpp/runKernel/Config.cpp" />
+ <arg value="src/cpp/runKernel/JNIContext.cpp" />
+ <arg value="src/cpp/runKernel/KernelArg.cpp" />
+ <arg value="src/cpp/runKernel/ProfileInfo.cpp" />
+ <arg value="src/cpp/runKernel/Range.cpp" />
+ <arg value="src/cpp/invoke/OpenCLJNI.cpp" />
+ <arg value="src/cpp/invoke/OpenCLArgDescriptor.cpp" />
+ <arg value="src/cpp/invoke/OpenCLMem.cpp" />
+ <arg value="src/cpp/CLHelper.cpp" />
+ <arg value="src/cpp/classtools.cpp" />
+ <arg value="src/cpp/JNIHelper.cpp" />
+ <arg value="src/cpp/agent.cpp" />
+ <arg value="-L/usr/local/lib" />
+ <arg value="-lOpenCL" />
+ </exec>
+ </target>
+
<target name="gcc_mac" if="use.gcc_mac">
<mkdir dir="${basedir}/dist"/>
<echo message="gcc ${os.arch}" />
@@ -575,7 +642,7 @@ First consider editing the properties in build.propert
</exec>
</target>
- <target name="build" depends="clean, javah, msvc, gcc, gcc_mac" />
+ <target name="build" depends="clean, javah, msvc, gcc, gcc_mac, clang_freebsd" />
<target name="msvc_cltest" if="use.msvc">
<mkdir dir="${basedir}\dist"/>
@@ -627,6 +694,24 @@ First consider editing the properties in build.propert
</exec>
</target>
+ <target name="freebsd_cltest" if="use.clang_freebsd">
+ <mkdir dir="${basedir}/dist"/>
+ <echo message="clang cltest ${os.arch}" />
+ <exec executable="clang++" failonerror="true">
+ <arg value="-O3" />
+ <arg value="-g" />
+ <arg value="-fPIC" />
+ <arg value="-DCL_USE_DEPRECATED_OPENCL_1_1_APIS"/>
+ <arg value="-I${java.home}/../include" />
+ <arg value="-I${java.home}/../include/freebsd" />
+ <arg value="-I/usr/local/include" />
+ <arg value="src/cpp/cltest.cpp" />
+ <arg value="-L/usr/local/lib -lOpenCL" />
+ <arg value="-o" />
+ <arg value="${basedir}/dist/cltest" />
+ </exec>
+ </target>
+
<target name="gcc_cltest" if="use.gcc">
<mkdir dir="${basedir}/dist"/>
<echo message="gcc cltest ${os.arch}" />
@@ -674,6 +759,20 @@ First consider editing the properties in build.propert
</exec>
</target>
- <target name="cltest" depends="check,msvc_cltest,mac_cltest,gcc_cltest" />
- <target name="clt" depends="check,gcc_clt,mac_clt" />
+ <target name="freebsd_clt" if="use.clang_freebsd">
+ <mkdir dir="${basedir}/dist"/>
+ <echo message="clang clt ${os.arch}" />
+ <exec executable="clang++" failonerror="true">
+ <arg value="-O3" />
+ <arg value="-g" />
+ <arg value="-fPIC" />
+ <arg value="src/cpp/classtools.cpp" />
+ <arg value="src/cpp/classtoolstest.cpp" />
+ <arg value="-o" />
+ <arg value="${basedir}/clt" />
+ </exec>
+ </target>
+
+ <target name="cltest" depends="check,msvc_cltest,mac_cltest,freebsd_cltest,gcc_cltest" />
+ <target name="clt" depends="check,gcc_clt,mac_clt,freebsd_clt" />
</project>
|