diff options
Diffstat (limited to 'config/modules')
-rw-r--r-- | config/modules/000-dependencies.mk | 6 | ||||
-rw-r--r-- | config/modules/000-distillery-update.mk | 21 | ||||
-rw-r--r-- | config/modules/000-gitModule.mk | 106 | ||||
-rw-r--r-- | config/modules/001-modules.mk | 62 | ||||
-rw-r--r-- | config/modules/002-cmake-modules.mk | 91 | ||||
-rw-r--r-- | config/modules/002-make-modules.mk | 50 | ||||
-rw-r--r-- | config/modules/100-distillery.mk | 2 | ||||
-rw-r--r-- | config/modules/110-longbow.mk | 1 | ||||
-rw-r--r-- | config/modules/120-libparc.mk | 1 | ||||
-rw-r--r-- | config/modules/210-libccnx-common.mk | 1 | ||||
-rw-r--r-- | config/modules/220-libccnx-transport-rta.mk | 1 | ||||
-rw-r--r-- | config/modules/230-libccnx-portal.mk | 1 | ||||
-rw-r--r-- | config/modules/510-Metis.mk | 1 | ||||
-rw-r--r-- | config/modules/610-libdash.mk | 1 | ||||
-rw-r--r-- | config/modules/610-libicnet.mk | 1 | ||||
-rw-r--r-- | config/modules/README | 3 |
16 files changed, 349 insertions, 0 deletions
diff --git a/config/modules/000-dependencies.mk b/config/modules/000-dependencies.mk new file mode 100644 index 00000000..30b5616b --- /dev/null +++ b/config/modules/000-dependencies.mk @@ -0,0 +1,6 @@ +define generate_file + ./init.sh ${ABI} ${NDK} + +endef +all: + $(call generate_file) diff --git a/config/modules/000-distillery-update.mk b/config/modules/000-distillery-update.mk new file mode 100644 index 00000000..efdab169 --- /dev/null +++ b/config/modules/000-distillery-update.mk @@ -0,0 +1,21 @@ +########################################## +# Tell people they need to use the "new" way. + +define errorMessage + $(warning * Attention, the configuration for GitHub has changed) + $(warning * DISTILLERY_GITHUB_USER is depricated. You shoud now) + $(warning * use DISTILLERY_GITHUB_URL_USER) + $(warning * DISTILLERY_GITHUB_SERVER is depricated. You shoud now) + $(warning * use DISTILLERY_GITHUB_URL) + $(warning * Set this in your config file .ccnx/distillery/config.mk) + $(warning * See config/config.mk for default values) + $(error ERROR: Make found depricated variable $1) +endef + +ifdef DISTILLERY_GITHUB_USER + $(call errorMessage,DISTILLERY_GITHUB_USER) +endif + +ifdef DISTILLERY_GITHUB_SERVER + $(call errorMessage,DISTILLERY_GITHUB_SERVER) +endif diff --git a/config/modules/000-gitModule.mk b/config/modules/000-gitModule.mk new file mode 100644 index 00000000..af500a19 --- /dev/null +++ b/config/modules/000-gitModule.mk @@ -0,0 +1,106 @@ +############################################################ +# Distillery Git Module +# +# This is a framework for Distillery Git Modules. +# +# Modules can add themselves do distillery by calling the addGitModule +# function. A module called Foo would do the following: +# +# $(eval $(call addGitModule,Foo)) +# +# Assumptions +# - The source for Foo is in git, located at: ${DISTILLERY_GITHUB_URL}/Foo +# You can change this via a variable, see bellow. +# +# Parameters: +# This function can be modified by setting some variables for the specified +# module. These variables must be set BEFORE you call the function. replace +# "Module" by the parameter passed on to the funcion. +# +# - Module_GIT_REPOSITORY +# URL to the Git repository of the source. +# Defaults to: ${DISTILLERY_GITHUB_URL}${DISTILLERY_GITHUB_URL_USER}/Foo +# You can modify this to point to a different repository. (git origin) +# - Module_GIT_UPSTREAM_REPOSITORY +# URL to the remote git repository to use as upstream. This defaults to +# ${DISTILLERY_GITHUB_UPSTREAM_URL}/Module. The remote will be added to git +# under the name ${DISTILLERY_GITHUB_UPSTREAM_NAME} +# - Module_SOURCE_DIR +# Location where the source will be downloaded. Don't change this unless you +# have a very good reason to. +# - Module_BUILD_DIR +# Location where the source will be built. Don't change this unless you have +# a very good reason to. + + +define addGitModule +$(eval $1_SOURCE_DIR?=${DISTILLERY_SOURCE_DIR}/$1) +$(eval $1_BUILD_DIR?=${DISTILLERY_BUILD_DIR}/$1) +$(eval $1_GIT_CONFIG?=${$1_SOURCE_DIR}/.git/config) +$(eval $1_GIT_REPOSITORY?=${DISTILLERY_GITHUB_URL}${DISTILLERY_GITHUB_URL_USER}/$1) +$(eval $1_GIT_UPSTREAM_REPOSITORY?=${DISTILLERY_GITHUB_UPSTREAM_URL}/$1) +$(eval gitmodules+=$1) + +status: $1.status + +$1.status: tools/bin/getStatus + @tools/bin/getStatus ${$1_SOURCE_DIR} + +fetch: $1.fetch + +$1.fetch: + @echo -------------------------------------------- + @echo $1 + @cd ${$1_SOURCE_DIR}; git fetch --all + +branch: $1.branch + +$1.branch: + @echo -------------------------------------------- + @echo $1 + @cd ${$1_SOURCE_DIR}; git branch -avv + @echo + +nuke-all-modules: $1.nuke + +$1.nuke: + @cd ${$1_SOURCE_DIR}; git clean -dfx && git reset --hard + +sync: $1.sync + +$1.sync: ${DISTILLERY_ROOT_DIR}/tools/bin/syncOriginMasterWithCCNXUpstream + @echo "-------------------------------------------------------------------" + @echo $1 + @cd ${$1_SOURCE_DIR}; ${DISTILLERY_ROOT_DIR}/tools/bin/syncOriginMasterWithCCNXUpstream + +update: $1.update + +$1.update: ${$1_GIT_CONFIG} + @echo "-------------------------------------------------------------------" + @echo "- Updating ${$1_SOURCE_DIR}" + @cd ${$1_SOURCE_DIR} && git fetch --all && git pull + @echo + +${$1_GIT_CONFIG}: tools/bin/gitCloneOneOf tools/bin/gitAddUpstream + @tools/bin/gitCloneOneOf $1 ${$1_SOURCE_DIR} ${$1_GIT_REPOSITORY} ${$1_GIT_UPSTREAM_REPOSITORY} + @tools/bin/gitAddUpstream $1 ${$1_SOURCE_DIR} ${DISTILLERY_GITHUB_UPSTREAM_NAME} ${$1_GIT_UPSTREAM_REPOSITORY} + +info: $1.info + +$1.info: + @echo "# $1 INFO " + @echo "$1_SOURCE_DIR = ${$1_SOURCE_DIR}" + @echo "$1_BUILD_DIR = ${$1_BUILD_DIR}" + @echo "$1_GIT_REPOSITORY = ${$1_GIT_REPOSITORY}" + @echo "$1_GIT_UPSTREAM_REPOSITORY = ${$1_GIT_UPSTREAM_REPOSITORY}" + +gitstatus: $1.gitstatus + +$1.gitstatus: tools/bin/gitStatus + @tools/bin/gitStatus $1 ${$1_SOURCE_DIR} ${$1_GIT_REPOSITORY} \ + ${DISTILLERY_GITHUB_UPSTREAM_NAME} ${$1_GIT_UPSTREAM_REPOSITORY} + +endef + +gitmodule.list: + @echo ${gitmodules} diff --git a/config/modules/001-modules.mk b/config/modules/001-modules.mk new file mode 100644 index 00000000..fbcf6536 --- /dev/null +++ b/config/modules/001-modules.mk @@ -0,0 +1,62 @@ +############################################################ +# Distillery Module +# +# This is a framework for Distillery Modules. +# +# Modules can add themselves do distillery by calling the addModule +# function. A module called Foo would do the following: +# +# $(eval $(call addModule,Foo)) +# +# Assumptions +# - The source for Foo is in git, located at: ${DISTILLERY_GITHUB_URL}/Foo +# You can change this via a variable, see bellow. +# - The source can do an off-tree build. +# +# Parameters: +# This function can be modified by setting some variables for the specified +# module. These variables must be set BEFORE you call the function. replace +# "Module" by the parameter passed on to the funcion. +# +# - Module_GIT_REPOSITORY +# URL to the Git repository of the source. +# Defaults to: ${DISTILLERY_GITHUB_URL}${DISTILLERY_GITHUB_URL_USER}/Foo +# You can modify this to point to a different repository. (git origin) +# - Module_GIT_UPSTREAM_REPOSITORY +# URL to the remote git repository to use as upstream. This defaults to +# ${DISTILLERY_GITHUB_UPSTREAM_URL}/Module. The remote will be added to git +# under the name ${DISTILLERY_GITHUB_UPSTREAM_NAME} +# - Module_SOURCE_DIR +# Location where the source will be downloaded. Don't change this unless you +# have a very good reason to. +# - Module_BUILD_DIR +# Location where the source will be built. Don't change this unless you have +# a very good reason to. +# - Module_XCODE_DIR +# Location where to put the xcode project Defaults to +# ${DISTILLERY_XCODE_DIR}/Module + + +define addModule +$(eval $(call addGitModule,$1)) +$(eval modules+=$1) + +$1: $1.build $1.install + +$1.step: $1.build $1.check $1.install + +$1.build: ${$1_BUILD_DIR}/Makefile + ${MAKE} ${MAKE_BUILD_FLAGS} -C ${$1_BUILD_DIR} + +$1.install: ${$1_BUILD_DIR}/Makefile + @${MAKE} ${MAKE_BUILD_FLAGS} -C ${$1_BUILD_DIR} install + +$1.clean: ${$1_BUILD_DIR}/Makefile + @${MAKE} ${MAKE_BUILD_FLAGS} -C ${$1_BUILD_DIR} clean + +$1.distclean: + rm -rf ${$1_BUILD_DIR} +endef + +module.list: + @echo ${modules} diff --git a/config/modules/002-cmake-modules.mk b/config/modules/002-cmake-modules.mk new file mode 100644 index 00000000..3378443c --- /dev/null +++ b/config/modules/002-cmake-modules.mk @@ -0,0 +1,91 @@ +############################################################ +# Distillery CMake Module +# +# This is a framework for Distillery Modules using cmake. +# +# Modules can add themselves do distillery by calling the addCMakeModule +# function. A module called Foo would do the following: +# +# $(eval $(call addCmakeModule,Foo)) +# +# Assumptions +# - The source for Foo is in git, located at: ${DISTILLERY_GITHUB_URL}/Foo +# You can change this via a variable, see bellow. +# - The source can do an off-tree build. +# - The source is compiled via CMake +# +# Parameters: +# This function can be modified by setting some variables for the specified +# module. These variables must be set BEFORE you call the function. replace +# "Module" by the parameter passed on to the funcion. +# +# - Module_GIT_REPOSITORY +# URL to the Git repository of the source. +# Defaults to: ${DISTILLERY_GITHUB_URL}${DISTILLERY_GITHUB_URL_USER}/Foo +# You can modify this to point to a different repository. (git origin) +# - Module_GIT_UPSTREAM_REPOSITORY +# URL to the remote git repository to use as upstream. This defaults to +# ${DISTILLERY_GITHUB_UPSTREAM_URL}/Module. The remote will be added to git +# under the name ${DISTILLERY_GITHUB_UPSTREAM_NAME} +# - Module_SOURCE_DIR +# Location where the source will be downloaded. Don't change this unless you +# have a very good reason to. +# - Module_BUILD_DIR +# Location where the source will be built. Don't change this unless you have +# a very good reason to. +# - Module_XCODE_DIR +# Location where to put the xcode project Defaults to +# ${DISTILLERY_XCODE_DIR}/Module + + + +define addCMakeModule +$(eval $(call addModule,$1)) +$(eval $1_XCODE_DIR?=${DISTILLERY_XCODE_DIR}/$1) +$(eval modules_xcode+=$1) + +${$1_BUILD_DIR}/Makefile: ${$1_SOURCE_DIR}/CMakeLists.txt ${DISTILLERY_STAMP} + mkdir -p ${$1_BUILD_DIR} + cd ${$1_BUILD_DIR}; \ + DEPENDENCY_HOME=${DISTILLERY_EXTERN_DIR} \ + ${CMAKE}/cmake ${$1_SOURCE_DIR} \ + -DOPENSSL_ROOT_DIR=OPEN_SSL_DIR \ + ${CMAKE_BUILD_TYPE_FLAG} \ + ${CCNX_COMPILE_ENVIRONMENT} \ + -DCMAKE_INSTALL_PREFIX=${DISTILLERY_INSTALL_DIR} + +${$1_SOURCE_DIR}/CMakeLists.txt: + @echo "**option **1" + @$(MAKE) distillery.checkout.error + +$1.check: ${$1_BUILD_DIR}/Makefile + @echo "**option **2" + @${MAKE} ${MAKE_BUILD_FLAGS} -C ${$1_BUILD_DIR} test ${CMAKE_MAKE_TEST_ARGS} + +$1.xcode: + @echo "**option **3" + @mkdir -p ${$1_XCODE_DIR} + @cd ${$1_XCODE_DIR} && {CMAKE}/cmake ${$1_SOURCE_DIR} + +$1.xcodeopen: $1.xcode + @echo "**option **4" + @open ${$1_XCODE_DIR}/$1.xcodeproj + +$1.coverage: + @echo "**option **5" + + @echo "### $1: " + @longbow-coverage-report ` find ${$1_BUILD_DIR} -type f -name 'test_*' -not -name '*\.*' ` + +$1.average-coverage: + @echo "**option **6" + @echo "### $1: " + @longbow-coverage-report -a ` find ${$1_BUILD_DIR} -type f -name 'test_*' -not -name '*\.*' ` + + +xcode: $1.xcode + +$1.documentation: + @${MAKE} ${MAKE_BUILD_FLAGS} -C ${$1_BUILD_DIR} documentation + +endef diff --git a/config/modules/002-make-modules.mk b/config/modules/002-make-modules.mk new file mode 100644 index 00000000..acb82a46 --- /dev/null +++ b/config/modules/002-make-modules.mk @@ -0,0 +1,50 @@ +############################################################ +# Distillery Make Module +# +# This is a framework for Distillery Modules using make. +# +# Modules can add themselves do distillery by calling the addMakeModule +# function. A module called Foo would do the following: +# +# $(eval $(call addMakeModule,Foo)) +# +# Assumptions +# - The source for Foo is in git, located at: ${DISTILLERY_GITHUB_URL}/Foo +# You can change this via a variable, see bellow. +# - The source can do an off-tree build. +# - The source is compiled via Make +# +# Parameters: +# This function can be modified by setting some variables for the specified +# module. These variables must be set BEFORE you call the function. replace +# "Module" by the parameter passed on to the funcion. +# +# - Module_GIT_REPOSITORY +# URL to the Git repository of the source. +# Defaults to: ${DISTILLERY_GITHUB_URL}${DISTILLERY_GITHUB_URL_USER}/Foo +# You can modify this to point to a different repository. (git origin) +# - Module_GIT_UPSTREAM_REPOSITORY +# URL to the remote git repository to use as upstream. This defaults to +# ${DISTILLERY_GITHUB_UPSTREAM_URL}/Module. The remote will be added to git +# under the name ${DISTILLERY_GITHUB_UPSTREAM_NAME} +# - Module_SOURCE_DIR +# Location where the source will be downloaded. Don't change this unless you +# have a very good reason to. +# - Module_BUILD_DIR +# Location where the source will be built. Don't change this unless you have +# a very good reason to. + + +define addMakeModule +$(eval $(call addModule,$1)) + +${$1_BUILD_DIR}/Makefile: ${$1_SOURCE_DIR}/Makefile + @cp -rf ${$1_SOURCE_DIR}/ ${$1_BUILD_DIR}/ + +${$1_SOURCE_DIR}/Makefile: + @$(MAKE) distillery.checkout.error + +$1.check: ${$1_BUILD_DIR}/Makefile + @${MAKE} ${MAKE_BUILD_FLAGS} -C ${$1_BUILD_DIR} check + +endef diff --git a/config/modules/100-distillery.mk b/config/modules/100-distillery.mk new file mode 100644 index 00000000..aebd7e70 --- /dev/null +++ b/config/modules/100-distillery.mk @@ -0,0 +1,2 @@ +CCNx_Distillery_SOURCE_DIR=${DISTILLERY_ROOT_DIR} +$(eval $(call addGitModule,CCNx_Distillery)) diff --git a/config/modules/110-longbow.mk b/config/modules/110-longbow.mk new file mode 100644 index 00000000..5ff627ea --- /dev/null +++ b/config/modules/110-longbow.mk @@ -0,0 +1 @@ +$(eval $(call addCMakeModule,cframework/longbow)) diff --git a/config/modules/120-libparc.mk b/config/modules/120-libparc.mk new file mode 100644 index 00000000..54aec63d --- /dev/null +++ b/config/modules/120-libparc.mk @@ -0,0 +1 @@ +$(eval $(call addCMakeModule,cframework/libparc)) diff --git a/config/modules/210-libccnx-common.mk b/config/modules/210-libccnx-common.mk new file mode 100644 index 00000000..c0e86394 --- /dev/null +++ b/config/modules/210-libccnx-common.mk @@ -0,0 +1 @@ +$(eval $(call addCMakeModule,ccnxlibs/libccnx-common)) diff --git a/config/modules/220-libccnx-transport-rta.mk b/config/modules/220-libccnx-transport-rta.mk new file mode 100644 index 00000000..4fb576d4 --- /dev/null +++ b/config/modules/220-libccnx-transport-rta.mk @@ -0,0 +1 @@ +$(eval $(call addCMakeModule,ccnxlibs/libccnx-transport-rta)) diff --git a/config/modules/230-libccnx-portal.mk b/config/modules/230-libccnx-portal.mk new file mode 100644 index 00000000..fee60acb --- /dev/null +++ b/config/modules/230-libccnx-portal.mk @@ -0,0 +1 @@ +$(eval $(call addCMakeModule,ccnxlibs/libccnx-portal)) diff --git a/config/modules/510-Metis.mk b/config/modules/510-Metis.mk new file mode 100644 index 00000000..ba11067e --- /dev/null +++ b/config/modules/510-Metis.mk @@ -0,0 +1 @@ +$(eval $(call addCMakeModule,sb-forwarder/metis)) diff --git a/config/modules/610-libdash.mk b/config/modules/610-libdash.mk new file mode 100644 index 00000000..9c697abb --- /dev/null +++ b/config/modules/610-libdash.mk @@ -0,0 +1 @@ +$(eval $(call addCMakeModule,libdash)) diff --git a/config/modules/610-libicnet.mk b/config/modules/610-libicnet.mk new file mode 100644 index 00000000..249f852c --- /dev/null +++ b/config/modules/610-libicnet.mk @@ -0,0 +1 @@ +$(eval $(call addCMakeModule,libicnet)) diff --git a/config/modules/README b/config/modules/README new file mode 100644 index 00000000..fca97fb8 --- /dev/null +++ b/config/modules/README @@ -0,0 +1,3 @@ +CCNx Distillery Modules + +These modules are loaded in order. |