kolibrios-gitea/programs/develop/libraries/zlib/Makefile
Sergey Semyonov (Serge) 00f63492a5 zlib-1.2.8
git-svn-id: svn://kolibrios.org@3926 a494cfbc-eb01-0410-851d-a64ba20cac60
2013-09-21 19:27:14 +00:00

81 lines
2.1 KiB
Makefile

# 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
SHAREDLIB = zlib.dll
IMPLIB = libz.dll.a
PREFIX =
CC = $(PREFIX)gcc
CFLAGS = $(LOC) -U_Win32 -U_WIN32 -U__MINGW32__ -O3 -Wall -fomit-frame-pointer
AS = $(CC)
ASFLAGS = $(LOC) -Wall
LD = ld
LDFLAGS = $(LOC)
AR = $(PREFIX)ar
ARFLAGS = rcs
STRIP = $(PREFIX)strip
LDIMPORT:= -nostdlib --out-implib libzimp.a
LDFLAGS:= -shared -s -nostdlib -T ../newlib/dll.lds --entry _DllStartup --image-base=0 --out-implib $(IMPLIB)
INCLUDES= -I../newlib/include
LIBPATH:= -L../newlib
LIBS:= -ldll -lc.dll
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)
.c.o:
$(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $<
.S.o:
$(AS) $(ASFLAGS) -c -o $@ $<
$(STATICLIB): $(OBJS) $(OBJA)
$(AR) $(ARFLAGS) $@ $(OBJS) $(OBJA)
$(IMPLIB): $(SHAREDLIB)
$(SHAREDLIB): zlib.def $(OBJS) $(OBJA)
$(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
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