2002-05-11 07:48:55 +02:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# zlib
|
|
|
|
#
|
|
|
|
#############################################################
|
2010-06-07 14:33:06 +02:00
|
|
|
ZLIB_VERSION:=1.2.5
|
2007-07-11 16:06:06 +02:00
|
|
|
ZLIB_SOURCE:=zlib-$(ZLIB_VERSION).tar.bz2
|
2007-06-29 10:18:13 +02:00
|
|
|
ZLIB_SITE:=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/libpng
|
2009-10-27 08:53:12 +01:00
|
|
|
ZLIB_INSTALL_STAGING=YES
|
2002-05-11 07:48:55 +02:00
|
|
|
|
2009-09-30 00:36:03 +02:00
|
|
|
ifeq ($(BR2_PREFER_STATIC_LIB),y)
|
2008-12-08 15:41:47 +01:00
|
|
|
ZLIB_PIC :=
|
2010-11-24 16:14:52 +01:00
|
|
|
ZLIB_SHARED := --static
|
2009-09-30 00:36:03 +02:00
|
|
|
else
|
|
|
|
ZLIB_PIC := -fPIC
|
|
|
|
ZLIB_SHARED := --shared
|
2008-12-08 15:41:47 +01:00
|
|
|
endif
|
|
|
|
|
2009-10-27 08:53:12 +01:00
|
|
|
define ZLIB_CONFIGURE_CMDS
|
|
|
|
(cd $(@D); rm -rf config.cache; \
|
2007-07-30 20:17:13 +02:00
|
|
|
$(TARGET_CONFIGURE_ARGS) \
|
2005-08-31 00:46:58 +02:00
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
2008-12-08 15:41:47 +01:00
|
|
|
CFLAGS="$(TARGET_CFLAGS) $(ZLIB_PIC)" \
|
2003-01-17 09:03:59 +01:00
|
|
|
./configure \
|
2008-12-08 15:41:47 +01:00
|
|
|
$(ZLIB_SHARED) \
|
2003-01-17 09:03:59 +01:00
|
|
|
--prefix=/usr \
|
2007-06-29 10:18:13 +02:00
|
|
|
)
|
2009-10-27 08:53:12 +01:00
|
|
|
endef
|
|
|
|
|
2010-02-20 18:19:06 +01:00
|
|
|
define HOST_ZLIB_CONFIGURE_CMDS
|
|
|
|
(cd $(@D); rm -rf config.cache; \
|
|
|
|
$(HOST_CONFIGURE_ARGS) \
|
|
|
|
$(HOST_CONFIGURE_OPTS) \
|
|
|
|
CFLAGS="$(ZLIB_PIC)" \
|
|
|
|
./configure \
|
|
|
|
$(ZLIB_SHARED) \
|
|
|
|
--prefix="$(HOST_DIR)/usr" \
|
|
|
|
--sysconfdir="$(HOST_DIR)/etc" \
|
|
|
|
)
|
|
|
|
endef
|
|
|
|
|
2009-10-27 08:53:12 +01:00
|
|
|
define ZLIB_BUILD_CMDS
|
2010-11-24 16:14:52 +01:00
|
|
|
$(MAKE1) -C $(@D)
|
2009-10-27 08:53:12 +01:00
|
|
|
endef
|
|
|
|
|
2010-02-20 18:19:06 +01:00
|
|
|
define HOST_ZLIB_BUILD_CMDS
|
2010-11-24 16:14:52 +01:00
|
|
|
$(MAKE1) -C $(@D)
|
2010-02-20 18:19:06 +01:00
|
|
|
endef
|
|
|
|
|
2009-10-27 08:53:12 +01:00
|
|
|
define ZLIB_INSTALL_STAGING_CMDS
|
2011-01-26 09:27:03 +01:00
|
|
|
$(MAKE1) -C $(@D) DESTDIR=$(STAGING_DIR) LDCONFIG=true install
|
2010-11-24 16:14:52 +01:00
|
|
|
endef
|
|
|
|
|
|
|
|
define ZLIB_INSTALL_TARGET_CMDS
|
2011-01-26 09:27:03 +01:00
|
|
|
$(MAKE1) -C $(@D) DESTDIR=$(TARGET_DIR) LDCONFIG=true install
|
2009-10-27 08:53:12 +01:00
|
|
|
endef
|
|
|
|
|
2010-02-20 18:19:06 +01:00
|
|
|
define HOST_ZLIB_INSTALL_CMDS
|
2011-01-26 09:27:03 +01:00
|
|
|
$(MAKE1) -C $(@D) LDCONFIG=true install
|
2010-02-20 18:19:06 +01:00
|
|
|
endef
|
|
|
|
|
2010-11-24 16:14:52 +01:00
|
|
|
define ZLIB_CLEAN_CMDS
|
|
|
|
-$(MAKE1) -C $(@D) clean
|
2009-10-27 08:53:12 +01:00
|
|
|
endef
|
2002-05-11 07:48:55 +02:00
|
|
|
|
2010-11-24 16:14:52 +01:00
|
|
|
define ZLIB_UNINSTALL_STAGING_CMDS
|
|
|
|
$(MAKE1) -C $(@D) DESTDIR=$(STAGING_DIR) uninstall
|
|
|
|
endef
|
|
|
|
|
|
|
|
define ZLIB_UNINSTALL_TARGET_CMDS
|
|
|
|
$(MAKE1) -C $(@D) DESTDIR=$(TARGET_DIR) uninstall
|
|
|
|
endef
|
|
|
|
|
|
|
|
define HOST_ZLIB_UNINSTALL_TARGET_CMDS
|
|
|
|
$(MAKE1) -C $(@D) uninstall
|
2009-10-27 08:53:12 +01:00
|
|
|
endef
|
2002-05-11 07:48:55 +02:00
|
|
|
|
2009-10-27 08:53:12 +01:00
|
|
|
$(eval $(call GENTARGETS,package,zlib))
|
2010-02-20 18:19:06 +01:00
|
|
|
$(eval $(call GENTARGETS,package,zlib,host))
|