fix kexec-tools build
authorFelix Fietkau <nbd@openwrt.org>
Wed, 28 Feb 2007 13:28:18 +0000 (13:28 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Wed, 28 Feb 2007 13:28:18 +0000 (13:28 +0000)
SVN-Revision: 6428

include/package.mk
package/kexec-tools/Makefile

index 95508bc..389ee5b 100644 (file)
@@ -303,12 +303,14 @@ CONFIGURE_ARGS := \
                --infodir=/usr/info \
                $(DISABLE_NLS)
 
+TARGET_CPPFLAGS=-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include
+TARGET_LDFLAGS=-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib
 CONFIGURE_VARS:= \
                $(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" \
+               CPPFLAGS="$(TARGET_CPPFLAGS)" \
+               LDFLAGS="$(TARGET_LDFLAGS)" \
                PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig" \
                PKG_CONFIG_LIBDIR="$(STAGING_DIR)/usr/lib/pkgconfig"
 
index 23294fd..d88fc05 100644 (file)
@@ -33,12 +33,17 @@ define Package/kexec-tools
   URL:=http://www.xmission.com/~ebiederm/files/kexec/README
 endef
 
+MAKE_FLAGS += \
+       DESTDIR="$(PKG_INSTALL_DIR)" \
+       EXTRA_CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" \
+       BUILD_CFLAGS="-O2" \
+       LIBS="$(TARGET_LDFLAGS) -lz" \
+       install
+
 define Build/Compile
        rm -rf $(PKG_INSTALL_DIR)
        mkdir -p $(PKG_INSTALL_DIR)
-       $(MAKE) -C $(PKG_BUILD_DIR) \
-               DESTDIR="$(PKG_INSTALL_DIR)" \
-               install
+       $(call Build/Compile/Default,)
 endef
 
 define Package/kexec-tools/install