123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- CC=gcc -Zwin32
- CFLAGS=-MMD -O3 $(BUTT) -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
- -Wstrict-prototypes -Wmissing-prototypes
- CP=copy /Y
- INSTALL=$(CP)
- RM=del
- LDLIBS=-L. -lzlib
- LD=$(CC) -s -o
- LDSHARED=$(CC)
- INCL=zlib.h zconf.h
- LIBS=zlib.a
- AR=ar rcs
- prefix=/usr/local
- exec_prefix = $(prefix)
- OBJS = adler32.o compress.o crc32.o deflate.o gzclose.o gzlib.o gzread.o \
- gzwrite.o infback.o inffast.o inflate.o inftrees.o trees.o uncompr.o zutil.o
- TEST_OBJS = example.o minigzip.o
- all: example.exe minigzip.exe
- test: all
- ./example
- echo hello world | .\minigzip | .\minigzip -d
- %.o : %.c
- $(CC) $(CFLAGS) -c $< -o $@
- zlib.a: $(OBJS)
- $(AR) $@ $(OBJS)
- %.exe : %.o $(LIBS)
- $(LD) $@ $< $(LDLIBS)
- .PHONY : clean
- clean:
- $(RM) *.d
- $(RM) *.o
- $(RM) *.exe
- $(RM) zlib.a
- $(RM) foo.gz
- DEPS := $(wildcard *.d)
- ifneq ($(DEPS),)
- include $(DEPS)
- endif
|