mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-24 02:19:23 +02:00
build: add TARGET_CXXFLAGS and EXTRA_CXXFLAGS, defaulting to *_CFLAGS via lazy evaluation. this allows adding c++ specific cflags
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30760 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
e8cb322296
commit
08faa98372
@ -55,6 +55,8 @@ ifneq ($(strip $(PKG_UNPACK)),)
|
|||||||
endef
|
endef
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
EXTRA_CXXFLAGS = $(EXTRA_CFLAGS)
|
||||||
|
|
||||||
CONFIGURE_PREFIX:=/usr
|
CONFIGURE_PREFIX:=/usr
|
||||||
CONFIGURE_ARGS = \
|
CONFIGURE_ARGS = \
|
||||||
--target=$(GNU_TARGET_NAME) \
|
--target=$(GNU_TARGET_NAME) \
|
||||||
@ -79,7 +81,7 @@ CONFIGURE_ARGS = \
|
|||||||
CONFIGURE_VARS = \
|
CONFIGURE_VARS = \
|
||||||
$(TARGET_CONFIGURE_OPTS) \
|
$(TARGET_CONFIGURE_OPTS) \
|
||||||
CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
|
CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
|
||||||
CXXFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
|
CXXFLAGS="$(TARGET_CXXFLAGS) $(EXTRA_CFLAGS)" \
|
||||||
CPPFLAGS="$(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \
|
CPPFLAGS="$(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \
|
||||||
LDFLAGS="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS)" \
|
LDFLAGS="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS)" \
|
||||||
|
|
||||||
@ -104,7 +106,7 @@ endef
|
|||||||
|
|
||||||
MAKE_VARS = \
|
MAKE_VARS = \
|
||||||
CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \
|
CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \
|
||||||
CXXFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \
|
CXXFLAGS="$(TARGET_CXXFLAGS) $(EXTRA_CXXFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \
|
||||||
LDFLAGS="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS)"
|
LDFLAGS="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS)"
|
||||||
|
|
||||||
MAKE_FLAGS = \
|
MAKE_FLAGS = \
|
||||||
|
1
rules.mk
1
rules.mk
@ -108,6 +108,7 @@ BUILD_LOG_DIR:=$(TOPDIR)/logs
|
|||||||
|
|
||||||
TARGET_PATH:=$(STAGING_DIR_HOST)/bin:$(subst $(space),:,$(filter-out .,$(filter-out ./,$(subst :,$(space),$(PATH)))))
|
TARGET_PATH:=$(STAGING_DIR_HOST)/bin:$(subst $(space),:,$(filter-out .,$(filter-out ./,$(subst :,$(space),$(PATH)))))
|
||||||
TARGET_CFLAGS:=$(TARGET_OPTIMIZATION)$(if $(CONFIG_DEBUG), -g3)
|
TARGET_CFLAGS:=$(TARGET_OPTIMIZATION)$(if $(CONFIG_DEBUG), -g3)
|
||||||
|
TARGET_CXXFLAGS = $(TARGET_CFLAGS)
|
||||||
TARGET_CPPFLAGS:=-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include
|
TARGET_CPPFLAGS:=-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include
|
||||||
TARGET_LDFLAGS:=-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib
|
TARGET_LDFLAGS:=-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib
|
||||||
ifneq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
|
ifneq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
|
||||||
|
Loading…
Reference in New Issue
Block a user