Makefile.emx 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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. # To compile, or to compile and test, type:
  5. #
  6. # make -fmakefile.emx; make test -fmakefile.emx
  7. #
  8. CC=gcc -Zwin32
  9. #CFLAGS=-MMD -O
  10. #CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7
  11. #CFLAGS=-MMD -g -DDEBUG
  12. CFLAGS=-MMD -O3 $(BUTT) -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
  13. -Wstrict-prototypes -Wmissing-prototypes
  14. # If cp.exe is available, replace "copy /Y" with "cp -fp" .
  15. CP=copy /Y
  16. # If gnu install.exe is available, replace $(CP) with ginstall.
  17. INSTALL=$(CP)
  18. # The default value of RM is "rm -f." If "rm.exe" is found, comment out:
  19. RM=del
  20. LDLIBS=-L. -lzlib
  21. LD=$(CC) -s -o
  22. LDSHARED=$(CC)
  23. INCL=zlib.h zconf.h
  24. LIBS=zlib.a
  25. AR=ar rcs
  26. prefix=/usr/local
  27. exec_prefix = $(prefix)
  28. OBJS = adler32.o compress.o crc32.o deflate.o gzclose.o gzlib.o gzread.o \
  29. gzwrite.o infback.o inffast.o inflate.o inftrees.o trees.o uncompr.o zutil.o
  30. TEST_OBJS = example.o minigzip.o
  31. all: example.exe minigzip.exe
  32. test: all
  33. ./example
  34. echo hello world | .\minigzip | .\minigzip -d
  35. %.o : %.c
  36. $(CC) $(CFLAGS) -c $< -o $@
  37. zlib.a: $(OBJS)
  38. $(AR) $@ $(OBJS)
  39. %.exe : %.o $(LIBS)
  40. $(LD) $@ $< $(LDLIBS)
  41. .PHONY : clean
  42. clean:
  43. $(RM) *.d
  44. $(RM) *.o
  45. $(RM) *.exe
  46. $(RM) zlib.a
  47. $(RM) foo.gz
  48. DEPS := $(wildcard *.d)
  49. ifneq ($(DEPS),)
  50. include $(DEPS)
  51. endif