2002-05-11 07:48:55 +02:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# zlib
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
ZLIB_SOURCE=zlib-1.1.4.tar.bz2
|
2003-06-14 02:46:16 +02:00
|
|
|
ZLIB_SITE=http://aleron.dl.sourceforge.net/sourceforge/libpng
|
2002-05-11 07:48:55 +02:00
|
|
|
ZLIB_DIR=$(BUILD_DIR)/zlib-1.1.4
|
|
|
|
ifeq ($(strip $(BUILD_WITH_LARGEFILE)),true)
|
2003-01-19 01:57:10 +01:00
|
|
|
ZLIB_CFLAGS=-Os -g -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
|
2002-05-11 07:48:55 +02:00
|
|
|
else
|
2003-01-19 01:57:10 +01:00
|
|
|
ZLIB_CFLAGS=-Os -g
|
2002-05-11 07:48:55 +02:00
|
|
|
endif
|
2003-01-19 01:57:10 +01:00
|
|
|
ZLIB_CFLAGS+=-fPIC
|
2002-05-11 07:48:55 +02:00
|
|
|
|
|
|
|
$(DL_DIR)/$(ZLIB_SOURCE):
|
2002-11-21 00:16:10 +01:00
|
|
|
$(WGET) -P $(DL_DIR) $(ZLIB_SITE)/$(ZLIB_SOURCE)
|
2002-05-11 07:48:55 +02:00
|
|
|
|
|
|
|
$(ZLIB_DIR)/.source: $(DL_DIR)/$(ZLIB_SOURCE)
|
|
|
|
bzcat $(DL_DIR)/$(ZLIB_SOURCE) | tar -C $(BUILD_DIR) -xvf -
|
|
|
|
touch $(ZLIB_DIR)/.source
|
|
|
|
|
|
|
|
$(ZLIB_DIR)/.configured: $(ZLIB_DIR)/.source
|
2003-01-17 09:03:59 +01:00
|
|
|
(cd $(ZLIB_DIR); \
|
|
|
|
./configure \
|
|
|
|
--shared \
|
|
|
|
--prefix=/usr \
|
|
|
|
--exec-prefix=$(STAGING_DIR)/usr/bin \
|
|
|
|
--libdir=$(STAGING_DIR)/lib \
|
|
|
|
--includedir=$(STAGING_DIR)/include \
|
|
|
|
);
|
2002-05-11 07:48:55 +02:00
|
|
|
touch $(ZLIB_DIR)/.configured;
|
|
|
|
|
|
|
|
$(ZLIB_DIR)/libz.so.1.1.4: $(ZLIB_DIR)/.configured
|
2003-01-19 01:57:10 +01:00
|
|
|
$(MAKE) LDSHARED="$(TARGET_CROSS)ld -shared -soname,libz.so.1" \
|
2003-01-19 07:07:22 +01:00
|
|
|
CFLAGS="$(ZLIB_CFLAGS)" CC=$(TARGET_CC) -C $(ZLIB_DIR) all libz.a;
|
2002-05-11 07:48:55 +02:00
|
|
|
touch -c $(ZLIB_DIR)/libz.so.1.1.4
|
|
|
|
|
|
|
|
$(STAGING_DIR)/lib/libz.so.1.1.4: $(ZLIB_DIR)/libz.so.1.1.4
|
2003-01-19 01:57:10 +01:00
|
|
|
cp -dpf $(ZLIB_DIR)/libz.a $(STAGING_DIR)/lib;
|
|
|
|
cp -dpf $(ZLIB_DIR)/zlib.h $(STAGING_DIR)/include;
|
|
|
|
cp -dpf $(ZLIB_DIR)/zconf.h $(STAGING_DIR)/include;
|
|
|
|
cp -dpf $(ZLIB_DIR)/libz.so* $(STAGING_DIR)/lib;
|
2002-05-11 07:48:55 +02:00
|
|
|
(cd $(STAGING_DIR)/lib; ln -fs libz.so.1.1.4 libz.so.1);
|
2003-02-12 09:10:40 +01:00
|
|
|
chmod a-x $(STAGING_DIR)/lib/libz.so.1.1.4
|
2002-05-11 07:48:55 +02:00
|
|
|
touch -c $(STAGING_DIR)/lib/libz.so.1.1.4
|
|
|
|
|
|
|
|
$(TARGET_DIR)/lib/libz.so.1.1.4: $(STAGING_DIR)/lib/libz.so.1.1.4
|
2003-01-19 01:57:10 +01:00
|
|
|
cp -dpf $(STAGING_DIR)/lib/libz.so* $(TARGET_DIR)/lib;
|
2002-05-11 07:48:55 +02:00
|
|
|
-$(STRIP) --strip-unneeded $(TARGET_DIR)/lib/libz.so*
|
|
|
|
touch -c $(TARGET_DIR)/lib/libz.so.1.1.4
|
|
|
|
|
2003-02-12 13:43:15 +01:00
|
|
|
$(TARGET_DIR)/usr/lib/libz.a: $(STAGING_DIR)/lib/libz.so.1.1.4
|
2003-01-17 04:46:57 +01:00
|
|
|
mkdir -p $(TARGET_DIR)/usr/include
|
2003-01-19 01:57:10 +01:00
|
|
|
cp -dpf $(STAGING_DIR)/include/zlib.h $(TARGET_DIR)/usr/include/
|
|
|
|
cp -dpf $(STAGING_DIR)/include/zconf.h $(TARGET_DIR)/usr/include/
|
|
|
|
cp -dpf $(STAGING_DIR)/lib/libz.a $(TARGET_DIR)/usr/lib/
|
2003-02-12 09:10:40 +01:00
|
|
|
rm -f $(TARGET_DIR)/lib/libz.so
|
|
|
|
(cd $(TARGET_DIR)/usr/lib; ln -fs /lib/libz.so.1.1.4 libz.so)
|
2003-01-20 20:24:02 +01:00
|
|
|
touch -c $(TARGET_DIR)/usr/lib/libz.a
|
2003-01-08 19:17:28 +01:00
|
|
|
|
2003-01-21 08:34:29 +01:00
|
|
|
zlib-headers: $(TARGET_DIR)/usr/lib/libz.a
|
2003-01-08 19:17:28 +01:00
|
|
|
|
2002-05-11 07:48:55 +02:00
|
|
|
zlib: uclibc $(TARGET_DIR)/lib/libz.so.1.1.4
|
|
|
|
|
|
|
|
zlib-clean:
|
|
|
|
rm -f $(TARGET_DIR)/lib/libz.so*
|
2003-01-17 09:03:59 +01:00
|
|
|
-$(MAKE) -C $(ZLIB_DIR) clean
|
2002-05-11 07:48:55 +02:00
|
|
|
|
|
|
|
zlib-dirclean:
|
|
|
|
rm -rf $(ZLIB_DIR)
|
|
|
|
|