replace some -I & -L flags with $(TARGET_CPPFLAGS) & $(TARGET_LDFLAGS) when appropriate
authorNicolas Thill <nico@openwrt.org>
Tue, 24 Feb 2009 00:08:08 +0000 (00:08 +0000)
committerNicolas Thill <nico@openwrt.org>
Tue, 24 Feb 2009 00:08:08 +0000 (00:08 +0000)
SVN-Revision: 14651

package/broadcom-57xx/Makefile
package/broadcom-wl/Makefile
package/ead/Makefile
package/hostapd/Makefile
package/iw/Makefile
package/opkg/Makefile
package/swconfig/Makefile
package/uci/Makefile

index 172074ca35616c7141ed7cf90fa99acd4020cae2..ddbea7894ffc0546d253d39e64c1eff45adc002d 100644 (file)
@@ -28,9 +28,10 @@ define Build/Prepare
 endef
 
 ifeq ($(BOARD),brcm-2.4)
-       BUILDFLAGS = -DBCMDRIVER -I$(LINUX_DIR)/arch/mips/bcm947xx/include -I$(STAGING_DIR)/usr/include
-       BUILDFLAGS += -DDBG=0 -DBCM_PROC_FS=1 -DT3_JUMBO_RCV_RCB_ENTRY_COUNT=256 -DNICE_SUPPORT
-       BUILDFLAGS += -DPCIX_TARGET_WORKAROUND=1 -DINCLUDE_TBI_SUPPORT=1 -DINCLUDE_5701_AX_FIX=1
+  BUILDFLAGS := \
+       -DBCMDRIVER -I$(LINUX_DIR)/arch/mips/bcm947xx/include $(TARGET_CPPFLAGS) \
+       -DDBG=0 -DBCM_PROC_FS=1 -DT3_JUMBO_RCV_RCB_ENTRY_COUNT=256 -DNICE_SUPPORT \
+       -DPCIX_TARGET_WORKAROUND=1 -DINCLUDE_TBI_SUPPORT=1 -DINCLUDE_5701_AX_FIX=1
 endif
 
 define Build/Compile
index e49fc50a880b3eb7d31e72827178c182f6f5b150..2cb511f96988a27b802e6fd1ce6727fceeb42d36 100644 (file)
@@ -161,7 +161,7 @@ define Build/Compile
                $(TARGET_CONFIGURE_OPTS) \
                CFLAGS="$(TARGET_CFLAGS) -I. -I$(PKG_BUILD_DIR)/include -Dlinux=1" \
                all
-       $(TARGET_CC) -o $(PKG_BUILD_DIR)/nas $(PKG_BUILD_DIR)/nas_exe.o -L$(STAGING_DIR)/usr/lib -lnvram $(PKG_BUILD_DIR)/router/shared/libshared.a
+       $(TARGET_CC) -o $(PKG_BUILD_DIR)/nas $(PKG_BUILD_DIR)/nas_exe.o $(TARGET_LDFLAGS) -lnvram $(PKG_BUILD_DIR)/router/shared/libshared.a
        $(TARGET_CC) -o $(PKG_BUILD_DIR)/wl $(PKG_BUILD_DIR)/wl_exe.o
 endef
 
index df88c0f53ace33ea6a8cc4a2f6bc12660ca5e5a4..115e68eb8f3020e37e3a7321028b877ceb141221 100644 (file)
@@ -32,7 +32,7 @@ CONFIGURE_PATH = tinysrp
 TARGET_CFLAGS += \
        -I$(PKG_BUILD_DIR) \
        -I$(PKG_BUILD_DIR)/tinysrp \
-       -I$(STAGING_DIR)/usr/include
+       $(TARGET_CPPFLAGS)
 
 MAKE_FLAGS += \
        CONFIGURE_ARGS="$(CONFIGURE_ARGS)" \
index a0da7a7e9373013042d87b94e1ee4dea1661368a..e4f3655473ce19defa5650ee68490788e1e2b184 100644 (file)
@@ -94,11 +94,11 @@ define Build/ConfigureTarget
 endef
 
 define Build/CompileTarget
-       CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/madwifi -I$(STAGING_DIR)/usr/include/mac80211 -I$(STAGING_DIR)/usr/include/libnl -I$(STAGING_DIR)/usr/include" \
+       CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/madwifi -I$(STAGING_DIR)/usr/include/mac80211 -I$(STAGING_DIR)/usr/include/libnl $(TARGET_CPPFLAGS)" \
        $(MAKE) -C $(PKG_BUILD_DIR)/hostapd.$(1)/hostapd \
                $(TARGET_CONFIGURE_OPTS) \
                $(DRIVER_MAKEOPTS) \
-               LIBS="$(TARGET_LDFLAGS) -L$(STAGING_DIR)/usr/lib \
+               LIBS="$(TARGET_LDFLAGS) \
                        $(if $(CONFIG_PACKAGE_kmod-mac80211),-lm $(STAGING_DIR)/usr/lib/libnl.a) \
                        $(if $(findstring default,$(1)),-lssl -lcrypto)" \
                hostapd hostapd_cli
index e4878a0e262823b069161870c0a59943c00ac968..6d9f09dcef93684b509e2d17342f9e3add28f798 100644 (file)
@@ -32,8 +32,8 @@ define Build/Configure
 endef
 
 MAKE_FLAGS += \
-       CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/mac80211 -I$(STAGING_DIR)/usr/include/libnl -I$(STAGING_DIR)/usr/include" \
-       LDFLAGS="-L$(STAGING_DIR)/usr/lib -lnl"
+       CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/mac80211 -I$(STAGING_DIR)/usr/include/libnl $(TARGET_CPPFLAGS)" \
+       LDFLAGS="$(TARGET_LDFLAGS) -lnl"
 
 ifneq ($(CONFIG_LINUX_2_6),)
   define Package/iw/install
index 6a857905b71bc41cb68683d6959e3b4892350f2e..8a06ec0726cbaffde7717d19fa1967f09cc46c1c 100644 (file)
@@ -41,8 +41,8 @@ define Package/opkg/conffiles
 endef
 
 TARGET_CFLAGS += $(FPIC) $(if $(CONFIG_GCC_VERSION_4_3),-Wno-array-bounds)
-EXTRA_CFLAGS+=-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/lib
-EXTRA_LDFLAGS+=-L$(STAGING_DIR)/usr/lib -Wl,-rpath-link,$(STAGING_DIR)/usr/lib
+EXTRA_CFLAGS += $(TARGET_CPPFLAGS)
+EXTRA_LDFLAGS += $(TARGET_LDFLAGS) -Wl,-rpath-link,$(STAGING_DIR)/usr/lib
 
 CONFIGURE_ARGS += \
        --disable-curl \
index 0d86438a792533b6b98c3de55a3b127969ad0133..ae134369c637fd980dcb61ebac9dbbea94c96b44 100644 (file)
@@ -23,7 +23,6 @@ define Package/swconfig
 endef
 
 TARGET_CPPFLAGS += \
-       -I$(STAGING_DIR)/usr/include \
        -I$(LINUX_DIR)/include \
        -I$(PKG_BUILD_DIR)
 
index 49c3f4261321cd7aa8b84294475a3c6601b0b24e..6d1f7d95e9cca8054b6dfad22d24c331c7f91d8d 100644 (file)
@@ -53,7 +53,7 @@ UCI_MAKEOPTS = \
                COPTS="$(TARGET_CFLAGS)" \
                DEBUG="$(DEBUG)" \
                VERSION="$(UCI_VERSION)" \
-               CPPFLAGS="-I$(PKG_BUILD_DIR) -I$(STAGING_DIR)/usr/include" \
+               CPPFLAGS="-I$(PKG_BUILD_DIR) $(TARGET_CPPFLAGS)" \
                OS="Linux"
 
 # work around a nasty gcc bug