You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
1.1 KiB

  1. # Makefile for zlib. Modified for mingw32
  2. # For conditions of distribution and use, see copyright notice in zlib.h
  3. # To compile,
  4. #
  5. # make -fmakefile.w32
  6. #
  7. CC=gcc
  8. # Generate dependencies (see end of the file)
  9. CPPFLAGS=-MMD
  10. #CFLAGS=-MMD -O
  11. #CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7
  12. #CFLAGS=-MMD -g -DDEBUG
  13. CFLAGS=-O3 $(BUTT) -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
  14. -Wstrict-prototypes -Wmissing-prototypes
  15. # If cp.exe is not found, replace with copy /Y .
  16. CP=cp -f
  17. # The default value of RM is "rm -f."
  18. # If "rm.exe" is not found, uncomment:
  19. # RM=del
  20. LD=gcc
  21. LDLIBS=-L. -lz
  22. LDFLAGS=-s
  23. INCL=zlib.h zconf.h
  24. LIBS=libz.a
  25. AR=ar rcs
  26. OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \
  27. zutil.o inflate.o infblock.o inftrees.o infcodes.o infutil.o \
  28. inffast.o
  29. TEST_OBJS = minigzip.o untgz.o
  30. all: minigzip.exe untgz.exe
  31. rebuild: clean all
  32. libz.a: $(OBJS)
  33. $(AR) $@ $(OBJS)
  34. %.exe : %.o $(LIBS)
  35. $(LD) $(LDFLAGS) -o $@ $< $(LDLIBS)
  36. .PHONY : clean
  37. clean:
  38. $(RM) *.d *.o *.exe libz.a foo.gz
  39. DEPS := $(wildcard *.d)
  40. ifneq ($(DEPS),)
  41. include $(DEPS)
  42. endif