[packages] libdlna: fix build failure introduced by [21056], restore fix from [12678...
[openwrt/svn-archive/archive.git] / libs / libdlna / Makefile
index 1968dc477901b8a2504c01dc1809a6cd34fa9e9f..a805dd753bbf450bef2ebced6d9e27e6f878c9ea 100644 (file)
@@ -15,6 +15,8 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://libdlna.geexbox.org/releases/
 PKG_MD5SUM:=2c974f95b711e5fd07f78fc4ebfcca66
 
+PKG_INSTALL:=1
+
 include $(INCLUDE_DIR)/package.mk
 
 define Package/libdlna
@@ -37,7 +39,7 @@ define Build/Configure
        # this is *NOT* GNU configure
        ( cd $(PKG_BUILD_DIR); \
                CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
-               LDFLAGS="$(TARGET_LDFLAGS) -lfaad -lpthread -lz" \
+               LDFLAGS="$(TARGET_LDFLAGS) -Wl,-rpath-link=$(STAGING_DIR)/usr/lib" \
                HOST_CC="$(HOSTCC)" \
                ./configure \
                --cross-compile \
@@ -51,14 +53,12 @@ define Build/Configure
        )
 endef
 
-TARGET_CFLAGS += $(FPIC)
+# XXX: fix build on systems where install is not at its usual location
+# INSTALL defaults to /usr/bin/install
+MAKE_INSTALL_FLAGS += \
+       INSTALL="install" \
 
-define Build/Compile
-       $(MAKE) -C $(PKG_BUILD_DIR) \
-               DESTDIR="$(PKG_INSTALL_DIR)" \
-               INSTALL="install" \
-               all install
-endef
+TARGET_CFLAGS += $(FPIC)
 
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include