aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2007-01-21 02:14:50 +0000
committerFelix Fietkau <nbd@openwrt.org>2007-01-21 02:14:50 +0000
commitd6db09f812da2dccf6214e5094ba8b8ab45ad1f6 (patch)
tree3f88e11967b39bce0c74ab7e8d541a2325fec523
parent1e61d2ea710628c8fca3544e7f60c4f4b14d8f65 (diff)
downloadupstream-d6db09f812da2dccf6214e5094ba8b8ab45ad1f6.tar.gz
upstream-d6db09f812da2dccf6214e5094ba8b8ab45ad1f6.tar.bz2
upstream-d6db09f812da2dccf6214e5094ba8b8ab45ad1f6.zip
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
-rw-r--r--include/package.mk6
-rw-r--r--package/isakmpd/Makefile10
-rw-r--r--package/keynote/Makefile6
-rw-r--r--package/linux-atm/Makefile7
-rw-r--r--package/util-linux/Makefile1
-rw-r--r--rules.mk3
6 files changed, 19 insertions, 14 deletions
diff --git a/include/package.mk b/include/package.mk
index dd70128c8f..51daa86044 100644
--- a/include/package.mk
+++ b/include/package.mk
@@ -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
diff --git a/package/isakmpd/Makefile b/package/isakmpd/Makefile
index 628b97fd94..d7220522ac 100644
--- a/package/isakmpd/Makefile
+++ b/package/isakmpd/Makefile
@@ -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)" \
diff --git a/package/keynote/Makefile b/package/keynote/Makefile
index 579300407b..ed4d4f020b 100644
--- a/package/keynote/Makefile
+++ b/package/keynote/Makefile
@@ -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
diff --git a/package/linux-atm/Makefile b/package/linux-atm/Makefile
index 9aae0a0b0e..7691c1149a 100644
--- a/package/linux-atm/Makefile
+++ b/package/linux-atm/Makefile
@@ -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
diff --git a/package/util-linux/Makefile b/package/util-linux/Makefile
index e265edb149..ecabbc06fb 100644
--- a/package/util-linux/Makefile
+++ b/package/util-linux/Makefile
@@ -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)" \
diff --git a/rules.mk b/rules.mk
index 3afdab67c2..0a958c2d58 100644
--- a/rules.mk
+++ b/rules.mk
@@ -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)" \