2017-01-19 17:31:34 +01:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<!--
|
|
|
|
~ Copyright 2016 The Netty Project
|
|
|
|
~
|
|
|
|
~ The Netty Project licenses this file to you under the Apache License,
|
|
|
|
~ version 2.0 (the "License"); you may not use this file except in compliance
|
|
|
|
~ with the License. You may obtain a copy of the License at:
|
|
|
|
~
|
2020-10-23 14:44:18 +02:00
|
|
|
~ https://www.apache.org/licenses/LICENSE-2.0
|
2017-01-19 17:31:34 +01:00
|
|
|
~
|
|
|
|
~ Unless required by applicable law or agreed to in writing, software
|
|
|
|
~ distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
|
|
~ WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
|
|
~ License for the specific language governing permissions and limitations
|
|
|
|
~ under the License.
|
|
|
|
-->
|
2020-11-10 10:22:35 +01:00
|
|
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/maven-v4_0_0.xsd">
|
2017-01-19 17:31:34 +01:00
|
|
|
<modelVersion>4.0.0</modelVersion>
|
|
|
|
<parent>
|
|
|
|
<groupId>io.netty</groupId>
|
|
|
|
<artifactId>netty-parent</artifactId>
|
2021-04-01 12:50:23 +02:00
|
|
|
<version>4.1.64.Final-SNAPSHOT</version>
|
2017-01-19 17:31:34 +01:00
|
|
|
</parent>
|
|
|
|
<artifactId>netty-transport-native-unix-common</artifactId>
|
|
|
|
|
|
|
|
<name>Netty/Transport/Native/Unix/Common</name>
|
|
|
|
<packaging>jar</packaging>
|
|
|
|
<description>
|
|
|
|
Static library which contains common unix utilities.
|
|
|
|
</description>
|
|
|
|
|
|
|
|
<properties>
|
2017-09-23 08:52:39 +02:00
|
|
|
<javaModuleName>io.netty.transport.unix.common</javaModuleName>
|
|
|
|
|
2017-01-19 17:31:34 +01:00
|
|
|
<exe.make>make</exe.make>
|
|
|
|
<exe.compiler>gcc</exe.compiler>
|
|
|
|
<exe.archiver>ar</exe.archiver>
|
|
|
|
<nativeLibName>libnetty-unix-common</nativeLibName>
|
|
|
|
<nativeIncludeDir>${project.basedir}/src/main/c</nativeIncludeDir>
|
2020-12-19 10:37:32 +01:00
|
|
|
<jniUtilIncludeDir>${project.build.directory}/netty-jni-util/</jniUtilIncludeDir>
|
2017-01-19 17:31:34 +01:00
|
|
|
<nativeJarWorkdir>${project.build.directory}/native-jar-work</nativeJarWorkdir>
|
|
|
|
<nativeObjsOnlyDir>${project.build.directory}/native-objs-only</nativeObjsOnlyDir>
|
|
|
|
<nativeLibOnlyDir>${project.build.directory}/native-lib-only</nativeLibOnlyDir>
|
|
|
|
<defaultJarFile>${project.build.directory}/${project.build.finalName}.jar</defaultJarFile>
|
|
|
|
<nativeJarFile>${project.build.directory}/${project.build.finalName}-${jni.classifier}.jar</nativeJarFile>
|
|
|
|
</properties>
|
|
|
|
|
2019-08-23 09:30:27 +02:00
|
|
|
<build>
|
|
|
|
<plugins>
|
2020-10-29 16:36:07 +01:00
|
|
|
<plugin>
|
2020-12-19 10:37:32 +01:00
|
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
|
|
<artifactId>maven-dependency-plugin</artifactId>
|
2020-10-29 16:36:07 +01:00
|
|
|
<executions>
|
2020-12-19 10:37:32 +01:00
|
|
|
<!-- unpack netty-jni-util files -->
|
2020-10-29 16:36:07 +01:00
|
|
|
<execution>
|
2020-12-19 10:37:32 +01:00
|
|
|
<id>unpack</id>
|
2020-10-29 16:36:07 +01:00
|
|
|
<phase>generate-sources</phase>
|
|
|
|
<goals>
|
2020-12-19 10:37:32 +01:00
|
|
|
<goal>unpack-dependencies</goal>
|
2020-10-29 16:36:07 +01:00
|
|
|
</goals>
|
|
|
|
<configuration>
|
2020-12-19 10:37:32 +01:00
|
|
|
<includeGroupIds>io.netty</includeGroupIds>
|
|
|
|
<includeArtifactIds>netty-jni-util</includeArtifactIds>
|
|
|
|
<classifier>sources</classifier>
|
|
|
|
<outputDirectory>${jniUtilIncludeDir}</outputDirectory>
|
|
|
|
<includes>**.h,**.c</includes>
|
|
|
|
<overWriteReleases>false</overWriteReleases>
|
|
|
|
<overWriteSnapshots>true</overWriteSnapshots>
|
2020-10-29 16:36:07 +01:00
|
|
|
</configuration>
|
|
|
|
</execution>
|
|
|
|
</executions>
|
|
|
|
</plugin>
|
|
|
|
|
2019-08-23 09:30:27 +02:00
|
|
|
<!-- Also include c files in source jar -->
|
|
|
|
<plugin>
|
|
|
|
<groupId>org.codehaus.mojo</groupId>
|
|
|
|
<artifactId>build-helper-maven-plugin</artifactId>
|
|
|
|
<executions>
|
|
|
|
<execution>
|
|
|
|
<phase>generate-sources</phase>
|
|
|
|
<goals>
|
|
|
|
<goal>add-source</goal>
|
|
|
|
</goals>
|
|
|
|
<configuration>
|
|
|
|
<sources>
|
|
|
|
<source>${nativeIncludeDir}</source>
|
|
|
|
</sources>
|
|
|
|
</configuration>
|
|
|
|
</execution>
|
|
|
|
</executions>
|
|
|
|
</plugin>
|
|
|
|
</plugins>
|
|
|
|
</build>
|
|
|
|
|
2017-01-19 17:31:34 +01:00
|
|
|
<profiles>
|
|
|
|
<profile>
|
|
|
|
<id>mac</id>
|
|
|
|
<activation>
|
|
|
|
<os>
|
|
|
|
<family>mac</family>
|
|
|
|
</os>
|
|
|
|
</activation>
|
|
|
|
<properties>
|
|
|
|
<exe.compiler>clang</exe.compiler>
|
|
|
|
<jni.platform>darwin</jni.platform>
|
|
|
|
</properties>
|
2021-01-13 11:07:39 +01:00
|
|
|
<build>
|
|
|
|
<plugins>
|
|
|
|
<plugin>
|
|
|
|
<artifactId>maven-antrun-plugin</artifactId>
|
|
|
|
<executions>
|
|
|
|
<!-- Build the additional JAR that contains the native library. -->
|
|
|
|
<execution>
|
|
|
|
<id>native-jar</id>
|
|
|
|
<phase>package</phase>
|
|
|
|
<goals>
|
|
|
|
<goal>run</goal>
|
|
|
|
</goals>
|
|
|
|
<configuration>
|
|
|
|
<target>
|
|
|
|
<copy todir="${nativeJarWorkdir}">
|
|
|
|
<zipfileset src="${defaultJarFile}" />
|
|
|
|
</copy>
|
|
|
|
<copy todir="${nativeJarWorkdir}" includeEmptyDirs="false">
|
|
|
|
<zipfileset dir="${nativeLibOnlyDir}" />
|
|
|
|
<regexpmapper handledirsep="yes" from="^(?:[^/]+/)*([^/]+)$" to="META-INF/native/lib/\1" />
|
|
|
|
</copy>
|
|
|
|
<copy todir="${nativeJarWorkdir}" includeEmptyDirs="false">
|
|
|
|
<zipfileset dir="${nativeIncludeDir}" />
|
|
|
|
<regexpmapper handledirsep="yes" from="^(?:[^/]+/)*([^/]+).h$" to="META-INF/native/include/\1.h" />
|
|
|
|
</copy>
|
|
|
|
<copy todir="${nativeJarWorkdir}" includeEmptyDirs="false">
|
|
|
|
<zipfileset dir="${jniUtilIncludeDir}" />
|
|
|
|
<regexpmapper handledirsep="yes" from="^(?:[^/]+/)*([^/]+).h$" to="META-INF/native/include/\1.h" />
|
|
|
|
</copy>
|
|
|
|
<jar destfile="${nativeJarFile}" manifest="${nativeJarWorkdir}/META-INF/MANIFEST.MF" basedir="${nativeJarWorkdir}" index="true" excludes="META-INF/MANIFEST.MF,META-INF/INDEX.LIST" />
|
|
|
|
<attachartifact file="${nativeJarFile}" classifier="${jni.classifier}" type="jar" />
|
|
|
|
</target>
|
|
|
|
</configuration>
|
|
|
|
</execution>
|
|
|
|
<!-- invoke the make file to build a static library -->
|
|
|
|
<execution>
|
|
|
|
<id>build-native-lib</id>
|
|
|
|
<phase>generate-sources</phase>
|
|
|
|
<goals>
|
|
|
|
<goal>run</goal>
|
|
|
|
</goals>
|
|
|
|
<configuration>
|
|
|
|
<target>
|
|
|
|
<exec executable="${exe.make}" failonerror="true" resolveexecutable="true">
|
|
|
|
<env key="CC" value="${exe.compiler}" />
|
|
|
|
<env key="AR" value="${exe.archiver}" />
|
|
|
|
<env key="LIB_DIR" value="${nativeLibOnlyDir}" />
|
|
|
|
<env key="OBJ_DIR" value="${nativeObjsOnlyDir}" />
|
|
|
|
<env key="JNI_PLATFORM" value="${jni.platform}" />
|
|
|
|
<env key="CFLAGS" value="-O3 -Werror -Wno-attributes -fPIC -fno-omit-frame-pointer -Wunused-variable -fvisibility=hidden" />
|
|
|
|
<env key="LDFLAGS" value="-Wl,--no-as-needed -lrt" />
|
|
|
|
<env key="LIB_NAME" value="${nativeLibName}" />
|
|
|
|
<!-- support for __attribute__((weak_import)) by the linker was added in 10.2 so ensure we
|
|
|
|
explicitly set the target platform. Otherwise we may get fatal link errors due to weakly linked
|
|
|
|
methods which are not expected to be present on MacOS (e.g. accept4). -->
|
|
|
|
<env key="MACOSX_DEPLOYMENT_TARGET" value="10.2" />
|
|
|
|
</exec>
|
|
|
|
</target>
|
|
|
|
</configuration>
|
|
|
|
</execution>
|
|
|
|
</executions>
|
|
|
|
</plugin>
|
|
|
|
</plugins>
|
|
|
|
</build>
|
2017-01-19 17:31:34 +01:00
|
|
|
</profile>
|
|
|
|
<profile>
|
|
|
|
<id>linux</id>
|
|
|
|
<activation>
|
|
|
|
<os>
|
|
|
|
<family>linux</family>
|
|
|
|
</os>
|
|
|
|
</activation>
|
|
|
|
<properties>
|
|
|
|
<jni.platform>linux</jni.platform>
|
|
|
|
</properties>
|
2021-01-13 11:07:39 +01:00
|
|
|
<build>
|
|
|
|
<plugins>
|
|
|
|
<plugin>
|
|
|
|
<artifactId>maven-antrun-plugin</artifactId>
|
|
|
|
<executions>
|
|
|
|
<!-- Build the additional JAR that contains the native library. -->
|
|
|
|
<execution>
|
|
|
|
<id>native-jar</id>
|
|
|
|
<phase>package</phase>
|
|
|
|
<goals>
|
|
|
|
<goal>run</goal>
|
|
|
|
</goals>
|
|
|
|
<configuration>
|
|
|
|
<target>
|
|
|
|
<copy todir="${nativeJarWorkdir}">
|
|
|
|
<zipfileset src="${defaultJarFile}" />
|
|
|
|
</copy>
|
|
|
|
<copy todir="${nativeJarWorkdir}" includeEmptyDirs="false">
|
|
|
|
<zipfileset dir="${nativeLibOnlyDir}" />
|
|
|
|
<regexpmapper handledirsep="yes" from="^(?:[^/]+/)*([^/]+)$" to="META-INF/native/lib/\1" />
|
|
|
|
</copy>
|
|
|
|
<copy todir="${nativeJarWorkdir}" includeEmptyDirs="false">
|
|
|
|
<zipfileset dir="${nativeIncludeDir}" />
|
|
|
|
<regexpmapper handledirsep="yes" from="^(?:[^/]+/)*([^/]+).h$" to="META-INF/native/include/\1.h" />
|
|
|
|
</copy>
|
|
|
|
<copy todir="${nativeJarWorkdir}" includeEmptyDirs="false">
|
|
|
|
<zipfileset dir="${jniUtilIncludeDir}" />
|
|
|
|
<regexpmapper handledirsep="yes" from="^(?:[^/]+/)*([^/]+).h$" to="META-INF/native/include/\1.h" />
|
|
|
|
</copy>
|
|
|
|
<jar destfile="${nativeJarFile}" manifest="${nativeJarWorkdir}/META-INF/MANIFEST.MF" basedir="${nativeJarWorkdir}" index="true" excludes="META-INF/MANIFEST.MF,META-INF/INDEX.LIST" />
|
|
|
|
<attachartifact file="${nativeJarFile}" classifier="${jni.classifier}" type="jar" />
|
|
|
|
</target>
|
|
|
|
</configuration>
|
|
|
|
</execution>
|
|
|
|
<!-- invoke the make file to build a static library -->
|
|
|
|
<execution>
|
|
|
|
<id>build-native-lib</id>
|
|
|
|
<phase>generate-sources</phase>
|
|
|
|
<goals>
|
|
|
|
<goal>run</goal>
|
|
|
|
</goals>
|
|
|
|
<configuration>
|
|
|
|
<target>
|
|
|
|
<exec executable="${exe.make}" failonerror="true" resolveexecutable="true">
|
|
|
|
<env key="CC" value="${exe.compiler}" />
|
|
|
|
<env key="AR" value="${exe.archiver}" />
|
|
|
|
<env key="LIB_DIR" value="${nativeLibOnlyDir}" />
|
|
|
|
<env key="OBJ_DIR" value="${nativeObjsOnlyDir}" />
|
|
|
|
<env key="JNI_PLATFORM" value="${jni.platform}" />
|
|
|
|
<env key="CFLAGS" value="-O3 -Werror -Wno-attributes -fPIC -fno-omit-frame-pointer -Wunused-variable -fvisibility=hidden" />
|
|
|
|
<env key="LDFLAGS" value="-Wl,--no-as-needed -lrt" />
|
|
|
|
<env key="LIB_NAME" value="${nativeLibName}" />
|
|
|
|
</exec>
|
|
|
|
</target>
|
|
|
|
</configuration>
|
|
|
|
</execution>
|
|
|
|
</executions>
|
|
|
|
</plugin>
|
|
|
|
</plugins>
|
|
|
|
</build>
|
2020-04-23 13:58:08 +02:00
|
|
|
</profile>
|
|
|
|
<profile>
|
|
|
|
<id>linux-aarch64</id>
|
|
|
|
<properties>
|
2020-12-07 12:14:23 +01:00
|
|
|
<!-- use aarch_64 as this is also what os.detected.arch will use on an aarch64 system -->
|
|
|
|
<jni.classifier>${os.detected.name}-aarch_64</jni.classifier>
|
2020-04-23 13:58:08 +02:00
|
|
|
<jni.platform>linux</jni.platform>
|
2021-03-25 09:32:57 +01:00
|
|
|
<exe.compiler>aarch64-none-linux-gnu-gcc</exe.compiler>
|
2021-03-25 12:07:00 +01:00
|
|
|
<exe.archiver>aarch64-none-linux-gnu-ar</exe.archiver>
|
2020-04-23 13:58:08 +02:00
|
|
|
</properties>
|
2021-01-13 11:07:39 +01:00
|
|
|
<build>
|
|
|
|
<plugins>
|
|
|
|
<plugin>
|
|
|
|
<artifactId>maven-antrun-plugin</artifactId>
|
|
|
|
<executions>
|
|
|
|
<!-- Build the additional JAR that contains the native library. -->
|
|
|
|
<execution>
|
|
|
|
<id>native-jar</id>
|
|
|
|
<phase>package</phase>
|
|
|
|
<goals>
|
|
|
|
<goal>run</goal>
|
|
|
|
</goals>
|
|
|
|
<configuration>
|
|
|
|
<target>
|
|
|
|
<copy todir="${nativeJarWorkdir}">
|
|
|
|
<zipfileset src="${defaultJarFile}" />
|
|
|
|
</copy>
|
|
|
|
<copy todir="${nativeJarWorkdir}" includeEmptyDirs="false">
|
|
|
|
<zipfileset dir="${nativeLibOnlyDir}" />
|
|
|
|
<regexpmapper handledirsep="yes" from="^(?:[^/]+/)*([^/]+)$" to="META-INF/native/lib/\1" />
|
|
|
|
</copy>
|
|
|
|
<copy todir="${nativeJarWorkdir}" includeEmptyDirs="false">
|
|
|
|
<zipfileset dir="${nativeIncludeDir}" />
|
|
|
|
<regexpmapper handledirsep="yes" from="^(?:[^/]+/)*([^/]+).h$" to="META-INF/native/include/\1.h" />
|
|
|
|
</copy>
|
|
|
|
<copy todir="${nativeJarWorkdir}" includeEmptyDirs="false">
|
|
|
|
<zipfileset dir="${jniUtilIncludeDir}" />
|
|
|
|
<regexpmapper handledirsep="yes" from="^(?:[^/]+/)*([^/]+).h$" to="META-INF/native/include/\1.h" />
|
|
|
|
</copy>
|
|
|
|
<jar destfile="${nativeJarFile}" manifest="${nativeJarWorkdir}/META-INF/MANIFEST.MF" basedir="${nativeJarWorkdir}" index="true" excludes="META-INF/MANIFEST.MF,META-INF/INDEX.LIST" />
|
|
|
|
<attachartifact file="${nativeJarFile}" classifier="${jni.classifier}" type="jar" />
|
|
|
|
</target>
|
|
|
|
</configuration>
|
|
|
|
</execution>
|
|
|
|
<!-- invoke the make file to build a static library -->
|
|
|
|
<execution>
|
|
|
|
<id>build-native-lib</id>
|
|
|
|
<phase>generate-sources</phase>
|
|
|
|
<goals>
|
|
|
|
<goal>run</goal>
|
|
|
|
</goals>
|
|
|
|
<configuration>
|
|
|
|
<target>
|
|
|
|
<exec executable="${exe.make}" failonerror="true" resolveexecutable="true">
|
|
|
|
<env key="CC" value="${exe.compiler}" />
|
|
|
|
<env key="AR" value="${exe.archiver}" />
|
|
|
|
<env key="LIB_DIR" value="${nativeLibOnlyDir}" />
|
|
|
|
<env key="OBJ_DIR" value="${nativeObjsOnlyDir}" />
|
|
|
|
<env key="JNI_PLATFORM" value="${jni.platform}" />
|
|
|
|
<env key="CFLAGS" value="-O3 -Werror -Wno-attributes -fPIC -fno-omit-frame-pointer -Wunused-variable -fvisibility=hidden" />
|
|
|
|
<env key="LDFLAGS" value="-Wl,--no-as-needed -lrt" />
|
|
|
|
<env key="LIB_NAME" value="${nativeLibName}" />
|
|
|
|
</exec>
|
|
|
|
</target>
|
|
|
|
</configuration>
|
|
|
|
</execution>
|
|
|
|
</executions>
|
|
|
|
</plugin>
|
|
|
|
</plugins>
|
|
|
|
</build>
|
2017-01-19 17:31:34 +01:00
|
|
|
</profile>
|
|
|
|
<profile>
|
|
|
|
<id>freebsd</id>
|
|
|
|
<activation>
|
|
|
|
<os>
|
|
|
|
<family>unix</family>
|
|
|
|
<name>freebsd</name>
|
|
|
|
</os>
|
|
|
|
</activation>
|
|
|
|
<properties>
|
|
|
|
<exe.compiler>clang</exe.compiler>
|
|
|
|
<exe.make>gmake</exe.make>
|
|
|
|
<jni.platform>freebsd</jni.platform>
|
|
|
|
</properties>
|
2017-05-11 15:14:31 +02:00
|
|
|
<build>
|
|
|
|
<plugins>
|
|
|
|
<plugin>
|
|
|
|
<artifactId>maven-antrun-plugin</artifactId>
|
|
|
|
<executions>
|
|
|
|
<!-- Build the additional JAR that contains the native library. -->
|
|
|
|
<execution>
|
|
|
|
<id>native-jar</id>
|
|
|
|
<phase>package</phase>
|
|
|
|
<goals>
|
|
|
|
<goal>run</goal>
|
|
|
|
</goals>
|
|
|
|
<configuration>
|
|
|
|
<target>
|
|
|
|
<copy todir="${nativeJarWorkdir}">
|
|
|
|
<zipfileset src="${defaultJarFile}" />
|
|
|
|
</copy>
|
|
|
|
<copy todir="${nativeJarWorkdir}" includeEmptyDirs="false">
|
|
|
|
<zipfileset dir="${nativeLibOnlyDir}" />
|
|
|
|
<regexpmapper handledirsep="yes" from="^(?:[^/]+/)*([^/]+)$" to="META-INF/native/lib/\1" />
|
|
|
|
</copy>
|
|
|
|
<copy todir="${nativeJarWorkdir}" includeEmptyDirs="false">
|
|
|
|
<zipfileset dir="${nativeIncludeDir}" />
|
2021-01-13 11:07:39 +01:00
|
|
|
<regexpmapper handledirsep="yes" from="^(?:[^/]+/)*([^/]+).h$" to="META-INF/native/include/\1.h" />
|
2017-05-11 15:14:31 +02:00
|
|
|
</copy>
|
2020-10-29 16:36:07 +01:00
|
|
|
<copy todir="${nativeJarWorkdir}" includeEmptyDirs="false">
|
2021-01-13 11:07:39 +01:00
|
|
|
<zipfileset dir="${nativeIncludeDir}" />
|
2020-10-29 16:36:07 +01:00
|
|
|
<regexpmapper handledirsep="yes" from="^(?:[^/]+/)*([^/]+).h$" to="META-INF/native/include/\1.h" />
|
|
|
|
</copy>
|
2017-05-11 15:14:31 +02:00
|
|
|
<jar destfile="${nativeJarFile}" manifest="${nativeJarWorkdir}/META-INF/MANIFEST.MF" basedir="${nativeJarWorkdir}" index="true" excludes="META-INF/MANIFEST.MF,META-INF/INDEX.LIST" />
|
|
|
|
<attachartifact file="${nativeJarFile}" classifier="${jni.classifier}" type="jar" />
|
|
|
|
</target>
|
|
|
|
</configuration>
|
|
|
|
</execution>
|
|
|
|
<!-- invoke the make file to build a static library -->
|
|
|
|
<execution>
|
|
|
|
<id>build-native-lib</id>
|
|
|
|
<phase>generate-sources</phase>
|
|
|
|
<goals>
|
|
|
|
<goal>run</goal>
|
|
|
|
</goals>
|
|
|
|
<configuration>
|
|
|
|
<target>
|
|
|
|
<exec executable="${exe.make}" failonerror="true" resolveexecutable="true">
|
2017-05-11 16:00:16 +02:00
|
|
|
<env key="CC" value="${exe.compiler}" />
|
|
|
|
<env key="AR" value="${exe.archiver}" />
|
|
|
|
<env key="LIB_DIR" value="${nativeLibOnlyDir}" />
|
|
|
|
<env key="OBJ_DIR" value="${nativeObjsOnlyDir}" />
|
|
|
|
<env key="JNI_PLATFORM" value="${jni.platform}" />
|
2021-01-13 11:07:39 +01:00
|
|
|
<env key="CFLAGS" value="-O3 -Werror -Wno-attributes -fPIC -fno-omit-frame-pointer -Wunused-variable -fvisibility=hidden" />
|
|
|
|
<env key="LDFLAGS" value="-Wl,--no-as-needed -lrt" />
|
2017-05-11 16:00:16 +02:00
|
|
|
<env key="LIB_NAME" value="${nativeLibName}" />
|
2017-05-11 15:14:31 +02:00
|
|
|
</exec>
|
|
|
|
</target>
|
|
|
|
</configuration>
|
|
|
|
</execution>
|
2021-01-13 11:07:39 +01:00
|
|
|
</executions>
|
|
|
|
</plugin>
|
|
|
|
</plugins>
|
|
|
|
</build>
|
|
|
|
</profile>
|
|
|
|
<profile>
|
|
|
|
<id>openbsd</id>
|
|
|
|
<activation>
|
|
|
|
<os>
|
|
|
|
<family>unix</family>
|
|
|
|
<name>openbsd</name>
|
|
|
|
</os>
|
|
|
|
</activation>
|
|
|
|
<properties>
|
|
|
|
<exe.compiler>clang</exe.compiler>
|
|
|
|
<exe.make>gmake</exe.make>
|
|
|
|
<jni.platform>openbsd</jni.platform>
|
|
|
|
</properties>
|
|
|
|
<build>
|
|
|
|
<plugins>
|
|
|
|
<plugin>
|
|
|
|
<artifactId>maven-antrun-plugin</artifactId>
|
|
|
|
<executions>
|
|
|
|
<!-- Build the additional JAR that contains the native library. -->
|
2017-05-11 15:14:31 +02:00
|
|
|
<execution>
|
2021-01-13 11:07:39 +01:00
|
|
|
<id>native-jar</id>
|
|
|
|
<phase>package</phase>
|
2017-05-11 15:14:31 +02:00
|
|
|
<goals>
|
|
|
|
<goal>run</goal>
|
|
|
|
</goals>
|
|
|
|
<configuration>
|
|
|
|
<target>
|
2021-01-13 11:07:39 +01:00
|
|
|
<copy todir="${nativeJarWorkdir}">
|
|
|
|
<zipfileset src="${defaultJarFile}" />
|
2017-05-11 15:14:31 +02:00
|
|
|
</copy>
|
2021-01-13 11:07:39 +01:00
|
|
|
<copy todir="${nativeJarWorkdir}" includeEmptyDirs="false">
|
|
|
|
<zipfileset dir="${nativeLibOnlyDir}" />
|
|
|
|
<regexpmapper handledirsep="yes" from="^(?:[^/]+/)*([^/]+)$" to="META-INF/native/lib/\1" />
|
2020-10-29 16:36:07 +01:00
|
|
|
</copy>
|
2021-01-13 11:07:39 +01:00
|
|
|
<copy todir="${nativeJarWorkdir}" includeEmptyDirs="false">
|
|
|
|
<zipfileset dir="${nativeIncludeDir}" />
|
|
|
|
<regexpmapper handledirsep="yes" from="^(?:[^/]+/)*([^/]+).h$" to="META-INF/native/include/\1.h" />
|
|
|
|
</copy>
|
|
|
|
<copy todir="${nativeJarWorkdir}" includeEmptyDirs="false">
|
|
|
|
<zipfileset dir="${jniUtilIncludeDir}" />
|
|
|
|
<regexpmapper handledirsep="yes" from="^(?:[^/]+/)*([^/]+).h$" to="META-INF/native/include/\1.h" />
|
|
|
|
</copy>
|
|
|
|
<jar destfile="${nativeJarFile}" manifest="${nativeJarWorkdir}/META-INF/MANIFEST.MF" basedir="${nativeJarWorkdir}" index="true" excludes="META-INF/MANIFEST.MF,META-INF/INDEX.LIST" />
|
|
|
|
<attachartifact file="${nativeJarFile}" classifier="${jni.classifier}" type="jar" />
|
2017-05-11 15:14:31 +02:00
|
|
|
</target>
|
|
|
|
</configuration>
|
|
|
|
</execution>
|
2021-01-13 11:07:39 +01:00
|
|
|
<!-- invoke the make file to build a static library -->
|
2017-05-11 15:14:31 +02:00
|
|
|
<execution>
|
|
|
|
<id>build-native-lib</id>
|
2021-01-13 11:07:39 +01:00
|
|
|
<phase>generate-sources</phase>
|
2020-12-18 10:37:49 +01:00
|
|
|
<goals>
|
2021-01-13 11:07:39 +01:00
|
|
|
<goal>run</goal>
|
2020-12-18 10:37:49 +01:00
|
|
|
</goals>
|
2021-01-13 11:07:39 +01:00
|
|
|
<configuration>
|
|
|
|
<target>
|
|
|
|
<exec executable="${exe.make}" failonerror="true" resolveexecutable="true">
|
|
|
|
<env key="CC" value="${exe.compiler}" />
|
|
|
|
<env key="AR" value="${exe.archiver}" />
|
|
|
|
<env key="LIB_DIR" value="${nativeLibOnlyDir}" />
|
|
|
|
<env key="OBJ_DIR" value="${nativeObjsOnlyDir}" />
|
|
|
|
<env key="JNI_PLATFORM" value="${jni.platform}" />
|
|
|
|
<env key="CFLAGS" value="-O3 -Werror -Wno-attributes -fPIC -fno-omit-frame-pointer -Wunused-variable -fvisibility=hidden" />
|
|
|
|
<env key="LDFLAGS" value="-Wl,--no-as-needed -lrt" />
|
|
|
|
<env key="LIB_NAME" value="${nativeLibName}" />
|
|
|
|
</exec>
|
|
|
|
</target>
|
|
|
|
</configuration>
|
2017-05-11 15:14:31 +02:00
|
|
|
</execution>
|
|
|
|
</executions>
|
|
|
|
</plugin>
|
|
|
|
</plugins>
|
|
|
|
</build>
|
2017-01-19 17:31:34 +01:00
|
|
|
</profile>
|
|
|
|
</profiles>
|
|
|
|
|
|
|
|
<dependencies>
|
2020-12-19 10:37:32 +01:00
|
|
|
<dependency>
|
|
|
|
<groupId>io.netty</groupId>
|
|
|
|
<artifactId>netty-jni-util</artifactId>
|
|
|
|
<classifier>sources</classifier>
|
|
|
|
<optional>true</optional>
|
|
|
|
</dependency>
|
2017-01-19 17:31:34 +01:00
|
|
|
<dependency>
|
|
|
|
<groupId>io.netty</groupId>
|
|
|
|
<artifactId>netty-common</artifactId>
|
|
|
|
<version>${project.version}</version>
|
|
|
|
</dependency>
|
2018-12-06 09:01:14 +01:00
|
|
|
<dependency>
|
|
|
|
<groupId>io.netty</groupId>
|
|
|
|
<artifactId>netty-buffer</artifactId>
|
|
|
|
<version>${project.version}</version>
|
|
|
|
</dependency>
|
2017-01-19 17:31:34 +01:00
|
|
|
<dependency>
|
|
|
|
<groupId>io.netty</groupId>
|
|
|
|
<artifactId>netty-transport</artifactId>
|
|
|
|
<version>${project.version}</version>
|
|
|
|
</dependency>
|
|
|
|
</dependencies>
|
|
|
|
</project>
|