diff options
author | Angelo Mantellini (manangel) <angelo.mantellini@irt-systemx.fr> | 2017-03-29 18:00:06 +0200 |
---|---|---|
committer | Angelo Mantellini (manangel) <angelo.mantellini@irt-systemx.fr> | 2017-03-30 18:58:33 +0200 |
commit | 3137acdd5a45285dab9903f9d41560c63eca8523 (patch) | |
tree | 38bd8525a9e214d848a73fc40e81ddb182cf91b6 /config | |
parent | 9b30fc10fb1cbebe651e5a107e8ca5b24de54675 (diff) |
first commit
Change-Id: I8412b8e7d966c2fbc508b537fd9a9bbcfc628ca8
Signed-off-by: Angelo Mantellini (manangel) <angelo.mantellini@irt-systemx.fr>
Diffstat (limited to 'config')
-rw-r--r-- | config/MasterIDE-CMakeLists.txt | 29 | ||||
-rw-r--r-- | config/README | 21 | ||||
-rw-r--r-- | config/config.android | 34 | ||||
-rw-r--r-- | config/config.mk | 105 | ||||
-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 |
20 files changed, 538 insertions, 0 deletions
diff --git a/config/MasterIDE-CMakeLists.txt b/config/MasterIDE-CMakeLists.txt new file mode 100644 index 00000000..86df8a45 --- /dev/null +++ b/config/MasterIDE-CMakeLists.txt @@ -0,0 +1,29 @@ +# This is a master CMakeLists.txt file for IDEs. If you are viewing this as +# CMakeLists.txt in the source directory IT IS A COPY and SHOULD NOT BE EDITED - +# edit the MasterIDE-CMakeLists.txt in CCNx_Distillery/config instead. +# +cmake_minimum_required(VERSION 3.2) +project (master) + +message("--- Collecting all sub-projects ---") + +macro(Subdirs result parent) + file(GLOB children LIST_DIRECTORIES true RELATIVE ${parent} "[^.]*") + set(dirlist "") + foreach(child ${children}) + if(IS_DIRECTORY ${parent}/${child}) + if(EXISTS ${parent}/${child}/CMakeLists.txt) + list(APPEND dirlist ${child}) + endif() + endif() + endforeach() + set(${result} ${dirlist}) +endmacro() + +Subdirs(modules ${CMAKE_SOURCE_DIR}) + +foreach(module ${modules}) + message("module: ${module}") + set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/${module}/cmake/Modules") + add_subdirectory(${module}) +endforeach() diff --git a/config/README b/config/README new file mode 100644 index 00000000..11512f46 --- /dev/null +++ b/config/README @@ -0,0 +1,21 @@ +CCNx Distillery Config Directory + +This is the directory where CCNx Distillery stores it's configuration +information. Most configuration is parsed by makefile so the files are in +makefile format. + +Important files and directories + +# config.mk +This is the default configuration. DO NOT CHANGE THIS FILE. You can use this +file as a template to create your own configuration. + +# modules +This is the modules directory. It has the configuration file for each module +that is available through Distillery. + +# local +This directory (may or may not exist) is the place to put your local +configuration files. It gets ignored by git. Make will look for a +configuration file called config.mk in this directory to configure this +specific instance of Distillery. diff --git a/config/config.android b/config/config.android new file mode 100644 index 00000000..9383d049 --- /dev/null +++ b/config/config.android @@ -0,0 +1,34 @@ +# +# These are the CMAKE settings for an Android cross-compile. You need to +# update them with your toolchain paths and versions. +# +# To enable these settings being passed to the build, add the following line +# in your Distillery config file (e.g. ~/.ccnx/distillery/config.mk) +# CNX_COMPILE_ENVIRONMENT =-DCMAKE_TOOLCHAIN_FILE=~/Dev/CCNx_Distillery/config/config.android +# +# + +set(ANDROID_NDK_VERSION "android-ndk-r13b") +set(ANDROID_API_VERSION "android-23") +set(ANDROID_TOOLCHAIN "arm-linux-androideabi") +set(ANDROID_TOOLCHAIN_VERSION "${ANDROID_TOOLCHAIN}-4.9") +set(ANDROID_API "${ANDROID_API_VERSION}") +set(ANDROID_SDK "$ENV{SDK}") +set(ANDROID_NDK "$ENV{NDK}") +set(ANDROID_NDK_ROOT "${ANDROID_NDK}") + +set(TOOLCHAIN_VERSION_ROOT "${ANDROID_NDK}/toolchains/${ANDROID_TOOLCHAIN_VERSION}") +set(TOOLCHAIN_BIN "${TOOLCHAIN_VERSION_ROOT}/prebuilt/$ENV{OS}-$ENV{ARCH}/bin") + +set(SYSROOT "${ANDROID_NDK}/platforms/${ANDROID_API_VERSION}/arch-arm/") + +set(CMAKE_SYSTEM_NAME Android) +set(CMAKE_SYSROOT "${ANDROID_NDK}/platforms/${ANDROID_API_VERSION}/arch-arm/") +set(CMAKE_C_COMPILER "${TOOLCHAIN_BIN}/${ANDROID_TOOLCHAIN}-gcc") +set(CMAKE_RANLIB "${TOOLCHAIN_BIN}/${ANDROID_TOOLCHAIN}-ranlib") + +set(ANDROID_C_FLAGS "--sysroot=${SYSROOT} -Wall -D_ANDROID_ -D_$ENV{ANDROID_API_VERSION}_") + +set(CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS} "--sysroot=${SYSROOT}") +set(CMAKE_MODULE_LINKER_FLAGS ${CMAKE_MODULE_LINKER_FLAGS} "--sysroot=${SYSROOT}") +set(CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS} "--sysroot=${SYSROOT}") diff --git a/config/config.mk b/config/config.mk new file mode 100644 index 00000000..d06f58dd --- /dev/null +++ b/config/config.mk @@ -0,0 +1,105 @@ + ############################################################################# + # Copyright (c) 2017 Cisco and/or its affiliates. + # Licensed under the Apache License, Version 2.0 (the "License"); + # you may not use this file except in compliance with the License. + # You may obtain a copy of the License at: + # + # http://www.apache.org/licenses/LICENSE-2.0 + # + # Unless required by applicable law or agreed to in writing, software + # distributed under the License is distributed on an "AS IS" BASIS, + # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + # See the License for the specific language governing permissions and + # limitations under the License. + ############################################################################## + + + + +#DISTILLERY_GITHUB_UPSTREAM_NAME?=ccnxs_upstream +# The name to give this upstream +DISTILLERY_GITHUB_UPSTREAM_NAME?=ccnx_upstream + +# DISTILLERY_GITHUB_UPSTREAM_REPO=${DISTILLERY_GITHUB_UPSTREAM_URL}/CCNx_Distillery +# The upstream that we expect on Distillery itself. +DISTILLERY_GITHUB_UPSTREAM_REPO?=${DISTILLERY_GITHUB_UPSTREAM_URL}/CCNx_Distillery + +# DISTILLERY_ROOT_DIR=/path/to/root/dir +# This is the root directory of the Distillery distribution. Many other paths depend +# on this. This file assumes that make is being run from the DISTILLERY +# directory. If this is not true, it's convenient to assign the variable at the +# shell. +DISTILLERY_ROOT_DIR?=$(shell pwd) +# This is a variable that can be used to multiplex the build. +# If you set this variable the default output directories will have this +# appended to them +DISTILLERY_BUILD_NAME?= + +# This is the directory where things are built. +# Note that if some modules don't support off-tree builds you may have problems +DISTILLERY_BUILD_DIR?=${DISTILLERY_ROOT_DIR}/build${DISTILLERY_BUILD_NAME} + +# This is the directory where the source is checked out. +DISTILLERY_SOURCE_DIR?=${DISTILLERY_ROOT_DIR}/src + +# MAKE_BUILD_FLAGS +# Flags to pass to make when building the projects. This is mostly used for +# parallel builds. Disable by setting it to empty +MAKE_BUILD_FLAGS?=-j8 + +# DISTILLERY_INSTALL_DIR=/path/to/install/dir +# This is the directory where all the ccn software will be installed. This +# directory will be DELETED if you do a make clobber. Do not treat this the +# same way you would treat a system install directory. +DISTILLERY_INSTALL_DIR?=${DISTILLERY_ROOT_DIR}/usr + +# DISTILLERY_DEPENDENCIES_DIR=/path/to/dependencies/dir +# This is the path to the dependencies directory. It is used as the base for +# the dependencies install directories. (tools and libraries) +# You should normally not edit this variable. +DISTILLERY_DEPENDENCIES_DIR?=${DISTILLERY_INSTALL_DIR} + +# DISTILLERY_EXTERN_DIR=/path/to/dependencies/external/install/dir +# This is the directory where the dependencies will be installed. This +# directory is deleted and created as needed by the dependencies system. +# It is used in gravy for includes and linking. This should be for the TARGET +# architecture. +DISTILLERY_EXTERN_DIR?=${DISTILLERY_DEPENDENCIES_DIR} +CCNX_DEPENDENCIES?=${DISTILLERY_EXTERN_DIR} +export CCNX_DEPENDENCIES + +# DISTILLERY_TOOLS_DIR=/path/to/dependency/tools/dir +# This directory holds some of the tools needed to build libccnx. It should be +# built for the HOST. The directory might be deleted and rebuilt by the +# dependency system. The directory will be included in the execution PATH as +# Distillery builds all the modules. +DISTILLERY_TOOLS_DIR?=${DISTILLERY_DEPENDENCIES_DIR}/build-tools + +# DISTILLERY_XCODE_DIR?=${DISTILLERY_ROOT_DIR}/xcode +# Directory where distillery will create the xcode project files. This is done +# via cmake's build system. Modules that don't use cmake won't have a way to +# create this unless the Makefile provides a way. +DISTILLERY_XCODE_DIR?=${DISTILLERY_ROOT_DIR}/xcode + +# CMAKE_MAKE_TEST_ARGS="ARGS=-j16" +# Tell CTest (via CMake) to run parallel tests (16) +# To run only 1 test at a time run with -j1 or set it empty +CMAKE_MAKE_TEST_ARGS?="ARGS=-j16" + + +# CCNX_HOME +# These variables are used by scripts to know where to find the installed +# CCNX software and libaries. They are also used by various packaging scripts. +CCNX_HOME=${DISTILLERY_INSTALL_DIR} +export DISTILLERY_ROOT_DIR +export SDK=$(shell if [ -z ${SDK_PATH} ]; then echo ${DISTILLERY_ROOT_DIR}/sdk/sdk; else echo ${SDK_PATH}; fi;) +export NDK=$(shell if [ -z ${NDK_PATH} ]; then echo ${DISTILLERY_ROOT_DIR}/sdk/ndk-bundle; else echo ${NDK_PATH}; fi;) +export CMAKE=$(shell if [ -z ${CMAKE_PATH} ]; then echo ${DISTILLERY_ROOT_DIR}/sdk/cmake/bin/; else echo ${CMAKE_PATH}; fi;) +export OS=$(shell uname | tr '[:upper:]' '[:lower:]') +export ARCH=$(shell uname -m) + +CCNX_COMPILE_ENVIRONMENT=-DCMAKE_TOOLCHAIN_FILE=${DISTILLERY_ROOT_DIR}/config/config.android +OPEN_SSL_DIR=-DOPENSSL_ROOT_DIR=${DISTILLERY_INSTALL_DIR} +LIBEVENT_ROOT=${DISTILLERY_INSTALL_DIR} +ABI=armeabi-v7a + 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. |