mirror of
https://github.com/jlengrand/cellar.git
synced 2026-03-10 08:01:19 +00:00
Building library with driver from maven
This commit is contained in:
4
.gitignore
vendored
4
.gitignore
vendored
@@ -55,4 +55,6 @@ libraries/tools/kotlin-test-js-runner/lib/
|
||||
libraries/tools/kotlin-source-map-loader/lib/
|
||||
local.properties
|
||||
|
||||
*.o
|
||||
*.o
|
||||
/cellar-app/target/
|
||||
/cellar-driver/target/
|
||||
|
||||
3
.idea/deployment.xml
generated
3
.idea/deployment.xml
generated
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="PublishConfigData" autoUpload="Always" serverName="raspberrypi.local" autoUploadExternalChanges="true">
|
||||
<component name="PublishConfigData" serverName="raspberrypi.local" autoUploadExternalChanges="true">
|
||||
<serverData>
|
||||
<paths name="raspberrypi.local">
|
||||
<serverdata>
|
||||
@@ -11,6 +11,5 @@
|
||||
</serverdata>
|
||||
</paths>
|
||||
</serverData>
|
||||
<option name="myAutoUpload" value="ALWAYS" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -11,5 +11,58 @@
|
||||
|
||||
<artifactId>cellar-driver</artifactId>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.7.0</version>
|
||||
<configuration>
|
||||
<compilerArgs>
|
||||
<arg>-h</arg>
|
||||
<arg>target/headers</arg>
|
||||
</compilerArgs>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>exec-maven-plugin</artifactId>
|
||||
<version>1.6.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>compile</phase>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<workingDirectory>${project.basedir}/src/main/c</workingDirectory>
|
||||
<executable>make</executable>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<configuration>
|
||||
<archive>
|
||||
<manifest>
|
||||
<mainClass>TestLib</mainClass>
|
||||
</manifest>
|
||||
</archive>
|
||||
<descriptorRefs>
|
||||
<descriptorRef>jar-with-dependencies</descriptorRef>
|
||||
</descriptorRefs>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>make-assembly</id> <!-- this is used for inheritance merges -->
|
||||
<phase>package</phase> <!-- bind to the packaging phase -->
|
||||
<goals>
|
||||
<goal>single</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
@@ -1,6 +1,6 @@
|
||||
JAVA_HOME=/usr/lib/jvm/java-11-openjdk-armhf
|
||||
INCLUDES = -I. -I../java -Iadafruit/Raspberry_Pi_2 -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux
|
||||
HEADERS = ../java/Dht11Driver.h adafruit/common_dht_read.h adafruit/Raspberry_Pi_2/pi_2_mmio.h adafruit/Raspberry_Pi_2/pi_2_dht_read.h
|
||||
HEADERS = ../../target/headers/Dht11Driver.h adafruit/common_dht_read.h adafruit/Raspberry_Pi_2/pi_2_mmio.h adafruit/Raspberry_Pi_2/pi_2_dht_read.h
|
||||
FILES = adafruit/common_dht_read.c adafruit/Raspberry_Pi_2/pi_2_mmio.c adafruit/Raspberry_Pi_2/pi_2_dht_read.c Dht11Driver.c
|
||||
OUT = libdht11
|
||||
|
||||
@@ -13,10 +13,8 @@ library:
|
||||
gcc -shared -fPIC -o $(OUT).so $(INCLUDES) $(FILES)
|
||||
|
||||
move:
|
||||
-cp $(OUT).so
|
||||
-cp $(OUT).so ../resources/libs/raspberry/
|
||||
|
||||
clean:
|
||||
-rm -f $(OUT).so
|
||||
-rm -f $(OUT)
|
||||
|
||||
# We have to run that at some point javac -h . Dht11Driver.java
|
||||
-rm -f $(OUT)
|
||||
4
pom.xml
4
pom.xml
@@ -10,8 +10,8 @@
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>11</maven.compiler.source>
|
||||
<maven.compiler.target>11</maven.compiler.target>
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
</properties>
|
||||
|
||||
<modules>
|
||||
|
||||
Reference in New Issue
Block a user