diff --git a/.gitignore b/.gitignore index ed0f292..019970b 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,7 @@ test_adapter .gnupg .pEp* lib -local.conf +build.conf build/ # Default ignored files ?idea/ diff --git a/DEPENDENCIES b/DEPENDENCIES index 8f87b5f..9017b17 100644 --- a/DEPENDENCIES +++ b/DEPENDENCIES @@ -1,12 +1,4 @@ # 1st Party Dependencies ## Prefer git tags instead of SHA hashes when possible. -# Change: -# libpEpAdapter does not specify any dependencies atm. -# libpEpAdapter is always being used as part of an adapter -# This adapter has to specify the pEpEngine version .e.g - - -# fdik: dep graph has to be taken from DEP file -# fdik: dependencies need to be resolved recursively from top to bottom -# fdik: stack then needs to be built from the bottom up +libpEpCxx11=3.3.0-RC0 diff --git a/Makefile.conf b/Makefile.conf index c69f453..60768c1 100644 --- a/Makefile.conf +++ b/Makefile.conf @@ -3,7 +3,24 @@ # This file may be used under the terms of the GNU General Public License version 3 # see LICENSE.txt -HERE:=$(dir $(lastword $(MAKEFILE_LIST))) +# BUILD_CONF must be specified relative to the repo root or must be an absolute path +# BUILD_CONF defaults to ./build.conf +REPO_ROOT_REL:=$(dir $(lastword $(MAKEFILE_LIST))) +ifndef BUILD_CONF + BUILD_CONF=$(REPO_ROOT_REL)/build.conf + -include $(BUILD_CONF) +else + BUILD_CONF_EFF=$(BUILD_CONF) + ifeq ($(dir $(BUILD_CONF)),./) + BUILD_CONF_EFF=$(REPO_ROOT_REL)/$(BUILD_CONF) + endif + ifeq ($(wildcard $(BUILD_CONF_EFF)),) + $(info BUILD_CONF must be specified relative to the repo root or must be an absolute path) + $(error file specified using BUILD_CONF ($(BUILD_CONF)) not found) + endif + include $(BUILD_CONF_EFF) +endif + TARGET=libpEpAdapter.a @@ -12,9 +29,6 @@ TARGET=libpEpAdapter.a DEBUG=1 PREFIX?=$(HOME) -# Overrides --include $(HERE)local.conf - # Constants CXXFLAGS+=-std=c++11 -fPIC CXXFLAGS+=-Wall -pedantic-errors -Wno-unused-parameter -Wno-reorder-ctor diff --git a/README.md b/README.md index 536bd19..4663db2 100644 --- a/README.md +++ b/README.md @@ -3,15 +3,24 @@ ## Build Configuration -The build configuration file is called `local.conf`. -Use the file `local.conf.example` as a template. +The build configuration file is called `build.conf` or can be specified (relative to repo root) using +the env var `BUILD_CONF`. + +Use the file `build.conf.example` as a template. ```bash -cp local.conf.example local.conf +cp build.conf.example build.conf ``` Then, tweak it to your needs. +## Build Dependencies + +The aim of libpEpAdapter is to stay 3rd party dependency free. +The 1st party direct dependencies are specified in the DEPENDENCIES file. + +Please note: The tests require the testframework PityTest11 to be installed in the PREFIX specified. + ## Make Targets The default make target is `src`. diff --git a/local.conf.example b/build.conf.example similarity index 73% rename from local.conf.example rename to build.conf.example index f53ff09..5c79d84 100644 --- a/local.conf.example +++ b/build.conf.example @@ -1,7 +1,7 @@ -# This is an Example build config file (local.conf) +# This is an Example build config file (build.conf) # you might not need this file, but if the defaults dont work for you # You can override them here. -# Tweak the values to your needs and rename it to local.conf +# Tweak the values to your needs and rename it to build.conf ######### C++ Compiler ######### # Should work with clang and g++ diff --git a/scripts/centos8/build_libpEpAdapter.sh b/scripts/centos8/build_libpEpAdapter.sh index 1f4a6c5..b5b6b89 100755 --- a/scripts/centos8/build_libpEpAdapter.sh +++ b/scripts/centos8/build_libpEpAdapter.sh @@ -1,8 +1,8 @@ #!/usr/bin/env sh set -exo -echo "ENGINE_LIB_PATH=${INSTPREFIX}/lib" >> local.conf -echo "ENGINE_INC_PATH=${INSTPREFIX}/include" >> local.conf +echo "ENGINE_LIB_PATH=${INSTPREFIX}/lib" >> build.conf +echo "ENGINE_INC_PATH=${INSTPREFIX}/include" >> build.conf make make install PREFIX="${INSTPREFIX}" diff --git a/scripts/debian10/build_libpEpAdapter.sh b/scripts/debian10/build_libpEpAdapter.sh index 1f4a6c5..b5b6b89 100755 --- a/scripts/debian10/build_libpEpAdapter.sh +++ b/scripts/debian10/build_libpEpAdapter.sh @@ -1,8 +1,8 @@ #!/usr/bin/env sh set -exo -echo "ENGINE_LIB_PATH=${INSTPREFIX}/lib" >> local.conf -echo "ENGINE_INC_PATH=${INSTPREFIX}/include" >> local.conf +echo "ENGINE_LIB_PATH=${INSTPREFIX}/lib" >> build.conf +echo "ENGINE_INC_PATH=${INSTPREFIX}/include" >> build.conf make make install PREFIX="${INSTPREFIX}"