Subversion Repositories Kolibri OS

Rev

Rev 5022 | Blame | Compare with Previous | Last modification | View Log | 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 = libz.dll
  12. IMPLIB    = libz.dll.a
  13.  
  14. CC = kos32-gcc
  15. LD = kos32-ld
  16. AR = kos32-ar
  17. STRIP = kos32-strip
  18.  
  19. INSTALLDIR:= /home/autobuild/tools/win32/lib
  20.  
  21. CFLAGS = $(LOC) -DHAVE_UNISTD_H -U_Win32 -U_WIN32 -U__MINGW32__ -O2 -Wall -fno-ident -fomit-frame-pointer
  22.  
  23. AS = $(CC)
  24. ASFLAGS = $(LOC) -Wall
  25.  
  26. LDFLAGS = $(LOC)
  27.  
  28. ARFLAGS = rcs
  29.  
  30. LDFLAGS:=  -shared -s -T dll.lds --entry _DllStartup --image-base=0 --out-implib $(IMPLIB)
  31.  
  32. INCLUDES= -I../newlib/libc/include
  33.  
  34. LIBS:=  -ldll -lc.dll
  35.  
  36. ifeq ($(findstring ebox,$(MAKECMDGOALS)),ebox)
  37. CFLAGS+=-march=pentium-mmx
  38. endif
  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) Makefile
  45.  
  46. ebox: $(STATICLIB) $(SHAREDLIB) $(IMPLIB) Makefile
  47.  
  48. .c.o:
  49.         $(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $<
  50.  
  51. .S.o:
  52.         $(AS) $(ASFLAGS) -c -o $@ $<
  53.  
  54. $(STATICLIB): $(OBJS) $(OBJA) Makefile
  55.         $(AR) $(ARFLAGS) $@ $(OBJS) $(OBJA)
  56.         mv -f libz.a $(INSTALLDIR)
  57.  
  58. $(IMPLIB): $(SHAREDLIB)
  59.  
  60. $(SHAREDLIB): zlib.def $(OBJS) $(OBJA) Makefile
  61.         $(LD) $(LDFLAGS) -o $@ zlib.def $(OBJS) $(OBJA) $(LIBS)
  62.         $(STRIP) $@
  63.         #sed -f ../newlib/cmd1.sed zlib.def > mem
  64.         #sed -f ../newlib/cmd2.sed mem >zlib.inc
  65.         mv -f libz.dll ../../bin
  66.         mv -f libz.dll.a $(INSTALLDIR)
  67.  
  68.  
  69. adler32.o: zlib.h zconf.h
  70. compress.o: zlib.h zconf.h
  71. crc32.o: crc32.h zlib.h zconf.h
  72. deflate.o: deflate.h zutil.h zlib.h zconf.h
  73. gzclose.o: zlib.h zconf.h gzguts.h
  74. gzlib.o: zlib.h zconf.h gzguts.h
  75. gzread.o: zlib.h zconf.h gzguts.h
  76. gzwrite.o: zlib.h zconf.h gzguts.h
  77. inffast.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
  78. inflate.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
  79. infback.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
  80. inftrees.o: zutil.h zlib.h zconf.h inftrees.h
  81. trees.o: deflate.h zutil.h zlib.h zconf.h trees.h
  82. uncompr.o: zlib.h zconf.h
  83. zutil.o: zutil.h zlib.h zconf.h
  84.