SYSLOGGER_BRANCH=$(build-major).$(build-minor)
# The following variables are found in the sdk.mk file which is generated by the configure script:
-# SDK_SRC_BASE the base of the source code, typically the root of the cloned git repository
-# SDK_BUILD_BASE the base of the output
-# JAVA_HOME the base of the JDK used to build
+# SDK_SRC_BASE the base of the source code, typically the root of the cloned git repository
+# SDK_BUILD_BASE the base of the output
+# JAVA_HOME the base of the JDK used to build
A2_OUTPUT = $(SDK_BUILD_BASE)/a2
JVM ?= $(JAVA_HOME)/bin/java
JAVADOC ?= $(JAVA_HOME)/bin/javadoc
# The following variables have default values which can be overriden
-# A2_BASE the space-separated directories where already built a2 categories can be found
+# A2_BASE the space-separated directories where already built a2 categories can be found
A2_BASE ?=$(A2_OUTPUT) /usr/local/share/a2 /usr/share/a2
# GNU defaults
include $(ARGEO_BUILD_BASE)common.mk
# The following variables should be declared in the including Makefile:
-# NATIVE_PACKAGE this native package name
-# A2_CATEGORY the (single) a2 category the bundles will belong to
+# NATIVE_PACKAGE this native package name
+# A2_CATEGORY the (single) a2 category the bundles will belong to
# The following variables have default values which can be overriden
-# DEP_NATIVE space-separated logical names of named depdencies
-# ADDITIONAL_INC additional includes
-# ADDITIONAL_LIBS additional native libraries
+# DEP_NATIVE space-separated logical names of named depdencies
+# DEP_INCLUDES additional includes
+# DEP_LIBS additional native libraries
DEP_NATIVE ?=
-ADDITIONAL_INC ?= $(foreach dep, $(DEP_NATIVE), /usr/include/$(dep))
-ADDITIONAL_LIBS ?= $(foreach dep, $(DEP_NATIVE), -l$(dep))
+DEP_INCLUDES ?= $(foreach dep, $(DEP_NATIVE), /usr/include/$(dep))
+DEP_LIBS ?= $(foreach dep, $(DEP_NATIVE), -l$(dep))
A2_NATIVE_CATEGORY=$(A2_OUTPUT)/lib/linux/$(shell uname -m)/$(A2_CATEGORY)
TARGET_EXEC := libJava_$(NATIVE_PACKAGE).so
-LDFLAGS ?= -shared -fPIC -Wl,-soname,$(TARGET_EXEC).$(MAJOR).$(MINOR) $(ADDITIONAL_LIBS)
+LDFLAGS ?= -shared -fPIC -Wl,-soname,$(TARGET_EXEC).$(MAJOR).$(MINOR) $(DEP_LIBS)
CFLAGS ?= -O3 -fPIC
SRC_DIRS := .
BUILD_DIR := $(SDK_BUILD_BASE)/jni/$(NATIVE_PACKAGE)
# Include directories
-INC_DIRS := $(shell find $(SRC_DIRS) -type d) $(JAVA_HOME)/include $(JAVA_HOME)/include/linux $(ADDITIONAL_INC)
+INC_DIRS := $(shell find $(SRC_DIRS) -type d) $(JAVA_HOME)/include $(JAVA_HOME)/include/linux $(DEP_INCLUDES)
all: $(A2_NATIVE_CATEGORY)/$(TARGET_EXEC)
$(RM) $(A2_NATIVE_CATEGORY)/$(TARGET_EXEC)
install:
- $(CP) $(A2_NATIVE_CATEGORY)/$(TARGET_EXEC) $(A2_NATIVE_INSTALL_TARGET)
+ install $(A2_NATIVE_CATEGORY)/$(TARGET_EXEC) $(A2_NATIVE_INSTALL_TARGET)
uninstall:
$(RM) $(A2_NATIVE_INSTALL_TARGET)/$(TARGET_EXEC)
include $(ARGEO_BUILD_BASE)common.mk
# The following variables should be declared in the including Makefile:
-# BUNDLES the space-separated list of bundles to build
-# A2_CATEGORY the (single) a2 category the bundles will belong to
+# BUNDLES the space-separated list of bundles to build
+# A2_CATEGORY the (single) a2 category the bundles will belong to
# The following environment variables can change the behaviour of the build
-# SOURCE_BUNDLES sources will be packaged separately in Eclipse-compatible source bundles
-# NO_MANIFEST_COPY generated MANIFESTs won't be copied to the source tree
+# SOURCE_BUNDLES sources will be packaged separately in Eclipse-compatible source bundles
+# NO_MANIFEST_COPY generated MANIFESTs won't be copied to the source tree
# The following variables have default values which can be overriden
-# DEP_CATEGORIES the a2 categories the compilation depends on
-# JAVADOC_PACKAGES the space-separated list of packages for which javadoc will be generated
+# DEP_CATEGORIES the a2 categories the compilation depends on
+# JAVADOC_PACKAGES the space-separated list of packages for which javadoc will be generated
# NATIVE_PACKAGES the space-separated list of JNI packages (directories)
DEP_CATEGORIES ?=
JAVADOC_PACKAGES ?=
include $(ARGEO_BUILD_BASE)common.mk
# The following variables should be declared in the including Makefile:
-# CATEGORIES the space-separated list of categories to repackage
+# CATEGORIES the space-separated list of categories to repackage
A2_BASE ?=/usr/share/a2 /usr/local/share/a2 $(A2_OUTPUT)