2013-12-15 12:09:20 +04:00
|
|
|
# Makefile for zlib, derived from Makefile.dj2.
|
|
|
|
# Modified for mingw32 by C. Spieler, 6/16/98.
|
|
|
|
# Updated for zlib 1.2.x by Christian Spieler and Cosmin Truta, Mar-2003.
|
|
|
|
# Last updated: Mar 2012.
|
|
|
|
# Tested under Cygwin and MinGW.
|
|
|
|
|
|
|
|
# Copyright (C) 1995-2003 Jean-loup Gailly.
|
|
|
|
# For conditions of distribution and use, see copyright notice in zlib.h
|
|
|
|
|
|
|
|
STATICLIB = libz.a
|
2014-04-11 09:53:42 +04:00
|
|
|
SHAREDLIB = libz.dll
|
2013-12-15 12:09:20 +04:00
|
|
|
IMPLIB = libz.dll.a
|
|
|
|
|
|
|
|
PREFIX =
|
|
|
|
CC = $(PREFIX)gcc
|
2013-12-16 04:16:20 +04:00
|
|
|
CFLAGS = $(LOC) -U_Win32 -U_WIN32 -U__MINGW32__ -O2 -Wall -fomit-frame-pointer
|
2013-12-15 12:09:20 +04:00
|
|
|
|
|
|
|
AS = $(CC)
|
|
|
|
ASFLAGS = $(LOC) -Wall
|
|
|
|
|
|
|
|
LD = ld
|
|
|
|
LDFLAGS = $(LOC)
|
|
|
|
|
|
|
|
AR = $(PREFIX)ar
|
|
|
|
ARFLAGS = rcs
|
|
|
|
|
|
|
|
STRIP = $(PREFIX)strip
|
|
|
|
|
|
|
|
LDFLAGS:= -shared -s -nostdlib -T ../newlib/dll.lds --entry _DllStartup --image-base=0 --out-implib $(IMPLIB)
|
|
|
|
|
|
|
|
INCLUDES= -I../newlib/include
|
|
|
|
|
|
|
|
LIBPATH:= -L../../lib
|
|
|
|
|
|
|
|
LIBS:= -ldll -lc.dll
|
|
|
|
|
2013-12-16 04:16:20 +04:00
|
|
|
ifeq ($(findstring ebox,$(MAKECMDGOALS)),ebox)
|
|
|
|
CFLAGS+=-march=pentium-mmx
|
|
|
|
endif
|
2013-12-15 12:09:20 +04:00
|
|
|
|
|
|
|
OBJS = adler32.o compress.o crc32.o deflate.o gzclose.o gzlib.o gzread.o \
|
|
|
|
gzwrite.o infback.o inffast.o inflate.o inftrees.o trees.o uncompr.o zutil.o
|
|
|
|
OBJA =
|
|
|
|
|
|
|
|
all: $(STATICLIB) $(SHAREDLIB) $(IMPLIB) Makefile
|
|
|
|
|
2013-12-16 04:16:20 +04:00
|
|
|
ebox: $(STATICLIB) $(SHAREDLIB) $(IMPLIB) Makefile
|
2013-12-15 12:09:20 +04:00
|
|
|
|
|
|
|
.c.o:
|
|
|
|
$(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $<
|
|
|
|
|
|
|
|
.S.o:
|
|
|
|
$(AS) $(ASFLAGS) -c -o $@ $<
|
|
|
|
|
|
|
|
$(STATICLIB): $(OBJS) $(OBJA) Makefile
|
|
|
|
$(AR) $(ARFLAGS) $@ $(OBJS) $(OBJA)
|
2013-12-15 17:22:19 +04:00
|
|
|
mv -f libz.a ../../lib
|
2013-12-15 12:09:20 +04:00
|
|
|
|
|
|
|
$(IMPLIB): $(SHAREDLIB)
|
|
|
|
|
|
|
|
$(SHAREDLIB): zlib.def $(OBJS) $(OBJA) Makefile
|
|
|
|
$(LD) $(LDFLAGS) $(LIBPATH) -o $@ zlib.def $(OBJS) $(OBJA) $(LIBS)
|
|
|
|
$(STRIP) $@
|
|
|
|
sed -f ../newlib/cmd1.sed zlib.def > mem
|
|
|
|
sed -f ../newlib/cmd2.sed mem >zlib.inc
|
2014-04-11 09:53:42 +04:00
|
|
|
mv -f libz.dll ../../bin
|
2013-12-15 12:09:20 +04:00
|
|
|
mv -f libz.dll.a ../../lib
|
|
|
|
|
|
|
|
|
|
|
|
adler32.o: zlib.h zconf.h
|
|
|
|
compress.o: zlib.h zconf.h
|
|
|
|
crc32.o: crc32.h zlib.h zconf.h
|
|
|
|
deflate.o: deflate.h zutil.h zlib.h zconf.h
|
|
|
|
gzclose.o: zlib.h zconf.h gzguts.h
|
|
|
|
gzlib.o: zlib.h zconf.h gzguts.h
|
|
|
|
gzread.o: zlib.h zconf.h gzguts.h
|
|
|
|
gzwrite.o: zlib.h zconf.h gzguts.h
|
|
|
|
inffast.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
|
|
|
|
inflate.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
|
|
|
|
infback.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
|
|
|
|
inftrees.o: zutil.h zlib.h zconf.h inftrees.h
|
|
|
|
trees.o: deflate.h zutil.h zlib.h zconf.h trees.h
|
|
|
|
uncompr.o: zlib.h zconf.h
|
|
|
|
zutil.o: zutil.h zlib.h zconf.h
|