home *** CD-ROM | disk | FTP | other *** search
/ Freelog 11 / Freelog011.iso / Bas / Compression / ZLib / nt / Makefile.emx next >
Makefile  |  1998-07-08  |  3KB  |  139 lines

  1. # Makefile for zlib.  Modified for emx/rsxnt by Chr. Spieler, 6/16/98.
  2. # Copyright (C) 1995-1998 Jean-loup Gailly.
  3. # For conditions of distribution and use, see copyright notice in zlib.h 
  4.  
  5. # To compile, or to compile and test, type:
  6. #   make -fmakefile.emx;  make test -fmakefile.emx
  7.  
  8. CC=gcc -Zwin32
  9.  
  10. #CFLAGS=-MMD -O
  11. #CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7
  12. #CFLAGS=-MMD -g -DDEBUG
  13. CFLAGS=-MMD -O3 $(BUTT) -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
  14.              -Wstrict-prototypes -Wmissing-prototypes
  15.  
  16. # If cp.exe is available, replace "copy /Y" with "cp -fp" .
  17. CP=copy /Y
  18. # If gnu install.exe is available, replace $(CP) with ginstall.
  19. INSTALL=$(CP)
  20. # The default value of RM is "rm -f."  If "rm.exe" is found, comment out:
  21. RM=del
  22. LDLIBS=-L. -lzlib
  23. LD=$(CC) -s -o
  24. LDSHARED=$(CC)
  25.  
  26. INCL=zlib.h zconf.h
  27. LIBS=zlib.a
  28.  
  29. AR=ar rcs
  30.  
  31. prefix=/usr/local
  32. exec_prefix = $(prefix)
  33.  
  34. OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \
  35.        zutil.o inflate.o infblock.o inftrees.o infcodes.o infutil.o inffast.o
  36.  
  37. TEST_OBJS = example.o minigzip.o
  38.  
  39. all: example.exe minigzip.exe
  40.  
  41. test: all
  42.     ./example
  43.     echo hello world | .\minigzip | .\minigzip -d 
  44.  
  45. %.o : %.c
  46.     $(CC) $(CFLAGS) -c $< -o $@
  47.  
  48. zlib.a: $(OBJS)
  49.     $(AR) $@ $(OBJS)
  50.  
  51. %.exe : %.o $(LIBS)
  52.     $(LD) $@ $< $(LDLIBS)
  53.  
  54.  
  55. .PHONY : clean
  56.  
  57. clean:
  58.     $(RM) *.d
  59.     $(RM) *.o
  60.     $(RM) *.exe
  61.     $(RM) zlib.a
  62.     $(RM) foo.gz
  63.  
  64. DEPS := $(wildcard *.d)
  65. ifneq ($(DEPS),)
  66. include $(DEPS)
  67. endif
  68. # Makefile for zlib.  Modified for emx 0.9c by Chr. Spieler, 6/17/98.
  69. # Copyright (C) 1995-1998 Jean-loup Gailly.
  70. # For conditions of distribution and use, see copyright notice in zlib.h 
  71.  
  72. # To compile, or to compile and test, type:
  73. #   make -fmakefile.emx;  make test -fmakefile.emx
  74.  
  75. CC=gcc
  76.  
  77. #CFLAGS=-MMD -O
  78. #CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7
  79. #CFLAGS=-MMD -g -DDEBUG
  80. CFLAGS=-MMD -O3 $(BUTT) -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
  81.              -Wstrict-prototypes -Wmissing-prototypes
  82.  
  83. # If cp.exe is available, replace "copy /Y" with "cp -fp" .
  84. CP=copy /Y
  85. # If gnu install.exe is available, replace $(CP) with ginstall.
  86. INSTALL=$(CP)
  87. # The default value of RM is "rm -f."  If "rm.exe" is found, comment out:
  88. RM=del
  89. LDLIBS=-L. -lzlib
  90. LD=$(CC) -s -o
  91. LDSHARED=$(CC)
  92.  
  93. INCL=zlib.h zconf.h
  94. LIBS=zlib.a
  95.  
  96. AR=ar rcs
  97.  
  98. prefix=/usr/local
  99. exec_prefix = $(prefix)
  100.  
  101. OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \
  102.        zutil.o inflate.o infblock.o inftrees.o infcodes.o infutil.o inffast.o
  103.  
  104. TEST_OBJS = example.o minigzip.o
  105.  
  106. all: example.exe minigzip.exe
  107.  
  108. test: all
  109.     ./example
  110.     echo hello world | .\minigzip | .\minigzip -d 
  111.  
  112. %.o : %.c
  113.     $(CC) $(CFLAGS) -c $< -o $@
  114.  
  115. zlib.a: $(OBJS)
  116.     $(AR) $@ $(OBJS)
  117.  
  118. %.exe : %.o $(LIBS)
  119.     $(LD) $@ $< $(LDLIBS)
  120.  
  121.  
  122. .PHONY : clean
  123.  
  124. clean:
  125.     $(RM) *.d
  126.     $(RM) *.o
  127.     $(RM) *.exe
  128.     $(RM) zlib.a
  129.     $(RM) foo.gz
  130.  
  131. DEPS := $(wildcard *.d)
  132. ifneq ($(DEPS),)
  133. include $(DEPS)
  134. endif
  135.