-
Notifications
You must be signed in to change notification settings - Fork 24
/
pom.xml
144 lines (140 loc) · 6.07 KB
/
pom.xml
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
<?xml version="1.0" encoding="UTF-8"?>
<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>
<groupId>org.openquantumsafe</groupId>
<artifactId>liboqs-java</artifactId>
<packaging>jar</packaging>
<version>1.0</version>
<name>liboqs-java: Java wrapper for liboqs</name>
<description>liboqs-java offers a Java wrapper providing quantum-resistant cryptographic algorithms via liboqs.</description>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<liboqs.include.dir />
<liboqs.lib.dir />
<java.os.include />
</properties>
<dependencies>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>5.6.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.6.2</version>
<scope>test</scope>
</dependency>
</dependencies>
<profiles>
<profile>
<id>macosx</id>
<activation>
<property>
<name>platform</name>
<value>darwin</value>
</property>
</activation>
<properties>
<lib_name>liboqs-jni</lib_name>
<lib_name_ext>jnilib</lib_name_ext>
<liboqs.include.dir>/usr/local/include</liboqs.include.dir>
<liboqs.lib.dir>/usr/local/lib</liboqs.lib.dir>
<java.os.include>-I${JAVA_HOME}/include -I${JAVA_HOME}/include/darwin</java.os.include>
</properties>
</profile>
<profile>
<id>linux</id>
<activation>
<activeByDefault>true</activeByDefault>
<property>
<name>platform</name>
<value>nix</value>
</property>
</activation>
<properties>
<lib_name>liboqs-jni</lib_name>
<lib_name_ext>so</lib_name_ext>
<liboqs.include.dir>/usr/local/include</liboqs.include.dir>
<liboqs.lib.dir>/usr/local/lib</liboqs.lib.dir>
<java.os.include>-I${JAVA_HOME}/include -I${JAVA_HOME}/include/linux</java.os.include>
</properties>
</profile>
</profiles>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.0</version>
<configuration>
<argLine>-Xss10M -Djava.library.path=${project.build.outputDirectory}</argLine>
</configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>native-maven-plugin</artifactId>
<version>1.0-alpha-9</version>
<extensions>true</extensions>
<configuration>
<sources>
<source>
<directory>${basedir}/src/main/c</directory>
<fileNames>
<fileName>handle.c</fileName>
<fileName>KEMs.c</fileName>
<fileName>KeyEncapsulation.c</fileName>
<fileName>Rand.c</fileName>
<fileName>Signature.c</fileName>
<fileName>Sigs.c</fileName>
</fileNames>
</source>
</sources>
<compilerProvider>generic-classic</compilerProvider>
<compilerExecutable>gcc</compilerExecutable>
<compilerStartOptions>
<compilerStartOption>${java.os.include}</compilerStartOption>
<compilerStartOption>-fPIC</compilerStartOption>
<compilerStartOption>-Wall</compilerStartOption>
<compilerStartOption>-O3</compilerStartOption>
<compilerStartOption>-I${liboqs.include.dir}</compilerStartOption>
</compilerStartOptions>
<linkerOutputDirectory>${project.build.outputDirectory}</linkerOutputDirectory>
<linkerExecutable>gcc</linkerExecutable>
<linkerStartOptions>
<linkerStartOption>-shared</linkerStartOption>
<linkerStartOption>-L${liboqs.lib.dir}</linkerStartOption>
</linkerStartOptions>
<linkerFinalName>${lib_name}</linkerFinalName>
<linkerFinalNameExt>${lib_name_ext}</linkerFinalNameExt>
<linkerEndOptions>
<linkerEndOption>-loqs</linkerEndOption>
</linkerEndOptions>
</configuration>
<executions>
<execution>
<id>generate-shared-oqs-library</id>
<phase>compile</phase>
<goals>
<goal>initialize</goal>
<goal>compile</goal>
<goal>link</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>