forked from mapbox/jni.hpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
20 lines (15 loc) · 948 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
CFLAGS = $(env CFLAGS) -Iinclude --std=c++14 -Weverything -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-exit-time-destructors -Werror
test:
$(CXX) -o tst $(CFLAGS) -Itest/android -g -Wno-padded test/low_level.cpp && ./tst
$(CXX) -o tst $(CFLAGS) -Itest/android -g -Wno-padded test/high_level.cpp && ./tst
$(CXX) -o tst $(CFLAGS) -Itest/openjdk -g -Wno-padded -Wno-reserved-id-macro test/low_level.cpp && ./tst
$(CXX) -o tst $(CFLAGS) -Itest/openjdk -g -Wno-padded -Wno-reserved-id-macro test/high_level.cpp && ./tst
.PHONY: test
examples:
$(CXX) -dynamiclib -o examples/libhello.jnilib $(CFLAGS) -Wno-shadow -Wno-padded -Itest examples/hello.cpp
javac examples/Hello.java
cd examples && java -Xcheck:jni Hello $(shell whoami)
$(CXX) -dynamiclib -o examples/libpeer.jnilib $(CFLAGS) -Wno-shadow -Wno-padded -Itest examples/native_peer.cpp
javac examples/NativePeer.java
cd examples && java -Xcheck:jni NativePeer
.PHONY: examples