sync SDK -ng package build with trunk
authorNicolas Thill <nico@openwrt.org>
Mon, 16 Oct 2006 21:52:27 +0000 (21:52 +0000)
committerNicolas Thill <nico@openwrt.org>
Mon, 16 Oct 2006 21:52:27 +0000 (21:52 +0000)
SVN-Revision: 5167

openwrt/package/sdk/files/include/package.mk

index 2784cc888175d20fc0adb102d1fc1669a775fd46..6159823844832ed46be4b7a5bd12f709a080df87 100644 (file)
@@ -234,17 +234,19 @@ ifneq ($(strip $(PKG_CAT)),)
 endif
 
 define Build/Prepare
-  $(call Build/Prepare/Default)
+  $(call Build/Prepare/Default,)
 endef
 
 define Build/Configure/Default
-       @(cd $(PKG_BUILD_DIR)/$(3); \
-       [ -x configure ] && \
-               $(2) \
+       (cd $(PKG_BUILD_DIR)/$(3); \
+       if [ -x configure ]; then \
                $(TARGET_CONFIGURE_OPTS) \
                CFLAGS="$(TARGET_CFLAGS)" \
+               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" \
+               $(2) \
                ./configure \
                --target=$(GNU_TARGET_NAME) \
                --host=$(GNU_TARGET_NAME) \
@@ -263,7 +265,7 @@ define Build/Configure/Default
                --infodir=/usr/info \
                $(DISABLE_NLS) \
                $(1); \
-               true; \
+       fi; \
        )
 endef
 
@@ -274,9 +276,9 @@ endef
 define Build/Compile/Default
        $(MAKE) -C $(PKG_BUILD_DIR) \
                $(TARGET_CONFIGURE_OPTS) \
-               CC=$(TARGET_CC) \
                CROSS="$(TARGET_CROSS)" \
-               EXTRA_CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/include" \
+               EXTRA_CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include " \
+               EXTRA_LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib " \
                ARCH="$(ARCH)" \
                $(1);
 endef