Blame env-builder-data/build/script/packet/zlib-1.2.11.files/Makefile.mingw

cd1b9d
# Makefile for zlib, derived from Makefile.dj2.
cd1b9d
# Modified for mingw32 by C. Spieler, 6/16/98.
cd1b9d
# Updated for zlib 1.2.x by Christian Spieler and Cosmin Truta, Mar-2003.
cd1b9d
# Last updated: Mar 2012.
cd1b9d
# Tested under Cygwin and MinGW.
cd1b9d
cd1b9d
# Copyright (C) 1995-2003 Jean-loup Gailly.
cd1b9d
# For conditions of distribution and use, see copyright notice in zlib.h
cd1b9d
cd1b9d
# To compile, or to compile and test, type from the top level zlib directory:
cd1b9d
#
cd1b9d
#   make -fwin32/Makefile.gcc;  make test testdll -fwin32/Makefile.gcc
cd1b9d
#
cd1b9d
# To use the asm code, type:
cd1b9d
#   cp contrib/asm?86/match.S ./match.S
cd1b9d
#   make LOC=-DASMV OBJA=match.o -fwin32/Makefile.gcc
cd1b9d
#
cd1b9d
# To install libz.a, zconf.h and zlib.h in the system directories, type:
cd1b9d
#
cd1b9d
#   make install -fwin32/Makefile.gcc
cd1b9d
#
cd1b9d
# BINARY_PATH, INCLUDE_PATH and LIBRARY_PATH must be set.
cd1b9d
#
cd1b9d
# To install the shared lib, append SHARED_MODE=1 to the make command :
cd1b9d
#
cd1b9d
#   make install -fwin32/Makefile.gcc SHARED_MODE=1
cd1b9d
cd1b9d
# Note:
cd1b9d
# If the platform is *not* MinGW (e.g. it is Cygwin or UWIN),
cd1b9d
# the DLL name should be changed from "zlib1.dll".
cd1b9d
cd1b9d
STATICLIB = libz.a
cd1b9d
SHAREDLIB = zlib1.dll
cd1b9d
IMPLIB    = libz.dll.a
cd1b9d
cd1b9d
#
cd1b9d
# Set to 1 if shared object needs to be installed
cd1b9d
#
cd1b9d
SHARED_MODE=0
cd1b9d
cd1b9d
#LOC = -DASMV
cd1b9d
#LOC = -DZLIB_DEBUG -g
cd1b9d
cd1b9d
PREFIX =
cd1b9d
#CC = $(PREFIX)gcc
cd1b9d
CFLAGS = $(LOC) -O3 -Wall
cd1b9d
cd1b9d
AS = $(CC)
cd1b9d
ASFLAGS = $(LOC) -Wall
cd1b9d
cd1b9d
LD = $(CC)
cd1b9d
LDFLAGS = $(LOC)
cd1b9d
cd1b9d
#AR = $(PREFIX)ar
cd1b9d
ARFLAGS = rcs
cd1b9d
cd1b9d
#RC = $(PREFIX)windres
cd1b9d
RCFLAGS = --define GCC_WINDRES
cd1b9d
cd1b9d
#STRIP = $(PREFIX)strip
cd1b9d
cd1b9d
CP = cp -fp
cd1b9d
# If GNU install is available, replace $(CP) with install.
cd1b9d
INSTALL = $(CP)
cd1b9d
RM = rm -f
cd1b9d
cd1b9d
prefix ?= /usr/local
cd1b9d
exec_prefix = $(prefix)
cd1b9d
cd1b9d
OBJS = adler32.o compress.o crc32.o deflate.o gzclose.o gzlib.o gzread.o \
cd1b9d
       gzwrite.o infback.o inffast.o inflate.o inftrees.o trees.o uncompr.o zutil.o
cd1b9d
OBJA =
cd1b9d
cd1b9d
all: $(STATICLIB) $(SHAREDLIB) $(IMPLIB)
cd1b9d
cd1b9d
.c.o:
cd1b9d
	$(CC) $(CFLAGS) -c -o $@ $<
cd1b9d
cd1b9d
.S.o:
cd1b9d
	$(AS) $(ASFLAGS) -c -o $@ $<
cd1b9d
cd1b9d
$(STATICLIB): $(OBJS) $(OBJA)
cd1b9d
	$(AR) $(ARFLAGS) $@ $(OBJS) $(OBJA)
cd1b9d
cd1b9d
$(IMPLIB): $(SHAREDLIB)
cd1b9d
cd1b9d
$(SHAREDLIB): win32/zlib.def $(OBJS) $(OBJA) zlibrc.o
cd1b9d
	$(CC) -shared -Wl,--out-implib,$(IMPLIB) $(LDFLAGS) \
cd1b9d
	-o $@ win32/zlib.def $(OBJS) $(OBJA) zlibrc.o
cd1b9d
	$(STRIP) $@
cd1b9d
cd1b9d
zlibrc.o: win32/zlib1.rc
cd1b9d
	$(RC) $(RCFLAGS) -o $@ win32/zlib1.rc
cd1b9d
cd1b9d
.PHONY: install uninstall clean
cd1b9d
31c087
install: zlib.h zconf.h $(SHAREDLIB) $(IMPLIB)
cd1b9d
	@if test -z "$(DESTDIR)$(INCLUDE_PATH)" -o -z "$(DESTDIR)$(LIBRARY_PATH)" -o -z "$(DESTDIR)$(BINARY_PATH)"; then \
cd1b9d
		echo INCLUDE_PATH, LIBRARY_PATH, and BINARY_PATH must be specified; \
cd1b9d
		exit 1; \
cd1b9d
	fi
cd1b9d
	-@mkdir -p '$(DESTDIR)$(INCLUDE_PATH)'
cd1b9d
	-@mkdir -p '$(DESTDIR)$(LIBRARY_PATH)' '$(DESTDIR)$(LIBRARY_PATH)'/pkgconfig
cd1b9d
	-if [ "$(SHARED_MODE)" = "1" ]; then \
cd1b9d
		mkdir -p '$(DESTDIR)$(BINARY_PATH)'; \
cd1b9d
		$(INSTALL) $(SHAREDLIB) '$(DESTDIR)$(BINARY_PATH)'; \
cd1b9d
		$(INSTALL) $(IMPLIB) '$(DESTDIR)$(LIBRARY_PATH)'; \
cd1b9d
	fi
cd1b9d
	-$(INSTALL) zlib.h '$(DESTDIR)$(INCLUDE_PATH)'
cd1b9d
	-$(INSTALL) zconf.h '$(DESTDIR)$(INCLUDE_PATH)'
cd1b9d
	-$(INSTALL) $(STATICLIB) '$(DESTDIR)$(LIBRARY_PATH)'
cd1b9d
	sed \
cd1b9d
		-e 's|@prefix@|${prefix}|g' \
cd1b9d
		-e 's|@exec_prefix@|${exec_prefix}|g' \
cd1b9d
		-e 's|@libdir@|$(LIBRARY_PATH)|g' \
cd1b9d
		-e 's|@sharedlibdir@|$(LIBRARY_PATH)|g' \
cd1b9d
		-e 's|@includedir@|$(INCLUDE_PATH)|g' \
cd1b9d
		-e 's|@VERSION@|'`sed -n -e '/VERSION "/s/.*"\(.*\)".*/\1/p' zlib.h`'|g' \
cd1b9d
		zlib.pc.in > '$(DESTDIR)$(LIBRARY_PATH)'/pkgconfig/zlib.pc
cd1b9d
cd1b9d
uninstall:
cd1b9d
	-if [ "$(SHARED_MODE)" = "1" ]; then \
cd1b9d
		$(RM) '$(DESTDIR)$(BINARY_PATH)'/$(SHAREDLIB); \
cd1b9d
		$(RM) '$(DESTDIR)$(LIBRARY_PATH)'/$(IMPLIB); \
cd1b9d
	fi
cd1b9d
	-$(RM) '$(DESTDIR)$(INCLUDE_PATH)'/zlib.h
cd1b9d
	-$(RM) '$(DESTDIR)$(INCLUDE_PATH)'/zconf.h
cd1b9d
	-$(RM) '$(DESTDIR)$(LIBRARY_PATH)'/$(STATICLIB)
cd1b9d
cd1b9d
clean:
cd1b9d
	-$(RM) $(STATICLIB)
cd1b9d
	-$(RM) $(SHAREDLIB)
cd1b9d
	-$(RM) $(IMPLIB)
cd1b9d
	-$(RM) *.o
cd1b9d
	-$(RM) *.exe
cd1b9d
	-$(RM) foo.gz
cd1b9d
cd1b9d
adler32.o: zlib.h zconf.h
cd1b9d
compress.o: zlib.h zconf.h
cd1b9d
crc32.o: crc32.h zlib.h zconf.h
cd1b9d
deflate.o: deflate.h zutil.h zlib.h zconf.h
cd1b9d
gzclose.o: zlib.h zconf.h gzguts.h
cd1b9d
gzlib.o: zlib.h zconf.h gzguts.h
cd1b9d
gzread.o: zlib.h zconf.h gzguts.h
cd1b9d
gzwrite.o: zlib.h zconf.h gzguts.h
cd1b9d
inffast.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
cd1b9d
inflate.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
cd1b9d
infback.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
cd1b9d
inftrees.o: zutil.h zlib.h zconf.h inftrees.h
cd1b9d
trees.o: deflate.h zutil.h zlib.h zconf.h trees.h
cd1b9d
uncompr.o: zlib.h zconf.h
cd1b9d
zutil.o: zutil.h zlib.h zconf.h