summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2012-06-14 20:26:04 +0000
committerFelix Fietkau <nbd@openwrt.org>2012-06-14 20:26:04 +0000
commitcf788fc7317c3e4a5bab17194c680ed5b0df39a7 (patch)
tree54033494addfdcb52ee6189f0578856d9422ff92 /include
parent3051de8701b5c13e4df781c52950c68234b04ee4 (diff)
downloadmtk-20170518-cf788fc7317c3e4a5bab17194c680ed5b0df39a7.zip
mtk-20170518-cf788fc7317c3e4a5bab17194c680ed5b0df39a7.tar.gz
mtk-20170518-cf788fc7317c3e4a5bab17194c680ed5b0df39a7.tar.bz2
build: add a config option for choosing the prefered standard c++ library and add uclibc++.mk to make this easy to handle in packages
SVN-Revision: 32369
Diffstat (limited to 'include')
-rw-r--r--include/package.mk2
-rw-r--r--include/uclibc++.mk12
2 files changed, 14 insertions, 0 deletions
diff --git a/include/package.mk b/include/package.mk
index e955c20..abffa0c 100644
--- a/include/package.mk
+++ b/include/package.mk
@@ -5,6 +5,8 @@
# See /LICENSE for more information.
#
+__package_mk:=1
+
all: $(if $(DUMP),dumpinfo,compile)
PKG_BUILD_DIR ?= $(BUILD_DIR)/$(PKG_NAME)$(if $(PKG_VERSION),-$(PKG_VERSION))
diff --git a/include/uclibc++.mk b/include/uclibc++.mk
new file mode 100644
index 0000000..8174843
--- /dev/null
+++ b/include/uclibc++.mk
@@ -0,0 +1,12 @@
+ifndef DUMP
+ ifdef __package_mk
+ $(error uclibc++.mk must be included before package.mk)
+ endif
+endif
+
+PKG_PREPARED_DEPENDS += CONFIG_USE_UCLIBCXX
+CXX_DEPENDS = +USE_UCLIBCXX:uclibcxx +USE_LIBSTDCXX:libstdcpp
+
+ifneq ($(CONFIG_USE_UCLIBCXX),)
+ TARGET_CXX="g++-uc"
+endif