home *** CD-ROM | disk | FTP | other *** search
/ Freelog 11 / Freelog011.iso / Bas / Compression / ZLib / msdos / Makefile.emx < prev    next >
Makefile  |  1998-07-08  |  2KB  |  70 lines

  1. # Makefile for zlib.  Modified for emx 0.9c by Chr. Spieler, 6/17/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
  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.