@@ -50,6 +50,10 @@ SPDX-License-Identifier: Apache-2.0
5050 <condition property =" yices-java.installed" >
5151 <available file =" ${yices2.buildDir}/yices2_java_bindings/dist/lib" type =" dir" />
5252 </condition >
53+
54+ <condition property =" build.architecture" value =" arm64" else =" x64" >
55+ <os arch =" aarch64" />
56+ </condition >
5357 </target >
5458
5559 <target name =" download-cudd" depends =" build-initialize" unless =" cudd.downloaded" >
@@ -89,14 +93,14 @@ SPDX-License-Identifier: Apache-2.0
8993 <arg value =" clean" />
9094 </exec >
9195 </target >
92- <target name =" build-cudd-mac " depends =" download-cudd" unless =" cudd.installed" >
96+ <target name =" build-cudd-macOS " depends =" download-cudd" unless =" cudd.installed" >
9397 <exec executable =" aclocal" dir =" ${yices2.buildDir}/cudd" failonerror =" true" />
9498 <exec executable =" autoconf" dir =" ${yices2.buildDir}/cudd" failonerror =" true" />
9599 <exec executable =" automake" dir =" ${yices2.buildDir}/cudd" failonerror =" true" />
96100 <!-- macOS build -->
97101 <exec executable =" ./configure" dir =" ${yices2.buildDir}/cudd" failonerror =" true" >
98102 <env key =" CFLAGS" value =" -fPIC" />
99- <arg value =" --prefix=${yices2.buildDir}/cudd/install/arm64 -macos" />
103+ <arg value =" --prefix=${yices2.buildDir}/cudd/install/${build.architecture} -macos" />
100104 </exec >
101105 <exec executable =" make" dir =" ${yices2.buildDir}/cudd" failonerror =" true" >
102106 <arg value =" -j" />
@@ -146,13 +150,13 @@ SPDX-License-Identifier: Apache-2.0
146150 </exec >
147151 <delete dir =" ${yices2.buildDir}/libpoly/build" />
148152 </target >
149- <target name =" build-libpoly-mac " depends =" download-libpoly" unless =" libpoly.installed" >
153+ <target name =" build-libpoly-macOS " depends =" download-libpoly" unless =" libpoly.installed" >
150154 <!-- macOS build -->
151155 <mkdir dir =" ${yices2.buildDir}/libpoly/build" />
152156 <exec executable =" cmake" dir =" ${yices2.buildDir}/libpoly/build" failonerror =" true" >
153157 <arg value =" .." />
154158 <arg value =" -DCMAKE_BUILD_TYPE=Release" />
155- <arg value =" -DCMAKE_INSTALL_PREFIX=${yices2.buildDir}/libpoly/install/arm64 -macos" />
159+ <arg value =" -DCMAKE_INSTALL_PREFIX=${yices2.buildDir}/libpoly/install/${build.architecture} -macos" />
156160 <arg value =" -DGMP_INCLUDE_DIR=/opt/homebrew/include" />
157161 <arg value =" -DGMP_LIBRARY=/opt/homebrew/lib/libgmp.a" />
158162 <arg value =" -DLIBPOLY_BUILD_PYTHON_API=OFF" />
@@ -217,7 +221,8 @@ SPDX-License-Identifier: Apache-2.0
217221 <arg value =" OPTION=mingw32" />
218222 </exec >
219223 </target >
220- <target name =" build-yices2-mac" depends =" build-cudd-mac, build-libpoly-mac, download-yices2" unless =" yices.installed" >
224+ <target name =" build-yices2-macOS"
225+ depends =" build-cudd-macOS, build-libpoly-macOS, download-yices2" unless =" yices.installed" >
221226 <exec executable =" git" dir =" ${yices2.buildDir}/yices2" failonerror =" true" >
222227 <arg value =" apply" />
223228 <arg value =" ${basedir}/lib/native/source/yices2/yices.patch" />
@@ -227,11 +232,11 @@ SPDX-License-Identifier: Apache-2.0
227232 <mkdir dir =" ${yices2.buildDir}/yices2/install" />
228233 <!-- macOS build -->
229234 <exec executable =" ./configure" dir =" ${yices2.buildDir}/yices2" failonerror =" true" >
230- <env key =" LDFLAGS" value =" -L/opt/homebrew/lib -L${yices2.buildDir}/libpoly/install/arm64 -macos/lib -L${yices2.buildDir}/cudd/install/arm64 -macos/lib" />
231- <env key =" CFLAGS" value =" -I/opt/homebrew/include -I${yices2.buildDir}/libpoly/install/arm64 -macos/include -I${yices2.buildDir}/cudd/install/arm64 -macos/include" />
235+ <env key =" LDFLAGS" value =" -L/opt/homebrew/lib -L${yices2.buildDir}/libpoly/install/${build.architecture} -macos/lib -L${yices2.buildDir}/cudd/install/${build.architecture} -macos/lib" />
236+ <env key =" CFLAGS" value =" -I/opt/homebrew/include -I${yices2.buildDir}/libpoly/install/${build.architecture} -macos/include -I${yices2.buildDir}/cudd/install/${build.architecture} -macos/include" />
232237 <arg value =" --enable-mcsat" />
233238 <arg value =" --enable-thread-safety" />
234- <arg value =" --prefix=${yices2.buildDir}/yices2/install/arm64 -macos" />
239+ <arg value =" --prefix=${yices2.buildDir}/yices2/install/${build.architecture} -macos" />
235240 </exec >
236241 <exec executable =" make" dir =" ${yices2.buildDir}/yices2" failonerror =" true" >
237242 <arg value =" -j" />
@@ -295,8 +300,8 @@ SPDX-License-Identifier: Apache-2.0
295300 <arg value =" install" />
296301 </exec >
297302 </target >
298- <target name =" build-yices2-java-mac "
299- depends =" build-yices2-mac , download-yices2-java"
303+ <target name =" build-yices2-java-macOS "
304+ depends =" build-yices2-macOS , download-yices2-java"
300305 unless =" yices-java.installed" >
301306 <exec executable =" git" dir =" ${yices2.buildDir}/yices2_java_bindings" failonerror =" true" >
302307 <arg value =" apply" />
@@ -308,9 +313,9 @@ SPDX-License-Identifier: Apache-2.0
308313 <env key =" OS" value =" darwin" />
309314 <env key =" JNI_PATH" value =" ${java.home}/include" />
310315 <env key =" GMP_PATH" value =" /opt/homebrew" />
311- <env key =" CUDD_PATH" value =" ${yices2.buildDir}/cudd/install/arm64 -macos" />
312- <env key =" POLY_PATH" value =" ${yices2.buildDir}/libpoly/install/arm64 -macos" />
313- <env key =" YICES_PATH" value =" ${yices2.buildDir}/yices2/install/arm64 -macos" />
316+ <env key =" CUDD_PATH" value =" ${yices2.buildDir}/cudd/install/${build.architecture} -macos" />
317+ <env key =" POLY_PATH" value =" ${yices2.buildDir}/libpoly/install/${build.architecture} -macos" />
318+ <env key =" YICES_PATH" value =" ${yices2.buildDir}/yices2/install/${build.architecture} -macos" />
314319 <arg value =" install" />
315320 </exec >
316321 </target >
@@ -325,10 +330,10 @@ SPDX-License-Identifier: Apache-2.0
325330 </exec >
326331 </target >
327332
328- <target name =" publish-yices2-macos " depends =" load-ivy, build-yices2-java-mac"
333+ <target name =" publish-yices2-macOS " depends =" load-ivy, build-yices2-java-mac"
329334 description =" Compile Yices2 binaries for macOS" >
330- <mkdir dir =" lib/native/arm64 -macosx" />
331- <copy file =" ${yices2.buildDir}/yices2_java_bindings/dist/lib/libyices2java.dylib" tofile =" lib/native/arm64 -macosx/libyices2java.dylib" failonerror =" true" />
335+ <mkdir dir =" lib/native/${build.architecture} -macosx" />
336+ <copy file =" ${yices2.buildDir}/yices2_java_bindings/dist/lib/libyices2java.dylib" tofile =" lib/native/${build.architecture} -macosx/libyices2java.dylib" failonerror =" true" />
332337 </target >
333338
334339 <target name =" publish-yices2" depends =" load-ivy, build-yices2-java"
0 commit comments