Subversion Repositories Kolibri OS

Rev

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

  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.
  4. # Last updated: Mar 2012.
  5. # Tested under Cygwin and MinGW.
  6.  
  7. # Copyright (C) 1995-2003 Jean-loup Gailly.
  8. # For conditions of distribution and use, see copyright notice in zlib.h
  9.  
  10. STATICLIB = libz.a
  11. SHAREDLIB = zlib.dll
  12. IMPLIB    = libz.dll.a
  13.  
  14. PREFIX =
  15. CC = $(PREFIX)gcc
  16. CFLAGS = $(LOC) -U_Win32 -U_WIN32 -U__MINGW32__ -O3 -Wall -fomit-frame-pointer
  17.  
  18. AS = $(CC)
  19. ASFLAGS = $(LOC) -Wall
  20.  
  21. LD = ld
  22. LDFLAGS = $(LOC)
  23.  
  24. AR = $(PREFIX)ar
  25. ARFLAGS = rcs
  26.  
  27. STRIP = $(PREFIX)strip
  28.  
  29. LDIMPORT:= -nostdlib --out-implib libzimp.a
  30.  
  31. LDFLAGS:=  -shared -s -nostdlib -T ../newlib/dll.lds --entry _DllStartup --image-base=0 --out-implib $(IMPLIB)
  32.  
  33. INCLUDES= -I../newlib/include
  34.  
  35. LIBPATH:= -L../newlib
  36.  
  37. LIBS:=  -ldll -lc.dll
  38.  
  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 $@ $<
  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.  
  64.  
  65.  
  66. adler32.o: zlib.h zconf.h
  67. compress.o: zlib.h zconf.h
  68. crc32.o: crc32.h zlib.h zconf.h
  69. deflate.o: deflate.h zutil.h zlib.h zconf.h
  70. gzclose.o: zlib.h zconf.h gzguts.h
  71. gzlib.o: zlib.h zconf.h gzguts.h
  72. gzread.o: zlib.h zconf.h gzguts.h
  73. gzwrite.o: zlib.h zconf.h gzguts.h
  74. inffast.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
  75. inflate.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
  76. infback.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
  77. inftrees.o: zutil.h zlib.h zconf.h inftrees.h
  78. trees.o: deflate.h zutil.h zlib.h zconf.h trees.h
  79. uncompr.o: zlib.h zconf.h
  80. zutil.o: zutil.h zlib.h zconf.h
  81.