kumquat-buildroot/package/libungif/libungif.mk

70 lines
2.3 KiB
Makefile
Raw Normal View History

2007-07-23 10:23:54 +02:00
#############################################################
#
# libungif
#
#############################################################
2007-07-23 21:05:43 +02:00
LIBUNGIF_VERSION:=4.1.4
LIBUNGIF_SOURCE:=libungif-$(LIBUNGIF_VERSION).tar.bz2
LIBUNGIF_SITE:=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/giflib
2007-07-23 21:05:43 +02:00
LIBUNGIF_DIR:=$(BUILD_DIR)/libungif-$(LIBUNGIF_VERSION)
2007-07-23 10:23:54 +02:00
LIBUNGIF_CAT:=$(BZCAT)
2007-07-23 21:05:43 +02:00
LIBUNGIF_BINARY:=libungif.so.$(LIBUNGIF_VERSION)
2007-07-23 10:23:54 +02:00
LIBUNGIF_TARGET_BINARY:=usr/lib/libungif.so
$(DL_DIR)/$(LIBUNGIF_SOURCE):
$(WGET) -P $(DL_DIR) $(LIBUNGIF_SITE)/$(LIBUNGIF_SOURCE)
2007-08-01 10:35:13 +02:00
libungif-source: $(DL_DIR)/$(LIBUNGIF_SOURCE)
2007-07-23 10:23:54 +02:00
$(LIBUNGIF_DIR)/.unpacked: $(DL_DIR)/$(LIBUNGIF_SOURCE)
$(LIBUNGIF_CAT) $(DL_DIR)/$(LIBUNGIF_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
2007-07-23 21:05:43 +02:00
toolchain/patch-kernel.sh $(LIBUNGIF_DIR) package/libungif/ libungif-$(LIBUNGIF_VERSION)\*.patch\*
2007-07-23 10:23:54 +02:00
$(CONFIG_UPDATE) $(LIBUNGIF_DIR)
touch $@
$(LIBUNGIF_DIR)/.configured: $(LIBUNGIF_DIR)/.unpacked
(cd $(LIBUNGIF_DIR); rm -rf config.cache; \
2007-07-23 21:05:43 +02:00
$(TARGET_CONFIGURE_ARGS) \
2007-07-23 10:23:54 +02:00
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS)" \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--sysconfdir=/etc \
--enable-shared \
--enable-static \
--prefix=/usr \
--without-x \
)
2007-07-23 10:23:54 +02:00
touch $@
$(LIBUNGIF_DIR)/lib/.libs/libungif.a: $(LIBUNGIF_DIR)/.configured
$(MAKE) -C $(LIBUNGIF_DIR)
2007-08-01 10:35:13 +02:00
$(STAGING_DIR)/usr/lib/libungif.a: $(LIBUNGIF_DIR)/lib/.libs/libungif.a
2007-07-23 10:23:54 +02:00
$(MAKE) DESTDIR=$(STAGING_DIR) -C $(LIBUNGIF_DIR) install
2007-08-01 10:35:13 +02:00
$(SED) "s,^libdir=.*,libdir=\'$(STAGING_DIR)/usr/lib\',g" $(STAGING_DIR)/usr/lib/libungif.la
2007-07-23 10:23:54 +02:00
2007-08-01 10:35:13 +02:00
$(TARGET_DIR)/$(LIBUNGIF_TARGET_BINARY): $(STAGING_DIR)/usr/lib/libungif.a
2007-07-23 10:23:54 +02:00
cp -dpf $(STAGING_DIR)/$(LIBUNGIF_TARGET_BINARY)* $(TARGET_DIR)/usr/lib/
-$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/$(LIBUNGIF_TARGET_BINARY)*
2007-07-23 10:23:54 +02:00
libungif: uclibc $(TARGET_DIR)/$(LIBUNGIF_TARGET_BINARY)
libungif-clean:
rm -f $(TARGET_DIR)/$(LIBUNGIF_TARGET_BINARY)*
-$(MAKE) -C $(LIBUNGIF_DIR) clean
libungif-dirclean:
rm -rf $(LIBUNGIF_DIR)
#############################################################
#
# Toplevel Makefile options
#
#############################################################
ifeq ($(strip $(BR2_PACKAGE_LIBUNGIF)),y)
TARGETS+=libungif
endif