Subversion Repositories Kolibri OS

Rev

Rev 1896 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1896 serge 1
# Makefile for zlib
2
# Copyright (C) 1995-2010 Jean-loup Gailly.
3
# For conditions of distribution and use, see copyright notice in zlib.h
4
 
5
CC=gcc
6
CPP=gcc -E
7
 
8
CFLAGS= -O3 -c -fomit-frame-pointer
9
 
1898 serge 10
LDIMPORT:= -nostdlib --out-implib libzimp.a
11
 
12
LDFLAGS:=  -shared -s -T ../newlib/dll.lds -Map map --image-base 0
13
 
1896 serge 14
INCLUDES= -I../newlib/include
15
 
1898 serge 16
LIBPATH:= -L../newlib
1896 serge 17
 
1898 serge 18
LIBS:=  -lamz -lgcc -lcimp
1896 serge 19
 
20
AR=ar rc
21
 
22
OBJC =	adler32.o compress.o crc32.o deflate.o		\
23
	gzclose.o gzlib.o gzread.o gzwrite.o		\
24
	infback.o inffast.o inflate.o inftrees.o	\
25
	trees.o uncompr.o zutil.o
26
 
27
 
28
# to use the asm code: make OBJA=match.o, PIC_OBJA=match.lo
29
OBJA =
30
 
31
OBJS = $(OBJC) $(OBJA)
32
 
1898 serge 33
all: libz.a libz.dll
1896 serge 34
 
35
libz.a: $(OBJS)
36
	$(AR) $@ $(OBJS)
37
 
1898 serge 38
libz.dll: $(OBJECTS) Makefile
39
	ld $(LDFLAGS) $(LDIMPORT) $(LIBPATH) -o $@ $(OBJS) $(LIBS)
40
 
41
 
1896 serge 42
%.o: %.c Makefile
43
	$(CC) $(CFLAGS) $(INCLUDES) -o $@ $<
44