X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;f=common.mk;h=025ac54ae8a96d19d057fa3c005d9136d7ff0c0b;hb=7d19aef426a026deea2b2f41d2b5f87bce948798;hp=2ef806336bcc267ecfe299abf0c11b49bb817970;hpb=ed86c203d9fcb9113431795edf3e7712b81e2c65;p=cc0%2Fargeo-build.git diff --git a/common.mk b/common.mk index 2ef8063..025ac54 100644 --- a/common.mk +++ b/common.mk @@ -2,12 +2,38 @@ build-major=2 build-minor=3 # Required third party libraries -ECJ_BRANCH=3.32 +ECJ_MAJOR=3 BNDLIB_BRANCH=5.3 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 +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 ?=$(A2_OUTPUT) /usr/local/share/a2 /usr/share/a2 + # GNU defaults prefix ?= /usr/local datarootdir ?= $(prefix)/share +exec_prefix ?= $(prefix) +libdir ?= $(exec_prefix)/lib + +A2_INSTALL_TARGET ?= $(DESTDIR)$(datarootdir)/a2 +A2_NATIVE_INSTALL_TARGET ?= $(DESTDIR)$(libdir)/a2 + +# OS-speciific +KNOWN_ARCHS ?= x86_64 aarch64 +TARGET_OS ?= linux +TARGET_ARCH ?= $(shell uname -m) -A2_INSTALL_TARGET ?= $(datarootdir)/a2 \ No newline at end of file +TARGET_OS_CATEGORY_PREFIX=lib/linux +TARGET_ARCH_CATEGORY_PREFIX=$(TARGET_OS_CATEGORY_PREFIX)/$(TARGET_ARCH) +PORTABLE_CATEGORIES=$(filter-out lib/%, $(CATEGORIES)) +ARCH_CATEGORIES=$(filter $(TARGET_ARCH_CATEGORY_PREFIX)/%, $(CATEGORIES)) +OS_CATEGORIES=$(filter-out $(foreach arch, $(KNOWN_ARCHS), $(TARGET_OS_CATEGORY_PREFIX)/$(arch)/%), $(filter $(TARGET_OS_CATEGORY_PREFIX)/%, $(CATEGORIES)))