Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add profiles for other linux platforms #58

Merged
merged 4 commits into from Jun 14, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
49 changes: 49 additions & 0 deletions combined/pom.xml
Expand Up @@ -82,6 +82,54 @@
</dependency>
</dependencies>
</profile>
<profile>
<id>linux-aarch64</id>
<activation>
<os>
<family>linux</family>
<arch>aarch64</arch>
</os>
</activation>
<dependencies>
<dependency>
<groupId>org.wildfly.openssl</groupId>
<artifactId>wildfly-openssl-linux-aarch64</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</profile>
<profile>
<id>linux-ppc64le</id>
<activation>
<os>
<family>linux</family>
<arch>ppc64le</arch>
</os>
</activation>
<dependencies>
<dependency>
<groupId>org.wildfly.openssl</groupId>
<artifactId>wildfly-openssl-linux-ppc64le</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</profile>
<profile>
<id>linux-s390x</id>
<activation>
<os>
<family>linux</family>
<arch>s390x</arch>
</os>
</activation>
<dependencies>
<dependency>
<groupId>org.wildfly.openssl</groupId>
<artifactId>wildfly-openssl-linux-s390x</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</profile>
<profile>
<id>linux-i386</id>
<activation>
Expand All @@ -106,6 +154,7 @@
<activation>
<os>
<family>linux</family>
<arch>amd64</arch>
</os>
<property>
<name>sun.arch.data.model</name>
Expand Down
52 changes: 52 additions & 0 deletions java/pom.xml
Expand Up @@ -127,6 +127,57 @@
</dependency>
</dependencies>
</profile>
<profile>
<id>linux-aarch64</id>
<activation>
<os>
<family>linux</family>
<arch>aarch64</arch>
</os>
</activation>
<dependencies>
<dependency>
<groupId>org.wildfly.openssl</groupId>
<artifactId>wildfly-openssl-linux-aarch64</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
</profile>
<profile>
<id>linux-ppc64le</id>
<activation>
<os>
<family>linux</family>
<arch>ppc64le</arch>
</os>
</activation>
<dependencies>
<dependency>
<groupId>org.wildfly.openssl</groupId>
<artifactId>wildfly-openssl-linux-ppc64le</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
</profile>
<profile>
<id>linux-s390x</id>
<activation>
<os>
<family>linux</family>
<arch>s390x</arch>
</os>
</activation>
<dependencies>
<dependency>
<groupId>org.wildfly.openssl</groupId>
<artifactId>wildfly-openssl-linux-s390x</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
</profile>
<profile>
<id>linux-i386</id>
<activation>
Expand All @@ -152,6 +203,7 @@
<activation>
<os>
<family>linux</family>
<arch>amd64</arch>
</os>
<property>
<name>sun.arch.data.model</name>
Expand Down
4 changes: 4 additions & 0 deletions java/src/main/java/org/wildfly/openssl/Identification.java
Expand Up @@ -118,6 +118,8 @@ public Object[] run() {
cpuName = "i686";
} else if (sysArch.startsWith("X32")) {
cpuName = "x32";
} else if (sysArch.startsWith("PPC64LE")) {
cpuName = "ppc64le";
} else if (sysArch.startsWith("PPC64")) {
cpuName = "ppc64";
} else if (sysArch.startsWith("PPC") || sysArch.startsWith("POWER")) {
Expand Down Expand Up @@ -174,6 +176,8 @@ public Object[] run() {
cpuName = "alpha";
} else if (sysArch.startsWith("MIPS")) {
cpuName = "mips";
} else if (sysArch.startsWith("S390X")) {
cpuName = "s390x";
} else {
knownCpu = false;
cpuName = "unknown";
Expand Down
17 changes: 17 additions & 0 deletions linux-aarch64/Makefile
@@ -0,0 +1,17 @@
CC = cc
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, add the license header to the Makefiles as well

SRC = alpn.c clientcert.c options.c session.c ssl.c threads.c util.c
OBJ = $(patsubst %.c, target/%.o, $(SRC))

default: target/classes/linux-aarch64/libwfssl.so

clean:
rm -rf target

target/classes/linux-aarch64:
mkdir -p target/classes/linux-aarch64

target/%.o : ../libwfssl/src/%.c target/classes/linux-aarch64
$(CC) $(CFLAGS) -Werror -Wall -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wpointer-arith -std=c89 -Wdeclaration-after-statement -Wformat -Wformat-security -Wunused -Wno-unknown-pragmas -fPIC -c $< -o $@ -I../libwfssl/include -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux

target/classes/linux-aarch64/libwfssl.so: $(OBJ)
$(CC) $(CFLAGS) -shared $(OBJ) -o $@ $(LDFLAGS) -Wl,--no-as-needed -ldl
82 changes: 82 additions & 0 deletions linux-aarch64/pom.xml
@@ -0,0 +1,82 @@
<!--
~ Licensed to the Apache Software Foundation (ASF) under one or more
~ contributor license agreements. See the NOTICE file distributed with
~ this work for additional information regarding copyright ownership.
~ The ASF 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
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ 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.
-->

<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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.wildfly.openssl</groupId>
<artifactId>wildfly-openssl-parent</artifactId>
<version>1.0.7.Final-SNAPSHOT</version>
<relativePath>../</relativePath>
</parent>

<groupId>org.wildfly.openssl</groupId>
<artifactId>wildfly-openssl-linux-aarch64</artifactId>
<version>1.0.7.Final-SNAPSHOT</version>

<packaging>jar</packaging>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>false</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>exec</goal>
</goals>
<phase>generate-resources</phase>
</execution>
</executions>
<configuration>
<executable>make</executable>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>parent-release</id>
<activation>
<property>
<name>parent-release</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
17 changes: 17 additions & 0 deletions linux-ppc64le/Makefile
@@ -0,0 +1,17 @@
CC = cc
SRC = alpn.c clientcert.c options.c session.c ssl.c threads.c util.c
OBJ = $(patsubst %.c, target/%.o, $(SRC))

default: target/classes/linux-ppc64le/libwfssl.so

clean:
rm -rf target

target/classes/linux-ppc64le:
mkdir -p target/classes/linux-ppc64le

target/%.o : ../libwfssl/src/%.c target/classes/linux-ppc64le
$(CC) $(CFLAGS) -Werror -Wall -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wpointer-arith -std=c89 -Wdeclaration-after-statement -Wformat -Wformat-security -Wunused -Wno-unknown-pragmas -fPIC -c $< -o $@ -I../libwfssl/include -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux

target/classes/linux-ppc64le/libwfssl.so: $(OBJ)
$(CC) $(CFLAGS) -shared $(OBJ) -o $@ $(LDFLAGS) -Wl,--no-as-needed -ldl
82 changes: 82 additions & 0 deletions linux-ppc64le/pom.xml
@@ -0,0 +1,82 @@
<!--
~ Licensed to the Apache Software Foundation (ASF) under one or more
~ contributor license agreements. See the NOTICE file distributed with
~ this work for additional information regarding copyright ownership.
~ The ASF 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
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ 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.
-->

<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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.wildfly.openssl</groupId>
<artifactId>wildfly-openssl-parent</artifactId>
<version>1.0.7.Final-SNAPSHOT</version>
<relativePath>../</relativePath>
</parent>

<groupId>org.wildfly.openssl</groupId>
<artifactId>wildfly-openssl-linux-ppc64le</artifactId>
<version>1.0.7.Final-SNAPSHOT</version>

<packaging>jar</packaging>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>false</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>exec</goal>
</goals>
<phase>generate-resources</phase>
</execution>
</executions>
<configuration>
<executable>make</executable>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>parent-release</id>
<activation>
<property>
<name>parent-release</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
17 changes: 17 additions & 0 deletions linux-s390x/Makefile
@@ -0,0 +1,17 @@
CC = cc
SRC = alpn.c clientcert.c options.c session.c ssl.c threads.c util.c
OBJ = $(patsubst %.c, target/%.o, $(SRC))

default: target/classes/linux-s390x/libwfssl.so

clean:
rm -rf target

target/classes/linux-s390x:
mkdir -p target/classes/linux-s390x

target/%.o : ../libwfssl/src/%.c target/classes/linux-s390x
$(CC) $(CFLAGS) -Werror -Wall -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wpointer-arith -std=c89 -Wdeclaration-after-statement -Wformat -Wformat-security -Wunused -Wno-unknown-pragmas -fPIC -c $< -o $@ -I../libwfssl/include -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux

target/classes/linux-s390x/libwfssl.so: $(OBJ)
$(CC) $(CFLAGS) -shared $(OBJ) -o $@ $(LDFLAGS) -Wl,--no-as-needed -ldl