|
250 | 250 | <activation>
|
251 | 251 | <os>
|
252 | 252 | <family>linux</family>
|
| 253 | + <arch>x86_64</arch> |
253 | 254 | </os>
|
254 | 255 | </activation>
|
255 | 256 | <properties>
|
256 | 257 | <jni.platform>linux</jni.platform>
|
| 258 | + <jni.classifier>${os.detected.name}-x86_64</jni.classifier> |
257 | 259 | </properties>
|
258 | 260 | <build>
|
259 | 261 | <plugins>
|
|
313 | 315 | </plugins>
|
314 | 316 | </build>
|
315 | 317 | </profile>
|
| 318 | + <profile> |
| 319 | + <id>linux-arm64</id> |
| 320 | + <activation> |
| 321 | + <os> |
| 322 | + <family>linux</family> |
| 323 | + <arch>aarch64</arch> |
| 324 | + </os> |
| 325 | + </activation> |
| 326 | + <properties> |
| 327 | + <jni.platform>linux</jni.platform> |
| 328 | + <jni.classifier>${os.detected.name}-aarch_64</jni.classifier> |
| 329 | + </properties> |
| 330 | + <build> |
| 331 | + <plugins> |
| 332 | + <plugin> |
| 333 | + <artifactId>maven-antrun-plugin</artifactId> |
| 334 | + <executions> |
| 335 | + <!-- Build the additional JAR that contains the native library. --> |
| 336 | + <execution> |
| 337 | + <id>native-jar</id> |
| 338 | + <phase>package</phase> |
| 339 | + <goals> |
| 340 | + <goal>run</goal> |
| 341 | + </goals> |
| 342 | + <configuration> |
| 343 | + <target> |
| 344 | + <copy todir="${nativeJarWorkdir}"> |
| 345 | + <zipfileset src="${defaultJarFile}" /> |
| 346 | + </copy> |
| 347 | + <copy todir="${nativeJarWorkdir}" includeEmptyDirs="false"> |
| 348 | + <zipfileset dir="${nativeLibOnlyDir}" /> |
| 349 | + <regexpmapper handledirsep="yes" from="^(?:[^/]+/)*([^/]+)$" to="META-INF/native/lib/\1" /> |
| 350 | + </copy> |
| 351 | + <copy todir="${nativeJarWorkdir}" includeEmptyDirs="false"> |
| 352 | + <zipfileset dir="${nativeIncludeDir}" /> |
| 353 | + <regexpmapper handledirsep="yes" from="^(?:[^/]+/)*([^/]+)\.h$" to="META-INF/native/include/\1.h" /> |
| 354 | + </copy> |
| 355 | + <jar destfile="${nativeJarFile}" manifest="${nativeJarWorkdir}/META-INF/MANIFEST.MF" basedir="${nativeJarWorkdir}" index="true" excludes="META-INF/MANIFEST.MF,META-INF/INDEX.LIST" /> |
| 356 | + <attachartifact file="${nativeJarFile}" classifier="${jni.classifier}" type="jar" /> |
| 357 | + </target> |
| 358 | + </configuration> |
| 359 | + </execution> |
| 360 | + <!-- invoke the make file to build a static library --> |
| 361 | + <execution> |
| 362 | + <id>build-native-lib</id> |
| 363 | + <phase>generate-sources</phase> |
| 364 | + <goals> |
| 365 | + <goal>run</goal> |
| 366 | + </goals> |
| 367 | + <configuration> |
| 368 | + <target> |
| 369 | + <exec executable="${exe.make}" failonerror="true" resolveexecutable="true"> |
| 370 | + <env key="CC" value="${exe.compiler}" /> |
| 371 | + <env key="AR" value="${exe.archiver}" /> |
| 372 | + <env key="LIB_DIR" value="${nativeLibOnlyDir}" /> |
| 373 | + <env key="OBJ_DIR" value="${nativeObjsOnlyDir}" /> |
| 374 | + <env key="JNI_PLATFORM" value="${jni.platform}" /> |
| 375 | + <env key="CFLAGS" value="-g -O3 -Werror -Wno-attributes -fPIC -fno-omit-frame-pointer -Wunused-variable -march=armv8-a -mfpu=neon" /> |
| 376 | + <env key="LDFLAGS" value="-shared" /> |
| 377 | + <env key="LIB_NAME" value="${nativeLibName}" /> |
| 378 | + <env KEY="LIB_EXT" value="so" /> |
| 379 | + </exec> |
| 380 | + </target> |
| 381 | + </configuration> |
| 382 | + </execution> |
| 383 | + </executions> |
| 384 | + </plugin> |
| 385 | + </plugins> |
| 386 | + </build> |
| 387 | + </profile> |
316 | 388 | <profile>
|
317 | 389 | <id>windows</id>
|
318 | 390 | <activation>
|
|
0 commit comments