From f907dabbe7e3103f57a27d89618bf3bba949776c Mon Sep 17 00:00:00 2001 From: nico Date: Wed, 29 Apr 2009 12:56:17 +0000 Subject: [PATCH] [packages] massive change: replace occurences of -I$(STAGING_DIR)/{include,usr/include} and -L$(STAGING_DIR)/{lib,usr/lib} with $(TARGET_CPPFLAGS) and $(TARGET_LDFLAGS) respectively git-svn-id: svn://svn.openwrt.org/openwrt/packages@15480 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- Xorg/app/eterm/Makefile | 6 +++--- Xorg/app/xine-ui/Makefile | 4 ++-- Xorg/lib/cairo/Makefile | 4 ++-- Xorg/lib/gtk2/Makefile | 4 ++-- Xorg/lib/libast/Makefile | 6 +++--- Xorg/wm/matchbox-window-manager/Makefile | 4 ++-- Xorg/xorg/app/fontconfig/Makefile | 4 ++-- Xorg/xorg/driver/template.mk | 3 +-- Xorg/xorg/driver/xf86-video-ati/Makefile | 5 ++--- Xorg/xorg/driver/xf86-video-intel/Makefile | 5 ++--- Xorg/xorg/driver/xf86-video-nv/Makefile | 3 +-- admin/gkrellmd/Makefile | 4 ++-- admin/syslog-ng/Makefile | 6 +++--- ipv6/dhcp6/Makefile | 10 +++++----- ipv6/gw6c/Makefile | 6 +++--- ipv6/send/Makefile | 4 ++-- lang/jamvm/Makefile | 4 ++-- lang/luaexpat/Makefile | 2 +- lang/luafilesystem/Makefile | 3 +-- lang/luaprofiler/Makefile | 3 +-- lang/luasec/Makefile | 8 ++++---- lang/luasocket/Makefile | 4 ++-- lang/perl/Makefile | 6 +++--- libs/apr-util/Makefile | 4 ++-- libs/db/Makefile | 6 +++--- libs/iksemel/Makefile | 4 ++-- libs/libdlna/Makefile | 6 +++--- libs/libnetfilter-log/Makefile | 4 ++-- libs/libnetfilter-queue/Makefile | 4 ++-- libs/libnids/Makefile | 4 ++-- libs/libshout/Makefile | 4 ++-- libs/sqlite2/Makefile | 6 +++--- libs/sqlite3/Makefile | 4 ++-- libs/st2205tool/Makefile | 6 +++--- mail/imapfilter/Makefile | 6 +++--- mail/ssmtp/Makefile | 6 +++--- multimedia/ffmpeg/Makefile | 6 +++--- multimedia/kissdx/Makefile | 4 ++-- multimedia/mjpg-streamer/Makefile | 4 ++-- multimedia/palantir/Makefile | 8 ++++---- multimedia/ushare/Makefile | 6 +++--- net/aircrack-ng/Makefile | 4 ++-- net/amwall/Makefile | 2 +- net/arpd/Makefile | 6 +++--- net/arpwatch/Makefile | 6 +++--- net/bitchx/Makefile | 4 ++-- net/bitlbee/Makefile | 8 ++++---- net/click/Makefile | 7 ++++--- net/cups/Makefile | 2 +- net/dansguardian/Makefile | 4 ++-- net/dsl-qos-queue/Makefile | 6 +++--- net/elinks/Makefile | 6 +++--- net/faifa/Makefile | 4 ++-- net/httping/Makefile | 4 ++-- net/icecast/Makefile | 4 ++-- net/imspector/Makefile | 10 +++++----- net/iodine/Makefile | 6 +++--- net/iptraf/Makefile | 6 +++--- net/irssi/Makefile | 4 ++-- net/karma/Makefile | 6 +++--- net/leafnode/Makefile | 2 +- net/miax/Makefile | 6 +++--- net/miniupnpd/Makefile | 4 ++-- net/nagios/Makefile | 4 ++-- net/natpmp/Makefile | 4 ++-- net/nbd/Makefile | 4 ++-- net/ngrep/Makefile | 4 ++-- net/nufw/Makefile | 10 +++++----- net/openswan/Makefile | 6 +++--- net/pmacct/Makefile | 4 ++-- net/portmap/Makefile | 6 +++--- net/privoxy/Makefile | 4 ++-- net/prosody/Makefile | 4 ++-- net/qolyester/Makefile | 2 +- net/samba/Makefile | 6 +++--- net/scanlogd/Makefile | 8 ++++---- net/smtptrapd/Makefile | 7 ++++--- net/squid/Makefile | 4 ++-- net/stun/Makefile | 5 ++--- net/subversion/Makefile | 7 +++---- net/tcpdump/Makefile | 4 ++-- net/ulogd/Makefile | 4 ++-- net/vnstati/Makefile | 4 ++-- net/vtun/Makefile | 4 ++-- net/wiviz/Makefile | 6 +++--- net/wknock/Makefile | 6 +++--- sound/mpd/Makefile | 18 +++++++++--------- sound/pulseaudio/Makefile | 6 +++--- sound/shell-fm/Makefile | 6 +++--- sound/streamripper/Makefile | 5 +++-- utils/at/Makefile | 5 +++-- utils/avrusbboot/Makefile | 6 +++--- utils/bandwidthd/Makefile | 6 +++--- utils/bemused/Makefile | 4 ++-- utils/bluez-utils/Makefile | 4 ++-- utils/digitemp/Makefile | 4 ++-- utils/huaweiaktbbo/Makefile | 6 +++--- utils/lcd4linux/Makefile | 6 +++--- utils/logrotate/Makefile | 6 +++--- utils/mg/Makefile | 4 ++-- utils/owfs/Makefile | 6 +++--- utils/picocom/Makefile | 6 +++--- utils/pipacs/Makefile | 4 ++-- utils/unzip/Makefile | 6 +++--- utils/usb-modeswitch/Makefile | 7 +++---- utils/zip/Makefile | 6 +++--- 106 files changed, 272 insertions(+), 277 deletions(-) diff --git a/Xorg/app/eterm/Makefile b/Xorg/app/eterm/Makefile index 74d5491c3..5ffebc05e 100644 --- a/Xorg/app/eterm/Makefile +++ b/Xorg/app/eterm/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2007-2008 OpenWrt.org +# Copyright (C) 2007-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -45,8 +45,8 @@ CONFIGURE_VARS += \ define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR)\ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/lib/libiconv/include/" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib/libiconv/lib/" + CPPFLAGS="$(TARGET_CPPFLAGS) -I$(STAGING_DIR)/usr/lib/libiconv/include/" \ + LDFLAGS="$(TARGET_LDFLAGS) -L$(STAGING_DIR)/usr/lib/libiconv/lib/" $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" install endef diff --git a/Xorg/app/xine-ui/Makefile b/Xorg/app/xine-ui/Makefile index ffbf67fcb..a40035327 100644 --- a/Xorg/app/xine-ui/Makefile +++ b/Xorg/app/xine-ui/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006-2008 OpenWrt.org +# Copyright (C) 2006-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -51,7 +51,7 @@ define Build/Configure endef define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) X_LIBS="-L$(STAGING_DIR)/usr/lib -lfreetype" + $(MAKE) -C $(PKG_BUILD_DIR) X_LIBS="$(TARGET_LDFLAGS) -lfreetype" $(MAKE) -C $(PKG_BUILD_DIR)/ install DESTDIR=$(PKG_INSTALL_DIR) endef diff --git a/Xorg/lib/cairo/Makefile b/Xorg/lib/cairo/Makefile index f455b45d8..44916e295 100644 --- a/Xorg/lib/cairo/Makefile +++ b/Xorg/lib/cairo/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2008 OpenWrt.org +# Copyright (C) 2008-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -39,7 +39,7 @@ endef CONFIGURE_VARS+=FONTCONFIG_LIBS="-lfreetype -lfontconfig -lz -lexpat" CONFIGURE_ARGS+=--enable-freetype=yes -TARGET_CFLAGS+=-L$(STAGING_DIR)/usr/lib +TARGET_CFLAGS+=$(TARGET_LDFLAGS) define Build/InstallDev $(INSTALL_DIR) $(1)/usr/lib/ diff --git a/Xorg/lib/gtk2/Makefile b/Xorg/lib/gtk2/Makefile index 2eaa87af8..598dfbd33 100644 --- a/Xorg/lib/gtk2/Makefile +++ b/Xorg/lib/gtk2/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2008 OpenWrt.org +# Copyright (C) 2008-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -28,7 +28,7 @@ EXTRA_LDFLAGS+=\ -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \ -L$(STAGING_DIR)/usr/lib/libintl/lib/ \ -L$(STAGING_DIR)/usr/lib/libiconv/lib/ \ - -L$(STAGING_DIR)/usr/lib/ + $(TARGET_LDFLAGS) STAMP_CONFIGURED:=$(STAMP_CONFIGURED)_$(call confvar,CONFIG_PACKAGE_gtk2 CONFIG_PACKAGE_gtk2-cups) diff --git a/Xorg/lib/libast/Makefile b/Xorg/lib/libast/Makefile index 07b107d4f..6cc0ca180 100644 --- a/Xorg/lib/libast/Makefile +++ b/Xorg/lib/libast/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006-2008 OpenWrt.org +# Copyright (C) 2006-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -43,8 +43,8 @@ endef define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR) \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" + CPPFLAGS="$(TARGET_CPPFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" $(MAKE) -C $(PKG_BUILD_DIR) install DESTDIR=$(PKG_INSTALL_DIR) endef diff --git a/Xorg/wm/matchbox-window-manager/Makefile b/Xorg/wm/matchbox-window-manager/Makefile index f81e49e22..06509ffdc 100644 --- a/Xorg/wm/matchbox-window-manager/Makefile +++ b/Xorg/wm/matchbox-window-manager/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2007-2008 OpenWrt.org +# Copyright (C) 2007-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -34,7 +34,7 @@ endef define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR) \ DESTDIR=$(PKG_INSTALL_DIR) \ - LIBMB_LIBS="-L$(STAGING_DIR)/usr/lib -lfontconfig -lXrender \ + LIBMB_LIBS="$(TARGET_LDFLAGS) -lfontconfig -lXrender \ -lz -lexpat -lfreetype -lXft -lmb -lX11 -lXext -lXau -lXdmcp \ -lpng12" \ all install diff --git a/Xorg/xorg/app/fontconfig/Makefile b/Xorg/xorg/app/fontconfig/Makefile index 1e5eea896..747a68297 100644 --- a/Xorg/xorg/app/fontconfig/Makefile +++ b/Xorg/xorg/app/fontconfig/Makefile @@ -37,8 +37,8 @@ define Build/Configure endef define Build/Compile - $(foreach dir,fc-arch fc-case fc-lang fc-glyphname src fc-cache fc-list, $(MAKE) -C $(PKG_BUILD_DIR)/$(dir) CFLAGS="-I$(STAGING_DIR)/usr/include" \ - CPPFLAGS="" LDFLAGS="-L$(STAGING_DIR)/usr/lib";) + $(foreach dir,fc-arch fc-case fc-lang fc-glyphname src fc-cache fc-list, $(MAKE) -C $(PKG_BUILD_DIR)/$(dir) CFLAGS="$(TARGET_CPPFLAGS)" \ + CPPFLAGS="" LDFLAGS="$(TARGET_LDFLAGS)";) $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" DOCSRC="" install endef diff --git a/Xorg/xorg/driver/template.mk b/Xorg/xorg/driver/template.mk index b4545c53c..ac67d2466 100644 --- a/Xorg/xorg/driver/template.mk +++ b/Xorg/xorg/driver/template.mk @@ -32,8 +32,7 @@ endef EXTRA_CPPFLAGS= -I$(STAGING_DIR)/usr/include/xorg \ -I$(STAGING_DIR)/usr/include/X11/ \ - -I$(STAGING_DIR)/usr/include/ \ - -I$(STAGING_DIR)/include/ + $(TARGET_CPPFLAGS) EXTRA_CFLAGS+= $(EXTRA_CPPFLAGS) diff --git a/Xorg/xorg/driver/xf86-video-ati/Makefile b/Xorg/xorg/driver/xf86-video-ati/Makefile index 17ff63fd0..01ce18de3 100644 --- a/Xorg/xorg/driver/xf86-video-ati/Makefile +++ b/Xorg/xorg/driver/xf86-video-ati/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2007 OpenWrt.org +# Copyright (C) 2007-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -32,8 +32,7 @@ endef EXTRA_CPPFLAGS= -I$(STAGING_DIR)/usr/include/xorg \ -I$(STAGING_DIR)/usr/include/X11/ \ - -I$(STAGING_DIR)/usr/include/ \ - -I$(STAGING_DIR)/include/ + $(TARGET_CPPFLAGS) EXTRA_CFLAGS+= $(EXTRA_CPPFLAGS) diff --git a/Xorg/xorg/driver/xf86-video-intel/Makefile b/Xorg/xorg/driver/xf86-video-intel/Makefile index 050262223..f755ec53c 100644 --- a/Xorg/xorg/driver/xf86-video-intel/Makefile +++ b/Xorg/xorg/driver/xf86-video-intel/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2007 OpenWrt.org +# Copyright (C) 2007-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -34,9 +34,8 @@ endef EXTRA_CPPFLAGS= -I$(STAGING_DIR)/usr/include/xorg \ -I$(STAGING_DIR)/usr/include/X11/ \ - -I$(STAGING_DIR)/usr/include/ \ -I$(STAGING_DIR)/usr/include/drm \ - -I$(STAGING_DIR)/include/ + $(TARGET_CPPFLAGS) EXTRA_CFLAGS+= $(EXTRA_CPPFLAGS) diff --git a/Xorg/xorg/driver/xf86-video-nv/Makefile b/Xorg/xorg/driver/xf86-video-nv/Makefile index 05e219730..bfe7cfe7f 100644 --- a/Xorg/xorg/driver/xf86-video-nv/Makefile +++ b/Xorg/xorg/driver/xf86-video-nv/Makefile @@ -33,8 +33,7 @@ endef EXTRA_CPPFLAGS= -I$(STAGING_DIR)/usr/include/xorg \ -I$(STAGING_DIR)/usr/include/X11/ \ - -I$(STAGING_DIR)/usr/include/ \ - -I$(STAGING_DIR)/include/ + $(TARGET_CPPFLAGS) EXTRA_CFLAGS+= $(EXTRA_CPPFLAGS) diff --git a/admin/gkrellmd/Makefile b/admin/gkrellmd/Makefile index e99cf8b37..a12ff11dd 100644 --- a/admin/gkrellmd/Makefile +++ b/admin/gkrellmd/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2007-2008 OpenWrt.org +# Copyright (C) 2007-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -40,7 +40,7 @@ define Build/Compile CC="$(TARGET_CC)" \ glib12="yes" \ without-libsensors="yes" \ - GLIB12_LIB="-L$(STAGING_DIR)/usr/lib -lglib -lgmodule" \ + GLIB12_LIB="$(TARGET_LDFLAGS) -lglib -lgmodule" \ GLIB12_INCLUDE="-I$(STAGING_DIR)/usr/include/glib-1.2 -I$(STAGING_DIR)/usr/lib/glib/include" endef diff --git a/admin/syslog-ng/Makefile b/admin/syslog-ng/Makefile index e1a45f31a..f84ed5e5d 100644 --- a/admin/syslog-ng/Makefile +++ b/admin/syslog-ng/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006-2008 OpenWrt.org +# Copyright (C) 2006-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -44,8 +44,8 @@ define Build/Configure --enable-tcp-wrapper \ --with-libol="$(STAGING_DIR)/host/bin" \ , \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/usr/include/libol" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/usr/lib/libol" \ + CPPFLAGS="-I$(STAGING_DIR)/usr/include/libol $(TARGET_CPPFLAGS)" \ + LDFLAGS="-L$(STAGING_DIR)/usr/lib/libol $(TARGET_LDFLAGS)" \ ) endef diff --git a/ipv6/dhcp6/Makefile b/ipv6/dhcp6/Makefile index a87939382..82c970c95 100644 --- a/ipv6/dhcp6/Makefile +++ b/ipv6/dhcp6/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2006-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -57,12 +57,12 @@ endef define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR)/client \ CC="$(TARGET_CC)" \ - CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" + CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" $(MAKE) -C $(PKG_BUILD_DIR)/server \ CC="$(TARGET_CC)" \ - CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" + CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" endef define Package/dhcp6-client/install diff --git a/ipv6/gw6c/Makefile b/ipv6/gw6c/Makefile index 6f09a06e5..5834b58ad 100644 --- a/ipv6/gw6c/Makefile +++ b/ipv6/gw6c/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2008 OpenWrt.org +# Copyright (C) 2008-2009 OpenWrt.org # include $(TOPDIR)/rules.mk @@ -36,7 +36,7 @@ endef GW6C_OPTS:= \ C_COMPILER="$(TARGET_CC) -c -DNO_STDLIBCXX" \ COMPILER="$(TARGET_CROSS)g++ -c -DNO_STDLIBCXX" \ - CPP_FLAGS="$(TARGET_CFLAGS) -fno-builtin -nostdinc++ -I. -Wall -DNDEBUG -I$(STAGING_DIR)/usr/include/uClibc++ -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ + CPP_FLAGS="$(TARGET_CFLAGS) -fno-builtin -nostdinc++ -I. -Wall -DNDEBUG -I$(STAGING_DIR)/usr/include/uClibc++ $(TARGET_CPPFLAGS)" \ RANLIB="$(TARGET_CROSS)ranlib" \ ARCHIVER="$(TARGET_CROSS)ar" \ C_LINKER="$(TARGET_CC)" \ @@ -55,7 +55,7 @@ define Build/Compile -I$(PKG_BUILD_DIR)/gw6c/src/gw6c/platform/openwrt -I$(PKG_BUILD_DIR)/gw6c/src/gw6c" \ LDFLAGS="-L$(PKG_BUILD_DIR)/gw6c/src/gw6c/gw6cconfig \ -L$(PKG_BUILD_DIR)/gw6c/src/gw6c/gw6cmessaging \ - -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib -nodefaultlibs -luClibc++ $(LIBGCC_S)" \ + $(TARGET_LDFLAGS) -nodefaultlibs -luClibc++ $(LIBGCC_S)" \ target="openwrt" \ installdir="$(PKG_INSTALL_DIR)" endef diff --git a/ipv6/send/Makefile b/ipv6/send/Makefile index 9d045c51f..934cb19ec 100644 --- a/ipv6/send/Makefile +++ b/ipv6/send/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2008 OpenWrt.org +# Copyright (C) 2008-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -40,7 +40,7 @@ endef MAKE_FLAGS += \ CC="$(TARGET_CC)" \ - CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/libnetfilter_queue -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ + CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/libnetfilter_queue $(TARGET_CPPFLAGS)" \ LDFLAGS="$(TARGET_LDFLAGS) -lnfnetlink" \ define Package/send/install diff --git a/lang/jamvm/Makefile b/lang/jamvm/Makefile index 01d0cdccd..1badb38a8 100644 --- a/lang/jamvm/Makefile +++ b/lang/jamvm/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006-2008 OpenWrt.org +# Copyright (C) 2006-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -41,7 +41,7 @@ CONFIGURE_ARGS+= \ define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR) \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ + CPPFLAGS="$(TARGET_CPPFLAGS)" \ all endef diff --git a/lang/luaexpat/Makefile b/lang/luaexpat/Makefile index b8066e554..05dd6573e 100644 --- a/lang/luaexpat/Makefile +++ b/lang/luaexpat/Makefile @@ -40,7 +40,7 @@ define Build/Compile LUA_INC="$(STAGING_DIR)/usr/include/" \ LUA_LIBDIR="$(STAGING_DIR)/usr/lib/" \ COMPAT_DIR="$(PKG_BUILD_DIR)/compat-5.1r5" \ - LIB_OPTION="-shared -L$(STAGING_DIR)/usr/lib/" \ + LIB_OPTION="-shared $(TARGET_LDFLAGS)" \ CC="$(TARGET_CC) $(TARGET_CFLAGS)" \ LD="$(TARGET_CROSS)ld -shared" endef diff --git a/lang/luafilesystem/Makefile b/lang/luafilesystem/Makefile index 2458b321e..d9dbea08b 100644 --- a/lang/luafilesystem/Makefile +++ b/lang/luafilesystem/Makefile @@ -35,8 +35,7 @@ endef define Build/Configure endef -TARGET_CFLAGS += $(FPIC) \ - -I$(STAGING_DIR)/usr/include +TARGET_CFLAGS += $(FPIC) $(TARGET_CPPFLAGS) TARGET_LDFLAGS += -llua diff --git a/lang/luaprofiler/Makefile b/lang/luaprofiler/Makefile index c7fa5b1ae..e5f202dc7 100644 --- a/lang/luaprofiler/Makefile +++ b/lang/luaprofiler/Makefile @@ -33,8 +33,7 @@ define Build/Configure endef -TARGET_CFLAGS += $(FPIC) \ - -I$(STAGING_DIR)/usr/include +TARGET_CFLAGS += $(FPIC) $(TARGET_CPPFLAGS) TARGET_LDFLAGS += -llua diff --git a/lang/luasec/Makefile b/lang/luasec/Makefile index 0b2d47804..e7dbef7b9 100644 --- a/lang/luasec/Makefile +++ b/lang/luasec/Makefile @@ -35,10 +35,10 @@ endef define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR)/src linux \ - INCDIR="-I$(STAGING_DIR)/usr/include/" \ - LIBDIR="-L$(STAGING_DIR)/usr/lib/" \ - CC="$(TARGET_CC) $(TARGET_CFLAGS)" \ - LD="$(TARGET_CROSS)ld -shared" + INCDIR="$(TARGET_CPPFLAGS)" \ + LIBDIR="$(TARGET_LDFLAGS)" \ + CC="$(TARGET_CC) $(TARGET_CFLAGS)" \ + LD="$(TARGET_CROSS)ld -shared" endef diff --git a/lang/luasocket/Makefile b/lang/luasocket/Makefile index bc4149340..d2673c245 100644 --- a/lang/luasocket/Makefile +++ b/lang/luasocket/Makefile @@ -37,8 +37,8 @@ endef define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR)/ all \ - LIBDIR="-L$(STAGING_DIR)/usr/lib/" \ - CC="$(TARGET_CC) $(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \ + LIBDIR="$(TARGET_LDFLAGS)" \ + CC="$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \ LD="$(TARGET_CROSS)ld -shared" endef diff --git a/lang/perl/Makefile b/lang/perl/Makefile index 012a2e25c..57104f9cd 100644 --- a/lang/perl/Makefile +++ b/lang/perl/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006-2008 OpenWrt.org +# Copyright (C) 2006-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -101,11 +101,11 @@ define Build/perl/Configure -$(MAKE) -C $(PKG_BUILD_DIR) clean sed \ -e 's!%%CC%%!$(TARGET_CC)!g' \ - -e 's!%%CFLAGS%%!$(TARGET_CFLAGS) -DUSE_CROSS_COMPILE -I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/include!g' \ + -e 's!%%CFLAGS%%!$(TARGET_CFLAGS) -DUSE_CROSS_COMPILE $(TARGET_CPPFLAGS)!g' \ -e 's!%%CPP%%!$(TARGET_CROSS)gcc -E!g' \ -e 's!%%AR%%!$(TARGET_CROSS)ar!g' \ -e 's!%%LD%%!$(TARGET_CROSS)gcc!g' \ - -e 's!%%LDFLAGS%%!-rdynamic -L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib!g' \ + -e 's!%%LDFLAGS%%!-rdynamic $(TARGET_LDFLAGS)!g' \ -e 's!%%LIBDIRS%%!$(STAGING_DIR)/lib $(STAGING_DIR)/usr/lib!g' \ -e 's!%%INCDIRS%%!$(STAGING_DIR)/include $(STAGING_DIR)/usr/include!g' \ files/config.sh-$(patsubst i386,i486,$(ARCH)).in \ diff --git a/libs/apr-util/Makefile b/libs/apr-util/Makefile index f52460d8d..acef9e237 100644 --- a/libs/apr-util/Makefile +++ b/libs/apr-util/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2007-2008 OpenWrt.org +# Copyright (C) 2007-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -42,7 +42,7 @@ CONFIGURE_VARS += \ APR_BUILD_DIR="$(STAGING_DIR)/usr/share/build-1" \ define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) APRUTIL_LIBS="-lsqlite3 -L$(STAGING_DIR)/usr/lib -lexpat -liconv -lapr-1 -luuid -lm -lcrypt" all + $(MAKE) -C $(PKG_BUILD_DIR) APRUTIL_LIBS="-lsqlite3 $(TARGET_LDFLAGS) -lexpat -liconv -lapr-1 -luuid -lm -lcrypt" all $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" install endef diff --git a/libs/db/Makefile b/libs/db/Makefile index d3a531cfb..c1e0fd580 100644 --- a/libs/db/Makefile +++ b/libs/db/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2006-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -35,8 +35,8 @@ define Build/Configure (cd $(PKG_BUILD_DIR)/build_unix; rm -f config.cache; \ $(TARGET_CONFIGURE_OPTS) \ CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ + CPPFLAGS="$(TARGET_CPPFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ ../dist/configure \ --target=$(GNU_TARGET_NAME) \ --host=$(GNU_TARGET_NAME) \ diff --git a/libs/iksemel/Makefile b/libs/iksemel/Makefile index 295eefa7c..deaecaace 100644 --- a/libs/iksemel/Makefile +++ b/libs/iksemel/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2006-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -35,7 +35,7 @@ CONFIGURE_ARGS += \ --with-libgnutls-prefix="$(STAGING_DIR)/usr" \ CONFIGURE_VARS += \ - LIBS="-L$(STAGING_DIR)/usr/lib -Wl,-rpath-link,$(STAGING_DIR)/usr/lib -lgnutls -lgcrypt -lgpg-error" \ + LIBS="$(TARGET_LDFLAGS) -Wl,-rpath-link,$(STAGING_DIR)/usr/lib -lgnutls -lgcrypt -lgpg-error" \ define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" all install diff --git a/libs/libdlna/Makefile b/libs/libdlna/Makefile index ef80f5d7a..a8e9f51b6 100644 --- a/libs/libdlna/Makefile +++ b/libs/libdlna/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006-2008 OpenWrt.org +# Copyright (C) 2006-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -36,8 +36,8 @@ endef define Build/Configure # this is *NOT* GNU configure ( cd $(PKG_BUILD_DIR); \ - CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -lfaad -lpthread -lz" \ + CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS) -lfaad -lpthread -lz" \ HOST_CC="$(HOSTCC)" \ ./configure \ --cross-compile \ diff --git a/libs/libnetfilter-log/Makefile b/libs/libnetfilter-log/Makefile index aa9c23518..0f429eb11 100644 --- a/libs/libnetfilter-log/Makefile +++ b/libs/libnetfilter-log/Makefile @@ -39,8 +39,8 @@ CONFIGURE_ARGS += \ --enable-shared \ CONFIGURE_VARS += \ - LIBNFNETLINK_CFLAGS="-I$(STAGING_DIR)/usr/include" \ - LIBNFNETLINK_LIBS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" + LIBNFNETLINK_CFLAGS="$(TARGET_CPPFLAGS)" \ + LIBNFNETLINK_LIBS="$(TARGET_LDFLAGS)" define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR) all diff --git a/libs/libnetfilter-queue/Makefile b/libs/libnetfilter-queue/Makefile index 0f62e4f39..0b1560a97 100644 --- a/libs/libnetfilter-queue/Makefile +++ b/libs/libnetfilter-queue/Makefile @@ -39,8 +39,8 @@ CONFIGURE_ARGS += \ --enable-shared \ CONFIGURE_VARS += \ - LIBNFNETLINK_CFLAGS="-I$(STAGING_DIR)/usr/include" \ - LIBNFNETLINK_LIBS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" + LIBNFNETLINK_CFLAGS="$(TARGET_CPPFLAGS)" \ + LIBNFNETLINK_LIBS="$(TARGET_LDFLAGS)" define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR) all diff --git a/libs/libnids/Makefile b/libs/libnids/Makefile index 238122f67..13f8eabda 100644 --- a/libs/libnids/Makefile +++ b/libs/libnids/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2006-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -46,7 +46,7 @@ TARGET_CFLAGS += $(FPIC) define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR) \ LNETLIB="-L$(STAGING_DIR)/usr/lib/libnet-1.0.x/lib -lnet" \ - PCAPLIB="-L$(STAGING_DIR)/usr/lib -lpcap" \ + PCAPLIB="$(TARGET_LDFLAGS) -lpcap" \ install_prefix="$(PKG_INSTALL_DIR)" \ all install endef diff --git a/libs/libshout/Makefile b/libs/libshout/Makefile index bd2e3e26e..142f2d96a 100644 --- a/libs/libshout/Makefile +++ b/libs/libshout/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2008 OpenWrt.org +# Copyright (C) 2008-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -38,7 +38,7 @@ endef define Build/Configure $(call Build/Configure/Default, \ VORBIS_CFLAGS="-I$(STAGING_DIR)/usr/include/tremor/"\ - VORBIS_LIBS="-L$(STAGING_DIR)/usr/lib" \ + VORBIS_LIBS="$(TARGET_LDFLAGS)" \ --enable-shared \ --enable-static \ ) diff --git a/libs/sqlite2/Makefile b/libs/sqlite2/Makefile index 3af3e7d72..44a90fdce 100644 --- a/libs/sqlite2/Makefile +++ b/libs/sqlite2/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2006-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -67,8 +67,8 @@ define Build/Configure config_BUILD_CFLAGS="-O2" \ config_TARGET_CC="$(TARGET_CC)" \ config_TARGET_CFLAGS="$(TARGET_CFLAGS)" \ - config_TARGET_READLINE_INC="-I$(STAGING_DIR)/usr/include" \ - config_TARGET_READLINE_LIBS="-L$(STAGING_DIR)/usr/lib -lreadline -lncurses" \ + config_TARGET_READLINE_INC="$(TARGET_CPPFLAGS)" \ + config_TARGET_READLINE_LIBS="$(TARGET_LDFLAGS) -lreadline -lncurses" \ config_TARGET_TCL_INC="-DNO_TCL=1" \ ) endef diff --git a/libs/sqlite3/Makefile b/libs/sqlite3/Makefile index 246d2cc26..bdc9dd45f 100644 --- a/libs/sqlite3/Makefile +++ b/libs/sqlite3/Makefile @@ -72,8 +72,8 @@ CONFIGURE_VARS += \ config_BUILD_CFLAGS="-O2" \ config_TARGET_CC="$(TARGET_CC)" \ config_TARGET_CFLAGS="$(TARGET_CFLAGS)" \ - config_TARGET_READLINE_INC="-I$(STAGING_DIR)/usr/include" \ - config_TARGET_READLINE_LIBS="-L$(STAGING_DIR)/usr/lib -lreadline -lncurses" \ + config_TARGET_READLINE_INC="$(TARGET_CPPFLAGS)" \ + config_TARGET_READLINE_LIBS="$(TARGET_LDFLAGS) -lreadline -lncurses" \ define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR) \ diff --git a/libs/st2205tool/Makefile b/libs/st2205tool/Makefile index 32a28a412..2e5e7b530 100644 --- a/libs/st2205tool/Makefile +++ b/libs/st2205tool/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2008 OpenWrt.org +# Copyright (C) 2008-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -36,8 +36,8 @@ TARGET_CFLAGS += $(FPIC) MAKE_FLAGS += \ CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -I$(PKG_BUILD_DIR)/libst2205/" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ - SETPICLIBS="-L$(STAGING_DIR)/usr/lib -lgd -ljpeg -lpng -lz -L../libst2205 -lst2205" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ + SETPICLIBS="$(TARGET_LDFLAGS) -lgd -ljpeg -lpng -lz -L../libst2205 -lst2205" \ define Build/InstallDev diff --git a/mail/imapfilter/Makefile b/mail/imapfilter/Makefile index f555e8673..e44c6c6a9 100644 --- a/mail/imapfilter/Makefile +++ b/mail/imapfilter/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006-2008 OpenWrt.org +# Copyright (C) 2006-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -47,8 +47,8 @@ endef define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR) \ $(TARGET_CONFIGURE_OPTS) \ - INCDIRS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LIBDIRS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ + INCDIRS="$(TARGET_CPPFLAGS)" \ + LIBDIRS="$(TARGET_LDFLAGS)" \ MYCFLAGS="$(TARGET_CFLAGS)" \ MYLDFLAGS="-lcrypt" endef diff --git a/mail/ssmtp/Makefile b/mail/ssmtp/Makefile index 5dff3d211..ded1a3298 100644 --- a/mail/ssmtp/Makefile +++ b/mail/ssmtp/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2007-2008 OpenWrt.org +# Copyright (C) 2007-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -17,7 +17,7 @@ PKG_MD5SUM:=957e6fff08625fe34f4fc33d0925bbc9 include $(INCLUDE_DIR)/package.mk -TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include +TARGET_CFLAGS += $(TARGET_CPPFLAGS) define Package/ssmtp SECTION:=mail @@ -36,7 +36,7 @@ define Package/ssmtp/description endef CONFIGURE_VARS += \ - LIBS="-L$(STAGING_DIR)/usr/lib -lcrypto -lssl" + LIBS="$(TARGET_LDFLAGS) -lcrypto -lssl" CONFIGURE_ARGS += \ --enable-ssl diff --git a/multimedia/ffmpeg/Makefile b/multimedia/ffmpeg/Makefile index 0558892d6..21369055b 100644 --- a/multimedia/ffmpeg/Makefile +++ b/multimedia/ffmpeg/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006-2008 OpenWrt.org +# Copyright (C) 2006-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -186,8 +186,8 @@ endif define Build/Configure # this is *NOT* GNU configure ( cd $(PKG_BUILD_DIR); \ - CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ + CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ ./configure \ --enable-cross-compile \ --cross-prefix="$(TARGET_CROSS)" \ diff --git a/multimedia/kissdx/Makefile b/multimedia/kissdx/Makefile index a3263873f..0e9bc2a2c 100644 --- a/multimedia/kissdx/Makefile +++ b/multimedia/kissdx/Makefile @@ -35,8 +35,8 @@ endef define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR) \ - CFLAGS="$(TARGET_CFLAGS) -DLinux -DUSE_INTERNAL_SENDFILE -std=gnu99 -Wall -Wstrict-prototypes -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DFILE_OFFSET_BITS=64 -D_GNU_SOURCE -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/usr/lib/libiconv/include -I$(STAGING_DIR)/usr/include/dvdread -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/usr/lib/libiconv/lib" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/usr/lib/libiconv/lib" \ + CFLAGS="$(TARGET_CFLAGS) -DLinux -DUSE_INTERNAL_SENDFILE -std=gnu99 -Wall -Wstrict-prototypes -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DFILE_OFFSET_BITS=64 -D_GNU_SOURCE -I$(STAGING_DIR)/usr/lib/libiconv/include -I$(STAGING_DIR)/usr/include/dvdread $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS) -L$(STAGING_DIR)/usr/lib/libiconv/lib" \ + LDFLAGS="-L$(STAGING_DIR)/usr/lib/libiconv/lib $(TARGET_LDFLAGS)" \ STRIP=$(STRIP) \ CC="$(TARGET_CROSS)gcc" all endef diff --git a/multimedia/mjpg-streamer/Makefile b/multimedia/mjpg-streamer/Makefile index 6004f5aa0..bc72afb3e 100644 --- a/multimedia/mjpg-streamer/Makefile +++ b/multimedia/mjpg-streamer/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2007-2008 OpenWrt.org +# Copyright (C) 2007-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -32,7 +32,7 @@ define Package/mjpg-streamer/description Streaming application for Linux-UVC compatible webcams endef -EXTRA_CFLAGS += -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib +EXTRA_CFLAGS += $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS) define Package/mjpg-streamer/install $(INSTALL_DIR) $(1)/sbin diff --git a/multimedia/palantir/Makefile b/multimedia/palantir/Makefile index 3ff6b5b05..d80ac507e 100644 --- a/multimedia/palantir/Makefile +++ b/multimedia/palantir/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006-2008 OpenWrt.org +# Copyright (C) 2006-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -37,13 +37,13 @@ endef include $(INCLUDE_DIR)/package.mk -export CPPFLAGS=-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include -export LDFLAGS=-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib +export CPPFLAGS=$(TARGET_CPPFLAGS) +export LDFLAGS=$(TARGET_LDFLAGS) define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR)/server/libgsm \ $(TARGET_CONFIGURE_OPTS) \ - CCINC="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ + CCINC="$(TARGET_CPPFLAGS)" \ COPTS="$(TARGET_CFLAGS)" \ lib/libgsm.a $(MAKE) -C $(PKG_BUILD_DIR)/server \ diff --git a/multimedia/ushare/Makefile b/multimedia/ushare/Makefile index 3b2773e69..6e2a1e979 100644 --- a/multimedia/ushare/Makefile +++ b/multimedia/ushare/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2008 OpenWrt.org +# Copyright (C) 2008-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -34,8 +34,8 @@ endef define Build/Configure # this is *NOT* GNU configure ( cd $(PKG_BUILD_DIR); \ - CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -lfaad -lpthread -lavcodec -lavformat -lavutil -lz" \ + CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS) -lfaad -lpthread -lavcodec -lavformat -lavutil -lz" \ PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig" \ PKG_CONFIG_LIBDIR="$(STAGING_DIR)/usr/lib/pkgconfig" \ ./configure \ diff --git a/net/aircrack-ng/Makefile b/net/aircrack-ng/Makefile index 22ba8a9ad..7ba727bd1 100644 --- a/net/aircrack-ng/Makefile +++ b/net/aircrack-ng/Makefile @@ -41,8 +41,8 @@ define Build/Compile mkdir -p $(PKG_INSTALL_DIR) $(MAKE) -C $(PKG_BUILD_DIR) \ $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS) -Wall -Iinclude/ -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include -D_REVISION=$(PKG_REV)" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ + CFLAGS="$(TARGET_CFLAGS) -Wall -Iinclude/ $(TARGET_CPPFLAGS) -D_REVISION=$(PKG_REV)" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ prefix="/usr" \ DESTDIR="$(PKG_INSTALL_DIR)" \ OSNAME=Linux \ diff --git a/net/amwall/Makefile b/net/amwall/Makefile index 5492265ac..ac9d1cc66 100644 --- a/net/amwall/Makefile +++ b/net/amwall/Makefile @@ -34,7 +34,7 @@ define Build/Compile V= \ LDIR="$(PKG_BUILD_DIR)" \ AMSEL_INCLUDE="$(STAGING_DIR)/usr/include" \ - OPT_LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ + OPT_LDFLAGS="$(TARGET_LDFLAGS)" \ PREFIX="/usr" \ CONFIG="$(PKG_BUILD_DIR)/etc/amsel" \ DESTDIR="$(PKG_INSTALL_DIR)" \ diff --git a/net/arpd/Makefile b/net/arpd/Makefile index d2331b56b..88598fe22 100644 --- a/net/arpd/Makefile +++ b/net/arpd/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2006-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -42,8 +42,8 @@ endef define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR) \ CCOPT="$(TARGET_CFLAGS)" \ - INCLS="-I. -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LIBS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib -lpcap -ldnet -levent" + INCLS="-I. $(TARGET_CPPFLAGS)" \ + LIBS="$(TARGET_LDFLAGS) -lpcap -ldnet -levent" endef define Package/arpd/install diff --git a/net/arpwatch/Makefile b/net/arpwatch/Makefile index 1b2ca3442..08724e4b3 100644 --- a/net/arpwatch/Makefile +++ b/net/arpwatch/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2006-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -43,8 +43,8 @@ define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR) \ ARPDIR=/etc/arpwatch \ CCOPT="$(TARGET_CFLAGS)" \ - INCLS="-I. -I$(STAGING_DIR)/usr/include" \ - LIBS="-L$(STAGING_DIR)/usr/lib -lpcap" + INCLS="-I. $(TARGET_CPPFLAGS)" \ + LIBS="$(TARGET_LDFLAGS) -lpcap" endef define Package/arpwatch/install diff --git a/net/bitchx/Makefile b/net/bitchx/Makefile index a96ae1a83..e8bcae490 100644 --- a/net/bitchx/Makefile +++ b/net/bitchx/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2006-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -34,7 +34,7 @@ define Build/Compile rm -rf $(PKG_INSTALL_DIR) mkdir -p $(PKG_INSTALL_DIR) $(MAKE) -C $(PKG_BUILD_DIR) \ - CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ + CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \ DESTDIR="$(PKG_INSTALL_DIR)" \ all mkdir -p $(PKG_INSTALL_DIR)/tmp diff --git a/net/bitlbee/Makefile b/net/bitlbee/Makefile index ceda72489..84a509191 100644 --- a/net/bitlbee/Makefile +++ b/net/bitlbee/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2006-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -43,8 +43,8 @@ define Build/Configure (cd $(PKG_BUILD_DIR); \ $(TARGET_CONFIGURE_OPTS) \ CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ + CPPFLAGS="$(TARGET_CPPFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ STAGING_DIR="$(STAGING_DIR)" \ STRIP="$(STRIP)" \ ./configure \ @@ -67,7 +67,7 @@ define Build/Configure $(PKG_BUILD_DIR)/Makefile.settings @echo 'CFLAGS+=-I$(STAGING_DIR)/usr/lib/libiconv/include' >> \ $(PKG_BUILD_DIR)/Makefile.settings - @echo 'LFLAGS+=-L$(STAGING_DIR)/usr/lib' >> \ + @echo 'LFLAGS+=$(TARGET_LDFLAGS)' >> \ $(PKG_BUILD_DIR)/Makefile.settings @echo 'LFLAGS+=-L$(STAGING_DIR)/usr/lib/libiconv/lib' >> \ $(PKG_BUILD_DIR)/Makefile.settings diff --git a/net/click/Makefile b/net/click/Makefile index 1bd439895..4390ee937 100644 --- a/net/click/Makefile +++ b/net/click/Makefile @@ -1,4 +1,5 @@ -# Copyright (C) 2006 OpenWrt.org +# +# Copyright (C) 2006-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -58,8 +59,8 @@ define Build/Configure $(TARGET_CONFIGURE_OPTS) \ CXXFLAGS="-static -Os -MD" \ CFLAGS="-static -MD" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ + CPPFLAGS="$(TARGET_CPPFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ $(BUILDOPTS) \ ./configure \ --prefix=/usr \ diff --git a/net/cups/Makefile b/net/cups/Makefile index c8cd6d280..a50ff78ea 100644 --- a/net/cups/Makefile +++ b/net/cups/Makefile @@ -62,7 +62,7 @@ define Build/Configure --disable-gssapi \ --disable-slp, \ UNAME="Linux" \ - LIBS="-L$(STAGING_DIR)/usr/lib -lz -lpng -ljpeg" \ + LIBS="$(TARGET_LDFLAGS) -lz -lpng -ljpeg" \ ) endef diff --git a/net/dansguardian/Makefile b/net/dansguardian/Makefile index 61fe44c07..16f4d1c1d 100644 --- a/net/dansguardian/Makefile +++ b/net/dansguardian/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2008 OpenWrt.org +# Copyright (C) 2008-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -34,7 +34,7 @@ endef CONFIGURE_VARS += \ INCLUDES="" \ CXXFLAGS="$$$$CXXFLAGS -fno-builtin -fno-rtti -nostdinc++" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/include/uClibc++" \ + CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/uClibc++" \ LDFLAGS="$$$$LDFLAGS" \ LIBS="-nodefaultlibs -luClibc++ -lpthread $(LIBGCC_S)" \ diff --git a/net/dsl-qos-queue/Makefile b/net/dsl-qos-queue/Makefile index dc312f917..67d9392de 100644 --- a/net/dsl-qos-queue/Makefile +++ b/net/dsl-qos-queue/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2006-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -31,8 +31,8 @@ endef define Build/Compile $(call Build/Compile/Default, \ - CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/libipq -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ + CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/libipq $(TARGET_CPPFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ all \ ) endef diff --git a/net/elinks/Makefile b/net/elinks/Makefile index 29ba4f509..765326d3e 100644 --- a/net/elinks/Makefile +++ b/net/elinks/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2006-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -36,8 +36,8 @@ define Build/Configure x=`echo ac_cv_file_$(PKG_BUILD_DIR)/features.conf | tr [:blank:]-/. _` && export $$$${x}=yes && \ $(TARGET_CONFIGURE_OPTS) \ CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ + CPPFLAGS="$(TARGET_CPPFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ ./configure \ --target=$(GNU_TARGET_NAME) \ --host=$(GNU_TARGET_NAME) \ diff --git a/net/faifa/Makefile b/net/faifa/Makefile index 800e32636..79179c4e6 100644 --- a/net/faifa/Makefile +++ b/net/faifa/Makefile @@ -43,8 +43,8 @@ define Build/Compile mkdir -p $(PKG_INSTALL_DIR) $(MAKE) -C $(PKG_BUILD_DIR) \ $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS) -DSVN_REV=$(PKG_REV) -Iinclude/ -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ + CFLAGS="$(TARGET_CFLAGS) -DSVN_REV=$(PKG_REV) -Iinclude/ $(TARGET_CPPFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ DESTDIR="$(PKG_INSTALL_DIR)" \ faifa endef diff --git a/net/httping/Makefile b/net/httping/Makefile index 441fa7189..695a2d76c 100644 --- a/net/httping/Makefile +++ b/net/httping/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2006-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -33,7 +33,7 @@ endef define Build/Compile $(call Build/Compile/Default, \ - CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ + CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \ ) endef diff --git a/net/icecast/Makefile b/net/icecast/Makefile index 6dd15fd82..82431eb3a 100644 --- a/net/icecast/Makefile +++ b/net/icecast/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006-2008 OpenWrt.org +# Copyright (C) 2006-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -62,7 +62,7 @@ define Build/Configure --with-vorbis="$(TREMOR_DIR)" \ --with-xslt-config="$(STAGING_DIR)/usr/bin/xslt-config" \ , \ - CPPFLAGS="-I$(TREMOR_DIR)/include -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/include/libxml2 " \ + CPPFLAGS="-I$(TREMOR_DIR)/include -I$(STAGING_DIR)/usr/include/libxml2 $(TARGET_CPPFLAGS)" \ ) endef diff --git a/net/imspector/Makefile b/net/imspector/Makefile index 2bd2b4266..38bfb4b54 100644 --- a/net/imspector/Makefile +++ b/net/imspector/Makefile @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2008 OpenWrt.org +# Copyright (C) 2007-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -47,13 +47,13 @@ define Build/Compile DESTDIR="$(PKG_INSTALL_DIR)" \ $(TARGET_CONFIGURE_OPTS) \ SSL_DIR="$(STAGING_DIR)/usr" \ - SSL_LIBS="-L$(STAGING_DIR)/usr/lib -lssl -lcrypto" \ - SSL_FLAGS="-I$(STAGING_DIR)/usr/include -DHAVE_SSL" \ + SSL_LIBS="$(TARGET_LDFLAGS) -lssl -lcrypto" \ + SSL_FLAGS="$(TARGET_CPPFLAGS) -DHAVE_SSL" \ SSL_OBJS=sslstate.o \ PREFIX="$(STAGING_DIR)/usr" \ CXX=$(TARGET_CXX) \ - CXXFLAGS="$(TARGET_CXXFLAGS) $(TARGET_CFLAGS) $(FPIC) -I$(STAGING_DIR)/usr/include \ - -L$(STAGING_DIR)/usr/lib -DHAVE_SSL" \ + CXXFLAGS="$(TARGET_CXXFLAGS) $(TARGET_CFLAGS) $(FPIC) $(TARGET_CPPFLAGS) \ + $(TARGET_LDFLAGS) -DHAVE_SSL" \ all endef diff --git a/net/iodine/Makefile b/net/iodine/Makefile index 6de464505..b324f9b99 100644 --- a/net/iodine/Makefile +++ b/net/iodine/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2006-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -48,8 +48,8 @@ endef define Build/Compile $(call Build/Compile/Default,\ - CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include -c -DLINUX" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -lz" \ + CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -c -DLINUX" \ + LDFLAGS="$(TARGET_LDFLAGS) -lz" \ all \ ) endef diff --git a/net/iptraf/Makefile b/net/iptraf/Makefile index 1f82f7d28..a20959c8e 100644 --- a/net/iptraf/Makefile +++ b/net/iptraf/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2006-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -47,8 +47,8 @@ define Build/Compile $(TARGET_CONFIGURE_OPTS) \ CFLAGS="$(TARGET_CFLAGS)" \ DEBUG="" \ - INCLUDEDIR="-I../support -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDOPTS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ + INCLUDEDIR="-I../support $(TARGET_CPPFLAGS)" \ + LDOPTS="$(TARGET_LDFLAGS)" \ PLATFORM="-DPLATFORM=\\\"Linux/$(ARCH)\\\"" \ TARGET="/usr/bin" \ WORKDIR="/var/lib/iptraf" \ diff --git a/net/irssi/Makefile b/net/irssi/Makefile index 045891382..5394ae82e 100644 --- a/net/irssi/Makefile +++ b/net/irssi/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2006-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -79,7 +79,7 @@ define Package/$(1)/install endef endef -EXTRA_CFLAGS+=-I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/lib/libiconv/include -I$(STAGING_DIR)/usr/lib/libintl/include +EXTRA_CFLAGS+=$(TARGET_CPPFLAGS) -I$(STAGING_DIR)/usr/lib/libiconv/include -I$(STAGING_DIR)/usr/lib/libintl/include EXTRA_LDFLAGS+=-L$(STAGING_DIR)/usr/lib/libiconv/lib -L$(STAGING_DIR)/usr/lib/libintl/lib ifneq ($(SDK)$(CONFIG_PACKAGE_irssi),) diff --git a/net/karma/Makefile b/net/karma/Makefile index e0e3ff853..fad31b3cd 100644 --- a/net/karma/Makefile +++ b/net/karma/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2007 OpenWrt.org +# Copyright (C) 2007-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -44,8 +44,8 @@ endef define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR)/src/ \ CC="$(TARGET_CC)" \ - CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDLIBS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib -lpcap -lncurses" + CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \ + LDLIBS="$(TARGET_LDFLAGS) -lpcap -lncurses" endef define Package/karma/install diff --git a/net/leafnode/Makefile b/net/leafnode/Makefile index 24c9456b2..7444ead6d 100644 --- a/net/leafnode/Makefile +++ b/net/leafnode/Makefile @@ -21,7 +21,7 @@ include $(INCLUDE_DIR)/package.mk CONFIGURE_ARGS+=--sysconfdir=/etc/leafnode CONFIGURE_VARS+=LIBS=-Wl,-rpath-link=$(STAGING_DIR)/usr/lib -EXTRA_CFLAGS+=-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include +EXTRA_CFLAGS+= $(TARGET_CPPFLAGS) EXTRA_LDFLAGS+=-Wl,-rpath-link=$(STAGING_DIR)/usr/lib diff --git a/net/miax/Makefile b/net/miax/Makefile index 9d58c1b8b..4b3ceec8f 100644 --- a/net/miax/Makefile +++ b/net/miax/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2006-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -37,8 +37,8 @@ define Build/Compile $(MAKE) -C "$(PKG_BUILD_DIR)" \ CC="$(TARGET_CC)" \ OFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ + CPPFLAGS="$(TARGET_CPPFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ all endef diff --git a/net/miniupnpd/Makefile b/net/miniupnpd/Makefile index 1b41109ba..161e02d32 100644 --- a/net/miniupnpd/Makefile +++ b/net/miniupnpd/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006-2008 OpenWrt.org +# Copyright (C) 2006-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -30,7 +30,7 @@ define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR) -f Makefile.openwrt \ $(TARGET_CONFIGURE_OPTS) \ STAGING_DIR="$(STAGING_DIR)" \ - CFLAGS="$(TARGET_CFLAGS) -I $(STAGING_DIR)/usr/include" \ + CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \ LIBS="$(STAGING_DIR)/usr/lib/libiptc.a" endef diff --git a/net/nagios/Makefile b/net/nagios/Makefile index f64b0062a..b9907b37a 100644 --- a/net/nagios/Makefile +++ b/net/nagios/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2008 OpenWrt.org +# Copyright (C) 2008-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -32,7 +32,7 @@ define Package/nagios/description service and network monitoring program endef -EXTRA_CFLAGS += -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include +EXTRA_CFLAGS += $(TARGET_CPPFLAGS) CONFIGURE_ARGS += \ --with-nagios-user="root" \ diff --git a/net/natpmp/Makefile b/net/natpmp/Makefile index f4091dc18..91d20c2fe 100644 --- a/net/natpmp/Makefile +++ b/net/natpmp/Makefile @@ -33,8 +33,8 @@ define Build/Compile CC="$(TARGET_CC)" \ LD="$(TARGET_CC)" \ CFLAGS="$(strip $(TARGET_CFLAGS))" \ - CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include -DIPTABLES_PATH=\\\"/usr/sbin\\\"" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ + CPPFLAGS="$$$$CPPFLAGS $(TARGET_CPPFLAGS) -DIPTABLES_PATH=\\\"/usr/sbin\\\"" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ prefix="$(PKG_INSTALL_DIR)/usr" endef diff --git a/net/nbd/Makefile b/net/nbd/Makefile index 229a2f18b..431e57bd5 100644 --- a/net/nbd/Makefile +++ b/net/nbd/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006-2008 OpenWrt.org +# Copyright (C) 2006-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -39,7 +39,7 @@ define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR) \ CC="$(TARGET_CC)" \ DESTDIR="$(PKG_INSTALL_DIR)" \ - CPPFLAGS="$(TARGET_CPPFLAGS) -L$(STAGING_DIR)/usr/lib/libintl/lib/ -L$(STAGING_DIR)/usr/lib/" \ + CPPFLAGS="$(TARGET_CPPFLAGS) -L$(STAGING_DIR)/usr/lib/libintl/lib/ $(TARGET_LDFLAGS)" \ nbd-client endef diff --git a/net/ngrep/Makefile b/net/ngrep/Makefile index bac838ece..c02170adc 100644 --- a/net/ngrep/Makefile +++ b/net/ngrep/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2007 OpenWrt.org +# Copyright (C) 2007-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -42,7 +42,7 @@ define Build/Configure --enable-ipv6 \ --disable-dropprivs \ ,\ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -lpcre" \ + LDFLAGS="$(TARGET_LDFLAGS) -lpcre" \ ) endef diff --git a/net/nufw/Makefile b/net/nufw/Makefile index 3100e30b5..385ee5027 100644 --- a/net/nufw/Makefile +++ b/net/nufw/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2007 OpenWrt.org +# Copyright (C) 2007-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -71,10 +71,10 @@ CONFIGURE_ARGS += \ define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR) \ - CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/lib/libintl/include/ \ - -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include \ - -I$(STAGING_DIR)/usr/lib/libiconv/include" \ - LDFLAGS="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib \ + CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) \ + -I$(STAGING_DIR)/usr/lib/libintl/include \ + -I$(STAGING_DIR)/usr/lib/libiconv/include" \ + LDFLAGS="$(TARGET_LDFLAGS) \ -L$(STAGING_DIR)/usr/lib/libintl/lib \ -L$(STAGING_DIR)/usr/lib/libiconv/lib \ -Wl,-rpath-link,$(STAGING_DIR)/usr/lib -liconv \ diff --git a/net/openswan/Makefile b/net/openswan/Makefile index e7150c356..c236b292c 100644 --- a/net/openswan/Makefile +++ b/net/openswan/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006-2008 OpenWrt.org +# Copyright (C) 2006-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -55,11 +55,11 @@ $(call Package/openswan/Default/description) endef TARGET_CPPFLAGS = \ - -I$(STAGING_DIR)/usr/include \ + $(TARGET_CPPFLAGS) \ -I$(LINUX_DIR)/include TARGET_LDFLAGS = \ - -L$(STAGING_DIR)/usr/lib + $(TARGET_LDFLAGS) OPENSWAN_MAKE := $(MAKE) -C $(PKG_BUILD_DIR) \ $(TARGET_CONFIGURE_OPTS) \ diff --git a/net/pmacct/Makefile b/net/pmacct/Makefile index 34038e3f4..98cd915a4 100644 --- a/net/pmacct/Makefile +++ b/net/pmacct/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2006-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -101,7 +101,7 @@ $(PKG_BUILD_DIR)/nfacctd$(1) $(PKG_BUILD_DIR)/pmacctd$(1): $(STAMP_CONFIGURED) ,,\ ); $(MAKE) -C $(PKG_BUILD_DIR) \ - CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ + CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \ all mv -f $(PKG_BUILD_DIR)/src/nfacctd $(PKG_BUILD_DIR)/nfacctd$(1) mv -f $(PKG_BUILD_DIR)/src/pmacctd $(PKG_BUILD_DIR)/pmacctd$(1) diff --git a/net/portmap/Makefile b/net/portmap/Makefile index 2ba9f74f8..5f715cc02 100644 --- a/net/portmap/Makefile +++ b/net/portmap/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006-2008 OpenWrt.org +# Copyright (C) 2006-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -33,9 +33,9 @@ define Package/portmap/description endef MAKE_FLAGS += \ - CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include -DHOSTS_ACCESS -DFACILITY=LOG_DAEMON -DIGNORE_SIGCHLD" \ + CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -DHOSTS_ACCESS -DFACILITY=LOG_DAEMON -DIGNORE_SIGCHLD" \ RPCUSER="nobody" \ - WRAP_LIB="-L$(STAGING_DIR)/usr/lib -lwrap" \ + WRAP_LIB="$(TARGET_LDFLAGS) -lwrap" \ all define Package/portmap/install diff --git a/net/privoxy/Makefile b/net/privoxy/Makefile index ed1cb0831..3e505bef3 100644 --- a/net/privoxy/Makefile +++ b/net/privoxy/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2006-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -47,7 +47,7 @@ endef define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR) \ - SPECIAL_CFLAGS="-pthread -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" + SPECIAL_CFLAGS="-pthread $(TARGET_LDFLAGS)" mkdir -p $(PKG_INSTALL_DIR) $(MAKE) -C $(PKG_BUILD_DIR) \ DESTDIR="$(PKG_INSTALL_DIR)" \ diff --git a/net/prosody/Makefile b/net/prosody/Makefile index 38dac0095..55fbc4bf0 100644 --- a/net/prosody/Makefile +++ b/net/prosody/Makefile @@ -48,8 +48,8 @@ endef define Build/Compile $(call Build/Compile/Default,\ - CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib" \ + CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ DESTDIR="$(PKG_INSTALL_DIR)" \ PREFIX="/usr" \ all install \ diff --git a/net/qolyester/Makefile b/net/qolyester/Makefile index 212985dc0..241e42acb 100644 --- a/net/qolyester/Makefile +++ b/net/qolyester/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2007 OpenWrt.org +# Copyright (C) 2007-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. diff --git a/net/samba/Makefile b/net/samba/Makefile index 20ffb61fe..dc290b1f2 100644 --- a/net/samba/Makefile +++ b/net/samba/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2006-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -86,8 +86,8 @@ define Build/Compile (cd $(PKG_BUILD_DIR)/source; rm -rf config.{cache,status}; \ $(TARGET_CONFIGURE_OPTS) \ CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE -DNDEBUG -DSHMEM_SIZE=524288 -Dfcntl=fcntl64" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="$(LIBGCC_S) -L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \ + CPPFLAGS="$(TARGET_CPPFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS) $(LIBGCC_S)" \ ac_cv_lib_cups_httpConnect=no \ samba_cv_FTRUNCATE_NEEDS_ROOT=no \ samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no \ diff --git a/net/scanlogd/Makefile b/net/scanlogd/Makefile index 145c53ea5..1083ea8de 100644 --- a/net/scanlogd/Makefile +++ b/net/scanlogd/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2006-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -46,9 +46,9 @@ define Build/Compile $(TARGET_CONFIGURE_OPTS) \ CC="$(TARGET_CC)" LD="$(TARGET_CC)" CFLAGS="-c $(TARGET_CFLAGS)" \ LDFLAGS= \ - PCAP_H="-I$(STAGING_DIR)/usr/include" \ - NIDS_H="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/usr/lib/libnet-1.0.x/include" \ - NIDS_L="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/usr/lib/libnet-1.0.x/lib -lnids -lnet -lpcap" \ + PCAP_H="$(TARGET_CPPFLAGS)" \ + NIDS_H="$(TARGET_CPPFLAGS) -I$(STAGING_DIR)/usr/lib/libnet-1.0.x/include" \ + NIDS_L="$(TARGET_LDFLAGS) -L$(STAGING_DIR)/usr/lib/libnet-1.0.x/lib -lnids -lnet -lpcap" \ libnids endef diff --git a/net/smtptrapd/Makefile b/net/smtptrapd/Makefile index 626ba8255..da0dffe24 100644 --- a/net/smtptrapd/Makefile +++ b/net/smtptrapd/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2008 OpenWrt.org +# Copyright (C) 2008-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -34,11 +34,12 @@ endef define Build/Compile $(TARGET_CC) \ $(TARGET_CFLAGS) \ - -I $(STAGING_DIR)/usr/include \ + $(TARGET_CPPFLAGS) \ -D_REENTRANT \ $(PKG_BUILD_DIR)/smtptrapd.c \ -o $(PKG_BUILD_DIR)/smtptrapd \ - -L$(STAGING_DIR)/usr/lib/ -lpthread + $(TARGET_LDFLAGS) \ + -lpthread endef define Package/smtptrapd/install diff --git a/net/squid/Makefile b/net/squid/Makefile index 1ef9434fa..ec4a395dc 100644 --- a/net/squid/Makefile +++ b/net/squid/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2006-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -135,7 +135,7 @@ CONFIGURE_VARS += \ define Build/Compile # pass INCLUDES to compile host sources against our OpenSSL, not the host one $(MAKE) -C $(PKG_BUILD_DIR)/lib \ - INCLUDES="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ + INCLUDES="$(TARGET_CPPFLAGS)" \ all $(MAKE) -C $(PKG_BUILD_DIR) \ DESTDIR="$(PKG_INSTALL_DIR)" \ diff --git a/net/stun/Makefile b/net/stun/Makefile index c2397ec1a..34f7df5ff 100644 --- a/net/stun/Makefile +++ b/net/stun/Makefile @@ -58,9 +58,8 @@ define Build/Compile CFLAGS="$(TARGET_CFLAGS)" \ DESTDIR="$(PKG_INSTALL_DIR)" \ CXXFLAGS="$$$$CXXFLAGS -fno-builtin -fno-rtti -nostdinc++" \ - CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/uClibc++ -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="$$$$LDFLAGS -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib -L$(TOOLCHAIN_DIR)/usr/lib \ - -nodefaultlibs -luClibc++ $(LIBGCC_S)" \ + CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/uClibc++ $(TARGET_CPPFLAGS)" \ + LDFLAGS="$$$$LDFLAGS $(TARGET_LDFLAGS) -nodefaultlibs -luClibc++ $(LIBGCC_S)" \ all endef diff --git a/net/subversion/Makefile b/net/subversion/Makefile index 54ef224bb..40202d935 100644 --- a/net/subversion/Makefile +++ b/net/subversion/Makefile @@ -86,11 +86,10 @@ CONFIGURE_ARGS += \ CONFIGURE_VARS += \ svn_lib_neon=yes \ - LDFLAGS="-lcrypt -lm -lintl -L$(STAGING_DIR)/usr/lib/libintl/lib/ \ - -lz -L$(STAGING_DIR)/usr/lib/ -lpthread -L$(TOOLCHAIN_DIR)/usr/lib -L$(TOOLCHAIN_DIR)/lib \ + LDFLAGS="$(TARGET_LDFLAGS) -lcrypt -lm -lintl -L$(STAGING_DIR)/usr/lib/libintl/lib/ \ + -lz -lpthread -L$(TOOLCHAIN_DIR)/usr/lib \ -L$(TOOLCHAIN_DIR)/lib" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include/ -I$(STAGING_DIR)/usr/lib/libintl/include \ - -I$(STAGING_DIR)/include/" \ + CPPFLAGS="$(TARGET_CPPFLAGS) -I$(STAGING_DIR)/usr/lib/libintl/include" \ define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" all local-install diff --git a/net/tcpdump/Makefile b/net/tcpdump/Makefile index b02c54d0c..f8451a4ca 100644 --- a/net/tcpdump/Makefile +++ b/net/tcpdump/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2007 OpenWrt.org +# Copyright (C) 2007-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -41,7 +41,7 @@ endef define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR) \ - CCOPT="$(TARGET_CFLAGS)" INCLS="-I. -I$(STAGING_DIR)/usr/include" \ + CCOPT="$(TARGET_CFLAGS)" INCLS="-I. $(TARGET_CPPFLAGS)" \ DESTDIR="$(PKG_INSTALL_DIR)" \ all install endef diff --git a/net/ulogd/Makefile b/net/ulogd/Makefile index 5d04e20ea..ef88a8a1d 100644 --- a/net/ulogd/Makefile +++ b/net/ulogd/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2006-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -108,7 +108,7 @@ define Build/Compile -I$(PKG_BUILD_DIR)/include/ulogd \ -I$(PKG_BUILD_DIR)/include \ -I$(PKG_BUILD_DIR)/libipulog/include \ - -I$(STAGING_DIR)/usr/include" \ + $(TARGET_CPPFLAGS)" \ all install endef diff --git a/net/vnstati/Makefile b/net/vnstati/Makefile index 233790c24..f11b6af63 100644 --- a/net/vnstati/Makefile +++ b/net/vnstati/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2008 OpenWrt.org +# Copyright (C) 2008-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -36,7 +36,7 @@ endef define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR) \ $(TARGET_CONFIGURE_OPTS) \ - CFLAGS+="-I$(STAGING_DIR)/usr/include -L$(STAGING_DIR)/usr/lib -Wl,-rpath-link,$(STAGING_DIR)/usr/lib" + CFLAGS+="$(TARGET_CPPFLAGS) $(TARGET_LDFLAGS) -Wl,-rpath-link,$(STAGING_DIR)/usr/lib" endef define Package/vnstati/install diff --git a/net/vtun/Makefile b/net/vtun/Makefile index 0d74fd148..6fb7a5ee2 100644 --- a/net/vtun/Makefile +++ b/net/vtun/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2006-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -36,7 +36,7 @@ define Build/Configure --with-lzo-lib="$(STAGING_DIR)/usr/lib/" \ --with-ssl-headers="$(STAGING_DIR)/usr/include/openssl" \ , \ - LIBS="-L$(STAGING_DIR)/usr/lib" \ + LIBS="$(TARGET_LDFLAGS)" \ BLOWFISH_HDR_DIR="$(STAGING_DIR)/usr/include/openssl" \ LZO_HDR_DIR="$(STAGING_DIR)/usr/include/lzo" \ SSL_HDR_DIR="$(STAGING_DIR)/usr/include/openssl" \ diff --git a/net/wiviz/Makefile b/net/wiviz/Makefile index 50b63813e..d68ef9f6c 100644 --- a/net/wiviz/Makefile +++ b/net/wiviz/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2006-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -28,8 +28,8 @@ define Build/Prepare $(CP) ./src/* $(PKG_BUILD_DIR)/ endef -EXTRA_CFLAGS += -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include -EXTRA_LDFLAGS += -L$(STAGING_DIR)/usr/lib +EXTRA_CFLAGS += $(TARGET_CPPFLAGS) +EXTRA_LDFLAGS += $(TARGET_LDFLAGS) define Build/Compile $(call Build/Compile/Default, \ diff --git a/net/wknock/Makefile b/net/wknock/Makefile index 4cb76fe13..96cd26953 100644 --- a/net/wknock/Makefile +++ b/net/wknock/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2006-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -34,8 +34,8 @@ endef define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR) \ CC="$(TARGET_CC)" \ - CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib -lpcap" \ + CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS) -lpcap" \ all endef diff --git a/sound/mpd/Makefile b/sound/mpd/Makefile index d35d9bdab..6fb2afe9d 100644 --- a/sound/mpd/Makefile +++ b/sound/mpd/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2007 - 2008 OpenWrt.org +# Copyright (C) 2007-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -40,16 +40,16 @@ ifndef CONFIG_PACKAGE_kmod-sound-core endif CONFIGURE_VARS += \ - ID3TAG_LIBS="-L$(STAGING_DIR)/usr/lib -lz -lid3tag" \ - ID3TAG_CFLAGS="-I$(STAGING_DIR)/usr/include" \ - FLAC_LIBS="-L$(STAGING_DIR)/usr/lib -lFLAC" \ + ID3TAG_LIBS="$(TARGET_LDFLAGS) -lz -lid3tag" \ + ID3TAG_CFLAGS="$(TARGET_CPPFLAGS)" \ + FLAC_LIBS="$(TARGET_LDFLAGS) -lFLAC" \ FLAC_CFLAGS="-I$(STAGING_DIR)/usr/include/FLAC" \ - MAD_LIBS="-L$(STAGING_DIR)/usr/lib -lmad" \ - MAD_CFLAGS="-I$(STAGING_DIR)/usr/include" \ - OGGVORBIS_LIBS="-L$(STAGING_DIR)/usr/lib -lvorbisidec" \ - OGGVORBIS_CFLAGS="-I$(STAGING_DIR)/usr/include" \ + MAD_LIBS="$(TARGET_LDFLAGS) -lmad" \ + MAD_CFLAGS="$(TARGET_CPPFLAGS)" \ + OGGVORBIS_LIBS="$(TARGET_LDLFAGS) -lvorbisidec" \ + OGGVORBIS_CFLAGS="$TARGET_CPPFLAGS)" \ GLIB_CFLAGS="-I$(STAGING_DIR)/usr/include/glib-2.0 -I$(STAGING_DIR)/usr/lib/glib-2.0/include" \ - GLIB_LIBS="-L$(STAGING_DIR)/usr/lib/libintl/lib -lintl -L$(STAGING_DIR)/usr/lib/libiconv/lib -liconv -L$(STAGING_DIR)/usr/lib -lglib-2.0 -lgthread-2.0 -pthread" + GLIB_LIBS="$(TARGET_LDLFAGS) -L$(STAGING_DIR)/usr/lib/libintl/lib -lintl -L$(STAGING_DIR)/usr/lib/libiconv/lib -liconv -lglib-2.0 -lgthread-2.0 -pthread" define Build/Configure $(call Build/Configure/Default, \ diff --git a/sound/pulseaudio/Makefile b/sound/pulseaudio/Makefile index d5d62c290..734ca2f3d 100644 --- a/sound/pulseaudio/Makefile +++ b/sound/pulseaudio/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2007-2008 OpenWrt.org +# Copyright (C) 2007-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -55,8 +55,8 @@ SUPP_LIBS:=-L$(STAGING_DIR)/usr/lib/libintl/lib -L$(STAGING_DIR)/usr/lib/libicon define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR) \ - CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib $(SUPP_LIBS)" \ + CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS) $(SUPP_LIBS)" \ DESTDIR="$(PKG_INSTALL_DIR)" \ LIBLTDL="$(STAGING_DIR)/usr/lib/libltdl.la" \ X_CFLAGS="" \ diff --git a/sound/shell-fm/Makefile b/sound/shell-fm/Makefile index 53ade2969..9fc12770e 100644 --- a/sound/shell-fm/Makefile +++ b/sound/shell-fm/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006-2008 OpenWrt.org +# Copyright (C) 2006-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -40,9 +40,9 @@ endef define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR) \ $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS) -I./include/ -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ + CFLAGS="$(TARGET_CFLAGS) -I./include/ $(TARGET_CPPFLAGS)" \ DESTDIR="$(PKG_INSTALL_DIR)" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib -lmad -lao" \ + LDFLAGS="$(TARGET_LDFLAGS) -lmad -lao" \ all install endef diff --git a/sound/streamripper/Makefile b/sound/streamripper/Makefile index e33502f7a..5ed45d458 100644 --- a/sound/streamripper/Makefile +++ b/sound/streamripper/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2007 OpenWrt.org +# Copyright (C) 2007-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -30,7 +30,8 @@ define Package/streamripper/description endef -EXTRA_CFLAGS += -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include +EXTRA_CFLAGS += $(TARGET_CPPFLAGS) + define Build/Configure $(call Build/Configure/Default, \ --without-ogg \ diff --git a/utils/at/Makefile b/utils/at/Makefile index d59680303..ac1c34309 100644 --- a/utils/at/Makefile +++ b/utils/at/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2008 OpenWrt.org +# Copyright (C) 2008-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -32,7 +32,8 @@ endef export SENDMAIL=/bin/true EXTRA_CFLAGS:=-DNEED_YYWRAP -I$(PKG_BUILD_DIR) -I$(STAGING_DIR)/usr/include/libelf \ - -L$(STAGING_DIR)/usr/lib + $(TARGET_LDFLAGS) + CONFIGURE_ARGS+=--with-daemon_username=nobody \ --with-daemon_groupname=nogroup \ --with-jobdir=/var/spool/cron/atjobs \ diff --git a/utils/avrusbboot/Makefile b/utils/avrusbboot/Makefile index 5b13c8e11..e8a21a322 100644 --- a/utils/avrusbboot/Makefile +++ b/utils/avrusbboot/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2008 OpenWrt.org +# Copyright (C) 2008-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -40,8 +40,8 @@ endef define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR)/software \ - CXX="$(TARGET_CROSS)g++ $(TARGET_CFLAGS) -fno-builtin -fno-rtti -nostdinc++ -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/usr/include/uClibc++" \ - LFLAGS="-L$(STAGING_DIR)/usr/lib -nodefaultlibs -luClibc++ -lusb $(LIBGCC_S)" \ + CXX="$(TARGET_CROSS)g++ $(TARGET_CFLAGS) -fno-builtin -fno-rtti -nostdinc++ $(TARGET_CPPFLAGS) -I$(STAGING_DIR)/usr/include/uClibc++" \ + LFLAGS="$(TARGET_LDFLAGS) -nodefaultlibs -luClibc++ -lusb $(LIBGCC_S)" \ all endef diff --git a/utils/bandwidthd/Makefile b/utils/bandwidthd/Makefile index 2c352b33c..7669eeb34 100644 --- a/utils/bandwidthd/Makefile +++ b/utils/bandwidthd/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006-2008 OpenWrt.org +# Copyright (C) 2006-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -38,8 +38,8 @@ CONFIGURE_ARGS += \ ac_cv_file__usr_local_pgsql_include=no \ ac_cv_lib_pq_PQconnectdb=no \ -EXTRA_CFLAGS+=-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include -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 define Package/bandwidthd/install $(INSTALL_DIR) $(1)/usr/sbin diff --git a/utils/bemused/Makefile b/utils/bemused/Makefile index 599ca648c..6749124b0 100644 --- a/utils/bemused/Makefile +++ b/utils/bemused/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2008 OpenWrt.org +# Copyright (C) 2008-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -38,7 +38,7 @@ define Build/Compile CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CPPFLAGS)" \ LDFLAGS="$(TARGET_LDFLAGS) " \ CPPFLAGS="$(TARGET_CPPFLAGS)" \ - INCL="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/usr/include/glib-1.2 -I$(STAGING_DIR)/usr/lib/glib/include -I$(STAGING_DIR)/usr/lib/libiconv/include" \ + INCL="$(TARGET_CPPFLAGS) -I$(STAGING_DIR)/usr/include/glib-1.2 -I$(STAGING_DIR)/usr/lib/glib/include -I$(STAGING_DIR)/usr/lib/libiconv/include" \ MYLIBS="-lbluetooth -lglib -L$(STAGING_DIR)/usr/lib/libiconv/lib -liconv" $(STRIP) $(PKG_BUILD_DIR)/bemusedlinuxserver endef diff --git a/utils/bluez-utils/Makefile b/utils/bluez-utils/Makefile index 821505c22..3ba38d685 100644 --- a/utils/bluez-utils/Makefile +++ b/utils/bluez-utils/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2006-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -46,7 +46,7 @@ CONFIGURE_ARGS += \ define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR) \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib \ + LDFLAGS="$(TARGET_LDFLAGS) \ -L$(STAGING_DIR)/usr/lib/libintl/lib \ -L$(STAGING_DIR)/usr/lib/libiconv/lib" \ DESTDIR="$(PKG_INSTALL_DIR)" \ diff --git a/utils/digitemp/Makefile b/utils/digitemp/Makefile index 37c4bfab3..0a4ba6488 100644 --- a/utils/digitemp/Makefile +++ b/utils/digitemp/Makefile @@ -35,9 +35,9 @@ endef define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR) \ $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS) -DLINUX -I$(STAGING_DIR)/usr/include \ + CFLAGS="$(TARGET_CFLAGS) -DLINUX $(TARGET_CPPFLAGS) \ -I./src -I./userial -DOWUSB" \ - LIBS="-L$(STAGING_DIR)/usr/lib -lusb -lm" \ + LIBS="$(TARGET_LDFLAGS) -lusb -lm" \ DESTDIR="$(PKG_INSTALL_DIR)" \ ds2490 endef diff --git a/utils/huaweiaktbbo/Makefile b/utils/huaweiaktbbo/Makefile index 69d3b65ed..3d07a65c4 100644 --- a/utils/huaweiaktbbo/Makefile +++ b/utils/huaweiaktbbo/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2008 OpenWrt.org +# Copyright (C) 2008-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -27,8 +27,8 @@ define Build/Prepare endef define Build/Compile - $(TARGET_CC) $(TARGET_CFLAGS) -I $(STAGING_DIR)/usr/include \ - -lusb -L$(STAGING_DIR)/usr/lib/ \ + $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS) \ + -lusb \ -o $(PKG_BUILD_DIR)/huaweiAktBbo \ $(PKG_BUILD_DIR)/huaweiAktBbo.c endef diff --git a/utils/lcd4linux/Makefile b/utils/lcd4linux/Makefile index 01aa86d9f..9bdb6a775 100644 --- a/utils/lcd4linux/Makefile +++ b/utils/lcd4linux/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2007-2008 OpenWrt.org +# Copyright (C) 2007-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -193,8 +193,8 @@ endif ## TODO PYTHON PLUGIN, DEPENDS on ver >= '2.1.0' -EXTRA_CFLAGS+=-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/lib/libiconv/include -EXTRA_LDFLAGS+=-L$(STAGING_DIR)/usr/lib -Wl,-rpath-link,$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/usr/lib/libiconv/lib +EXTRA_CFLAGS+= $(TARGET_CPPFLAGS) -I$(STAGING_DIR)/usr/lib/libiconv/include +EXTRA_LDFLAGS+= $(TARGET_LDFLAGS) -Wl,-rpath-link,$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/usr/lib/libiconv/lib TARGET_CONFIGURE_OPTS+=\ CC="$(TARGET_CC) $(EXTRA_CFLAGS) $(EXTRA_LDFLAGS)" diff --git a/utils/logrotate/Makefile b/utils/logrotate/Makefile index a6059eb3e..53ee72059 100644 --- a/utils/logrotate/Makefile +++ b/utils/logrotate/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2006-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -40,8 +40,8 @@ define Package/logrotate/conffiles /etc/logrotate.conf endef -EXTRA_CFLAGS += -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include -EXTRA_LDFLAGS += -L$(STAGING_DIR)/usr/lib +EXTRA_CFLAGS += $(TARGET_CPPFLAGS) +EXTRA_LDFLAGS += $(TARGET_LDFLAGS) define Build/Compile $(call Build/Compile/Default, \ diff --git a/utils/mg/Makefile b/utils/mg/Makefile index 497e9c4ea..e3dd484b1 100644 --- a/utils/mg/Makefile +++ b/utils/mg/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2008 OpenWrt.org +# Copyright (C) 2008-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -43,7 +43,7 @@ endef define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR) \ LDFLAGS="$(TARGET_LDFLAGS) -lncurses" \ - CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ + CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \ CC=$(TARGET_CC) endef diff --git a/utils/owfs/Makefile b/utils/owfs/Makefile index 27cdb803a..08eb2fe95 100644 --- a/utils/owfs/Makefile +++ b/utils/owfs/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2008 OpenWrt.org +# Copyright (C) 2008-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -141,8 +141,8 @@ define Build/Configure ./bootstrap ; \ $(TARGET_CONFIGURE_OPTS) \ CFLAGS="$(TARGET_CFLAGS) $(CFLAGS_LARGEFILE)" \ - CPPFLAGS="-I$(STAGING_DIR)/usr/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(TOOLCHAIN_DIR)/usr/lib -L$(TOOLCHAIN_DIR)/lib" \ + CPPFLAGS="$(TARGET_CPPFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ lt_sys_lib_dlsearch_path_spec="$(STAGING_DIR)/lib $(STAGING_DIR)/usr/lib" \ lt_sys_lib_search_path_spec="$(STAGING_DIR)/lib $(STAGING_DIR)/usr/lib" \ shrext_cmds=".so" \ diff --git a/utils/picocom/Makefile b/utils/picocom/Makefile index 37b00ed14..5dd1645dd 100644 --- a/utils/picocom/Makefile +++ b/utils/picocom/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2006-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -43,8 +43,8 @@ endef define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR) \ $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ - LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ + CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ picocom endef diff --git a/utils/pipacs/Makefile b/utils/pipacs/Makefile index 7924fa524..a44575729 100644 --- a/utils/pipacs/Makefile +++ b/utils/pipacs/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2006-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -28,7 +28,7 @@ endef define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR) \ $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS) -I $(STAGING_DIR)/usr/include" \ + CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \ all endef diff --git a/utils/unzip/Makefile b/utils/unzip/Makefile index 465e24872..ed5b3386f 100644 --- a/utils/unzip/Makefile +++ b/utils/unzip/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2006-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -43,8 +43,8 @@ define Build/Compile $(TARGET_CONFIGURE_OPTS) \ prefix="$(PKG_INSTALL_DIR)/usr" \ CFLAGS="$(TARGET_CFLAGS)" \ - CF="$(TARGET_CFLAGS) -O -I$(STAGING_DIR)/usr/include -I. -DUNIX" \ - LD="$(TARGET_CC) -L$(STAGING_DIR)/usr/lib" \ + CF="$(TARGET_CFLAGS) -O $(TARGET_CPPFLAGS) -I. -DUNIX" \ + LD="$(TARGET_CC) $(TARGET_LDFLAGS)" \ install endef diff --git a/utils/usb-modeswitch/Makefile b/utils/usb-modeswitch/Makefile index e5455191c..eb8af0602 100644 --- a/utils/usb-modeswitch/Makefile +++ b/utils/usb-modeswitch/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2008 OpenWrt.org +# Copyright (C) 2008-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -31,9 +31,8 @@ define Package/usb-modeswitch/description endef define Build/Compile - "$(TARGET_CC)" $(TARGET_CFLAGS) -I $(STAGING_DIR)/include/ \ - -I $(STAGING_DIR)/usr/include/ -L $(STAGING_DIR)/lib/ \ - -L $(STAGING_DIR)/usr/lib/ -lusb \ + "$(TARGET_CC)" $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS) \ + -lusb \ -o $(PKG_BUILD_DIR)/usb_modeswitch-OpenWrt \ $(PKG_BUILD_DIR)/usb_modeswitch.c endef diff --git a/utils/zip/Makefile b/utils/zip/Makefile index 1edb5dd8e..dc2a8816a 100644 --- a/utils/zip/Makefile +++ b/utils/zip/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2007 OpenWrt.org +# Copyright (C) 2007-2009 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -43,8 +43,8 @@ define Build/Compile $(TARGET_CONFIGURE_OPTS) \ prefix="$(PKG_INSTALL_DIR)/usr" \ CFLAGS="$(TARGET_CFLAGS)" \ - CF="$(TARGET_CFLAGS) -O -I$(STAGING_DIR)/usr/include -I. -DUNIX" \ - LD="$(TARGET_CC) -L$(STAGING_DIR)/usr/lib" \ + CF="$(TARGET_CFLAGS) -O $(TARGET_CPPFLAGS) -I. -DUNIX" \ + LD="$(TARGET_CC) $(TARGET_LDFLAGS)" \ install endef -- 2.11.0