Subversion Repositories Kolibri OS

Rev

Rev 1907 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1907 Rev 3926
Line -... Line 1...
-
 
1
# Makefile for zlib, derived from Makefile.dj2.
-
 
2
# Modified for mingw32 by C. Spieler, 6/16/98.
-
 
3
# Updated for zlib 1.2.x by Christian Spieler and Cosmin Truta, Mar-2003.
1
# Makefile for zlib
4
# Last updated: Mar 2012.
-
 
5
# Tested under Cygwin and MinGW.
-
 
6
 
2
# Copyright (C) 1995-2010 Jean-loup Gailly.
7
# Copyright (C) 1995-2003 Jean-loup Gailly.
3
# For conditions of distribution and use, see copyright notice in zlib.h
8
# For conditions of distribution and use, see copyright notice in zlib.h
Line -... Line 9...
-
 
9
 
-
 
10
STATICLIB = libz.a
-
 
11
SHAREDLIB = zlib.dll
-
 
12
IMPLIB    = libz.dll.a
-
 
13
 
4
 
14
PREFIX =
-
 
15
CC = $(PREFIX)gcc
-
 
16
CFLAGS = $(LOC) -U_Win32 -U_WIN32 -U__MINGW32__ -O3 -Wall -fomit-frame-pointer 
5
CC=gcc
17
 
-
 
18
AS = $(CC)
-
 
19
ASFLAGS = $(LOC) -Wall
-
 
20
 
-
 
21
LD = ld
Line -... Line 22...
-
 
22
LDFLAGS = $(LOC)
-
 
23
 
-
 
24
AR = $(PREFIX)ar
6
CPP=gcc -E
25
ARFLAGS = rcs
Line 7... Line 26...
7
 
26
 
Line 8... Line 27...
8
CFLAGS= -O3 -c -fomit-frame-pointer
27
STRIP = $(PREFIX)strip
Line 9... Line 28...
9
 
28
 
Line 10... Line 29...
10
LDIMPORT:= -nostdlib --out-implib libzimp.a 
29
LDIMPORT:= -nostdlib --out-implib libzimp.a 
Line 11... Line 30...
11
 
30
 
12
LDFLAGS:=  -shared -s -T ../newlib/dll.lds --image-base 0
-
 
13
 
-
 
14
INCLUDES= -I../newlib/include
-
 
15
 
-
 
16
LIBPATH:= -L../newlib
-
 
17
 
-
 
18
LIBS:=  -lamz -lgcc -lcimp
-
 
Line 19... Line 31...
19
 
31
LDFLAGS:=  -shared -s -nostdlib -T ../newlib/dll.lds --entry _DllStartup --image-base=0 --out-implib $(IMPLIB) 
-
 
32
 
20
AR=ar rc
33
INCLUDES= -I../newlib/include
Line 21... Line 34...
21
 
34
 
Line 22... Line -...
22
OBJC =	adler32.o compress.o crc32.o deflate.o		\
-
 
Line 23... Line 35...
23
	gzclose.o gzlib.o gzread.o gzwrite.o		\
35
LIBPATH:= -L../newlib
24
	infback.o inffast.o inflate.o inftrees.o	\
36
 
Line 25... Line 37...
25
	trees.o uncompr.o zutil.o
37
LIBS:=  -ldll -lc.dll
26
 
-
 
27
 
38
 
Line -... Line 39...
-
 
39
 
-
 
40
OBJS = adler32.o compress.o crc32.o deflate.o gzclose.o gzlib.o gzread.o \
-
 
41
       gzwrite.o infback.o inffast.o inflate.o inftrees.o trees.o uncompr.o zutil.o
-
 
42
OBJA =
-
 
43
 
-
 
44
all: $(STATICLIB) $(SHAREDLIB) $(IMPLIB)
-
 
45
 
-
 
46
 
-
 
47
.c.o:
-
 
48
	$(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $<
Line 28... Line -...
28
# to use the asm code: make OBJA=match.o, PIC_OBJA=match.lo
-
 
29
OBJA =
-
 
Line -... Line 49...
-
 
49
 
-
 
50
.S.o:
-
 
51
	$(AS) $(ASFLAGS) -c -o $@ $<
-
 
52
 
-
 
53
$(STATICLIB): $(OBJS) $(OBJA)
-
 
54
	$(AR) $(ARFLAGS) $@ $(OBJS) $(OBJA)
-
 
55
 
-
 
56
$(IMPLIB): $(SHAREDLIB)
-
 
57
 
-
 
58
$(SHAREDLIB): zlib.def $(OBJS) $(OBJA)
-
 
59
	$(LD) $(LDFLAGS) $(LIBPATH) -o $@ zlib.def $(OBJS) $(OBJA) $(LIBS) 
-
 
60
	$(STRIP) $@
-
 
61
	sed -f ../newlib/cmd1.sed zlib.def > mem
-
 
62
	sed -f ../newlib/cmd2.sed mem >zlib.inc 
-
 
63