Subversion Repositories Kolibri OS

Rev

Rev 1905 | 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
 
1907 serge 10
LDIMPORT:= -nostdlib --out-implib libzimp.a
1898 serge 11
 
1907 serge 12
LDFLAGS:=  -shared -s -T ../newlib/dll.lds --image-base 0
1898 serge 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
 
1907 serge 33
all: libz.a zlib.dll
1896 serge 34
 
35
libz.a: $(OBJS)
36
	$(AR) $@ $(OBJS)
37
 
1907 serge 38
zlib.dll: $(OBJECTS) Makefile
39
#	dlltool -d zlib.def -Dlibz.dll -e exports.o -l libzimp.a
40
	ld $(LDFLAGS) $(LDIMPORT) $(LIBPATH) -o $@ $(OBJS) $(LIBS) zlib.def
1898 serge 41
 
42
 
1896 serge 43
%.o: %.c Makefile
44
	$(CC) $(CFLAGS) $(INCLUDES) -o $@ $<
45