8magsvn – Rev 4

Subversion Repositories:
Rev:
include $(TOPDIR)/rules.mk

PKG_NAME:=fftw3
PKG_VERSION:=3.1.2
PKG_RELEASE:=1
PKG_MD5SUM:=08f2e21c9fd02f4be2bd53a62592afa4

PKG_SOURCE_URL:=http://www.fftw.org/
PKG_SOURCE:=fftw-3.1.2.tar.gz
PKG_CAT:=zcat

PKG_BUILD_DIR:=$(BUILD_DIR)/fftw-$(PKG_VERSION)
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install

include $(TOPDIR)/package/rules.mk

$(eval $(call PKG_template,FFTW,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))

$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
        (cd $(PKG_BUILD_DIR); \
                $(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" \
                ./configure \
                        --target=$(GNU_TARGET_NAME) \
                        --host=$(GNU_TARGET_NAME) \
                        --build=$(GNU_HOST_NAME) \
                        --prefix=/usr \
                        --without-libiconv-prefix \
                        --without-libintl-prefix \
                        --disable-nls \
                        --enable-shared \
                        --enable-threads \
                        --enable-double \
                        --enable-type-prefix \
                        --disable-debug \
                        --disable-fortran \
        );
        touch $@

$(PKG_BUILD_DIR)/.built:
        rm -rf $(PKG_INSTALL_DIR)
        $(MAKE) -C $(PKG_BUILD_DIR) \
                DESTDIR=$(PKG_INSTALL_DIR) \
                all install
        touch $@

$(IPKG_FFTW):
        install -d $(IDIR_FFTW)/usr/lib
        cp -fpR $(PKG_INSTALL_DIR)/usr/lib/lib*.so.* $(IDIR_FFTW)/usr/lib
        $(RSTRIP) $(IDIR_FFTW)
        $(IPKG_BUILD) $(IDIR_FFTW) $(PACKAGE_DIR)

mostlyclean:
        make -C $(PKG_BUILD_DIR) clean
        rm $(PKG_BUILD_DIR)/.built