Subversion Repositories Kolibri OS

Rev

Rev 1898 | Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  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.  
  10. LDIMPORT:= -nostdlib
  11.  
  12. LDFLAGS:=  -shared -s -T ../newlib/dll.lds -Map map --image-base 0
  13.  
  14. INCLUDES= -I../newlib/include
  15.  
  16. LIBPATH:= -L../newlib
  17.  
  18. LIBS:=  -lamz -lgcc -lcimp
  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.  
  33. all: libz.a libz.dll
  34.  
  35. libz.a: $(OBJS)
  36.         $(AR) $@ $(OBJS)
  37.  
  38. libz.dll: $(OBJECTS) Makefile
  39.         dlltool -d zlib.def -Dlibz.dll -e exports.o -l libzimp.a
  40.         ld $(LDFLAGS) $(LDIMPORT) --exclude-all-symbols $(LIBPATH) -o $@ $(OBJS) exports.o $(LIBS)
  41.  
  42.  
  43. %.o: %.c Makefile
  44.         $(CC) $(CFLAGS) $(INCLUDES) -o $@ $<
  45.  
  46.  
  47.