mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-19 07:39:45 +02:00
pass the CFLAGS through the environment on compile and fix a few packages
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@6154 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
7082dce3c6
commit
bbe1e39616
@ -293,6 +293,7 @@ define Build/Configure/Default
|
|||||||
CXXFLAGS="$(TARGET_CFLAGS)" \
|
CXXFLAGS="$(TARGET_CFLAGS)" \
|
||||||
CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
|
CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
|
||||||
LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
|
LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
|
||||||
|
PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig" \
|
||||||
PKG_CONFIG_LIBDIR="$(STAGING_DIR)/usr/lib/pkgconfig" \
|
PKG_CONFIG_LIBDIR="$(STAGING_DIR)/usr/lib/pkgconfig" \
|
||||||
$(2) \
|
$(2) \
|
||||||
$(PKG_CONFIG_PATH)/configure \
|
$(PKG_CONFIG_PATH)/configure \
|
||||||
@ -322,11 +323,12 @@ define Build/Configure
|
|||||||
endef
|
endef
|
||||||
|
|
||||||
define Build/Compile/Default
|
define Build/Compile/Default
|
||||||
|
CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CPPFLAGS) " \
|
||||||
|
LDFLAGS="$(EXTRA_LDFLAGS) " \
|
||||||
$(MAKE) -C $(PKG_BUILD_DIR) \
|
$(MAKE) -C $(PKG_BUILD_DIR) \
|
||||||
$(TARGET_CONFIGURE_OPTS) \
|
$(TARGET_CONFIGURE_OPTS) \
|
||||||
CROSS="$(TARGET_CROSS)" \
|
CROSS="$(TARGET_CROSS)" \
|
||||||
EXTRA_CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include " \
|
CXXFLAGS="$(TARGET_CFLAGS) $(EXTRA_CPPFLAGS) " \
|
||||||
EXTRA_LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib " \
|
|
||||||
ARCH="$(ARCH)" \
|
ARCH="$(ARCH)" \
|
||||||
$(1);
|
$(1);
|
||||||
endef
|
endef
|
||||||
|
@ -32,11 +32,13 @@ define Package/isakmpd
|
|||||||
endef
|
endef
|
||||||
|
|
||||||
define Build/Compile
|
define Build/Compile
|
||||||
$(call Build/Compile/Default, \
|
CFLAGS="$(TARGET_CFLAGS)" \
|
||||||
|
$(MAKE) -C $(PKG_BUILD_DIR) \
|
||||||
|
$(TARGET_CONFIGURE_OPTS) \
|
||||||
LINUX_DIR="$(LINUX_DIR)" \
|
LINUX_DIR="$(LINUX_DIR)" \
|
||||||
EXTRA_CPPFLAGS="-I$(STAGING_DIR)/usr/include/openssl -I$(STAGING_DIR)/usr/include/keynote -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
|
EXTRA_CPPFLAGS="-I$(STAGING_DIR)/usr/include/openssl -I$(STAGING_DIR)/usr/include/keynote -I$(STAGING_DIR)/usr/include " \
|
||||||
EXTRA_LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
|
EXTRA_LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib"
|
||||||
)
|
|
||||||
$(MAKE) -C $(PKG_BUILD_DIR) \
|
$(MAKE) -C $(PKG_BUILD_DIR) \
|
||||||
STAGING_DIR="$(STAGING_DIR)" \
|
STAGING_DIR="$(STAGING_DIR)" \
|
||||||
DESTDIR="$(PKG_INSTALL_DIR)" \
|
DESTDIR="$(PKG_INSTALL_DIR)" \
|
||||||
|
@ -42,11 +42,7 @@ define Build/Configure
|
|||||||
)
|
)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Build/Compile
|
EXTRA_CFLAGS += $(EXTRA_LDFLAGS)
|
||||||
$(call Build/Compile/Default, \
|
|
||||||
CFLAGS="\$$$$(EXTRA_CFLAGS) \$$$$(EXTRA_LDFLAGS)" \
|
|
||||||
)
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Build/InstallDev
|
define Build/InstallDev
|
||||||
mkdir -p $(STAGING_DIR)/usr/include
|
mkdir -p $(STAGING_DIR)/usr/include
|
||||||
|
@ -51,11 +51,12 @@ define Build/Configure
|
|||||||
touch $(PKG_BUILD_DIR)/stamp-h.in
|
touch $(PKG_BUILD_DIR)/stamp-h.in
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
TARGET_CFLAGS := -I$(PKG_BUILD_DIR)/src/include $(TARGET_CFLAGS)
|
||||||
define Build/Compile
|
define Build/Compile
|
||||||
$(call Build/Compile/Default, \
|
$(MAKE) -C $(PKG_BUILD_DIR) \
|
||||||
|
$(TARGET_CONFIGURE_OPTS) \
|
||||||
DESTDIR="$(PKG_INSTALL_DIR)" \
|
DESTDIR="$(PKG_INSTALL_DIR)" \
|
||||||
all install \
|
all install
|
||||||
)
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Build/InstallDev
|
define Build/InstallDev
|
||||||
|
@ -56,6 +56,7 @@ define Package/swap-utils
|
|||||||
- swapoff
|
- swapoff
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
TARGET_CFLAGS += -I$(PKG_BUILD_DIR)/lib
|
||||||
define Build/Compile
|
define Build/Compile
|
||||||
$(call Build/Compile/Default, \
|
$(call Build/Compile/Default, \
|
||||||
OPT="$(TARGET_CFLAGS)" \
|
OPT="$(TARGET_CFLAGS)" \
|
||||||
|
3
rules.mk
3
rules.mk
@ -69,6 +69,9 @@ ifneq ($(CONFIG_CCACHE),)
|
|||||||
TARGET_CC:= ccache $(TARGET_CC)
|
TARGET_CC:= ccache $(TARGET_CC)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
EXTRA_CPPFLAGS := -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include
|
||||||
|
EXTRA_LDFLAGS := -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib
|
||||||
|
|
||||||
TARGET_CONFIGURE_OPTS:= \
|
TARGET_CONFIGURE_OPTS:= \
|
||||||
AR=$(TARGET_CROSS)ar \
|
AR=$(TARGET_CROSS)ar \
|
||||||
AS="$(TARGET_CC) -c $(TARGET_CFLAGS)" \
|
AS="$(TARGET_CC) -c $(TARGET_CFLAGS)" \
|
||||||
|
Loading…
Reference in New Issue
Block a user