[packages] massive change: replace occurences of -I$(STAGING_DIR)/{include,usr/includ...
[packages.git] / libs / apr-util / Makefile
index 8a75a8c..acef9e2 100644 (file)
@@ -1,10 +1,9 @@
 #
-# 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.
 #
-# $Id$ 
 
 include $(TOPDIR)/rules.mk
 
@@ -29,9 +28,10 @@ define Package/libaprutil
 endef
 
 
+TARGET_CFLAGS += $(FPIC)
 CONFIGURE_ARGS += \
        --with-pgsql=no \
-       --with-apr="$(STAGING_DIR_HOST)/bin/apr-1-config" \
+       --with-apr="$(STAGING_DIR)/usr/bin/apr-1-config" \
        --with-expat="$(STAGING_DIR)/usr" \
        --without-sqlite2 \
        --with-sqlite3="$(STAGING_DIR)/usr" \
@@ -42,28 +42,25 @@ 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
 
 define Build/InstallDev
-       mkdir -p $(2)/bin
+       $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/include/apr-1/ $(1)/usr/lib  $(1)/usr/lib/pkgconfig/
        $(CP)   $(PKG_INSTALL_DIR)/usr/bin/apu-1-config \
-               $(2)/bin
-       mkdir -p $(1)/usr/include/apr-1/
+               $(1)/usr/bin/
        $(CP)   $(PKG_INSTALL_DIR)/usr/include/apr-1/* \
                $(1)/usr/include/apr-1/
-       mkdir -p $(1)/usr/lib 
        $(CP)   $(PKG_INSTALL_DIR)/usr/lib/libaprutil-1.{la,a,so*} \
                $(1)/usr/lib/
-       mkdir -p $(1)/usr/lib/pkgconfig/
        $(CP)   $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/apr-util-1.pc \
                $(1)/usr/lib/pkgconfig/
-       $(SED) 's, -e \"s -I$$$$prefix/lib  g\",,g' $(2)/bin/apu-1-config
-       $(SED) 's,^libdir=\"$$$${exec_prefix}/lib,libdir=\"$(1)/usr/lib,g' $(2)/bin/apu-1-config
-       $(SED) 's,^includedir=\"$$$${prefix}/include/,includedir=\"$(1)/usr/include/,g' $(2)/bin/apu-1-config
-       $(SED) 's,-L$$$$libdir,,g' $(2)/bin/apu-1-config
-       $(SED) 's,-R$$$$libdir,,g' $(2)/bin/apu-1-config
+       $(SED) 's, -e \"s -I$$$$prefix/lib  g\",,g' $(1)/usr/bin/apu-1-config
+       $(SED) 's,^libdir=\"$$$${exec_prefix}/lib,libdir=\"$(STAGING_DIR)/usr/lib,g' $(1)/usr/bin/apu-1-config
+       $(SED) 's,^includedir=\"$$$${prefix}/include/,includedir=\"$(STAGING_DIR)/usr/include/,g' $(1)/usr/bin/apu-1-config
+       $(SED) 's,-L$$$$libdir,,g' $(1)/usr/bin/apu-1-config
+       $(SED) 's,-R$$$$libdir,,g' $(1)/usr/bin/apu-1-config
 endef
 
 define Package/libaprutil/install