| 1 |
|
| 2 |
|
| 3 |
export JAVA_HOME=/usr/lib/jvm/default-java |
| 4 |
|
| 5 |
DPKG_EXPORT_BUILDFLAGS = 1 |
| 6 |
include /usr/share/dpkg/default.mk |
| 7 |
|
| 8 |
export DEB_BUILD_MAINT_OPTIONS=hardening=+all |
| 9 |
export CPPFLAGS+=-gdwarf-4 |
| 10 |
|
| 11 |
%: |
| 12 |
dh $@ |
| 13 |
|
| 14 |
override_dh_auto_build-indep: |
| 15 |
dh_auto_build -- package -DskipTests -Pwith-native |
| 16 |
|
| 17 |
override_dh_auto_build-arch: |
| 18 |
|
| 19 |
mkdir -p junixsocket-native/target |
| 20 |
|
| 21 |
|
| 22 |
clang $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) \ |
| 23 |
-I$(CURDIR)/junixsocket-native/src/main/c/jni \ |
| 24 |
-Wall -Wextra -Wstrict-prototypes -Wno-reserved-id-macro -Wno-undef -Wno-cast-qual \ |
| 25 |
-Wno-disabled-macro-expansion -Wno-language-extension-token -Wno-gnu-auto-type \ |
| 26 |
-Wno-c++11-extensions -Wno-c++98-compat -Wno-empty-translation-unit \-Wno-gnu-empty-initializer \ |
| 27 |
-Werror-implicit-function-declaration -Wint-conversion -Wno-unused-command-line-argument \ |
| 28 |
-Werror-implicit-function-declaration -Wno-long-long -Wpointer-arith -Wconversion \ |
| 29 |
-finline-functions -fwrapv -fno-c++-static-destructors -fPIC -fvisibility=hidden -fno-common \ |
| 30 |
-std=gnu11 -D_GNU_SOURCE -shared \ |
| 31 |
junixsocket-native/src/main/c/*.c \ |
| 32 |
-o junixsocket-native/target/libjunixsocket-native-system.so |
| 33 |
|
| 34 |
override_dh_auto_test-arch: |
| 35 |
|
| 36 |
override_dh_auto_install-indep: |
| 37 |
dh_auto_install -- -Pwith-native |
| 38 |
|
| 39 |
override_dh_auto_install-arch: |
| 40 |
dh_install -plibjunixsocket-jni junixsocket-native/target/*.so usr/lib/$(DEB_HOST_MULTIARCH)/jni |