pass the CFLAGS through the environment on compile and fix a few packages

SVN-Revision: 6154
This commit is contained in:
Felix Fietkau 2007-01-21 02:14:50 +00:00
parent 69d76bb482
commit 3133fefe06
6 changed files with 19 additions and 14 deletions

View file

@ -293,6 +293,7 @@ define Build/Configure/Default
CXXFLAGS="$(TARGET_CFLAGS)" \
CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
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" \
$(2) \
$(PKG_CONFIG_PATH)/configure \
@ -322,11 +323,12 @@ define Build/Configure
endef
define Build/Compile/Default
CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CPPFLAGS) " \
LDFLAGS="$(EXTRA_LDFLAGS) " \
$(MAKE) -C $(PKG_BUILD_DIR) \
$(TARGET_CONFIGURE_OPTS) \
CROSS="$(TARGET_CROSS)" \
EXTRA_CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include " \
EXTRA_LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib " \
CXXFLAGS="$(TARGET_CFLAGS) $(EXTRA_CPPFLAGS) " \
ARCH="$(ARCH)" \
$(1);
endef

View file

@ -32,11 +32,13 @@ define Package/isakmpd
endef
define Build/Compile
$(call Build/Compile/Default, \
CFLAGS="$(TARGET_CFLAGS)" \
$(MAKE) -C $(PKG_BUILD_DIR) \
$(TARGET_CONFIGURE_OPTS) \
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_LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
)
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"
$(MAKE) -C $(PKG_BUILD_DIR) \
STAGING_DIR="$(STAGING_DIR)" \
DESTDIR="$(PKG_INSTALL_DIR)" \

View file

@ -42,11 +42,7 @@ define Build/Configure
)
endef
define Build/Compile
$(call Build/Compile/Default, \
CFLAGS="\$$$$(EXTRA_CFLAGS) \$$$$(EXTRA_LDFLAGS)" \
)
endef
EXTRA_CFLAGS += $(EXTRA_LDFLAGS)
define Build/InstallDev
mkdir -p $(STAGING_DIR)/usr/include

View file

@ -51,11 +51,12 @@ define Build/Configure
touch $(PKG_BUILD_DIR)/stamp-h.in
endef
TARGET_CFLAGS := -I$(PKG_BUILD_DIR)/src/include $(TARGET_CFLAGS)
define Build/Compile
$(call Build/Compile/Default, \
$(MAKE) -C $(PKG_BUILD_DIR) \
$(TARGET_CONFIGURE_OPTS) \
DESTDIR="$(PKG_INSTALL_DIR)" \
all install \
)
all install
endef
define Build/InstallDev

View file

@ -56,6 +56,7 @@ define Package/swap-utils
- swapoff
endef
TARGET_CFLAGS += -I$(PKG_BUILD_DIR)/lib
define Build/Compile
$(call Build/Compile/Default, \
OPT="$(TARGET_CFLAGS)" \

View file

@ -69,6 +69,9 @@ ifneq ($(CONFIG_CCACHE),)
TARGET_CC:= ccache $(TARGET_CC)
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:= \
AR=$(TARGET_CROSS)ar \
AS="$(TARGET_CC) -c $(TARGET_CFLAGS)" \