CC=gcc
CPPFLAGS=-MMD
CFLAGS=-O3 $(BUTT) -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
-Wstrict-prototypes -Wmissing-prototypes
CP=cp -f
LD=gcc
LDLIBS=-L. -lz
LDFLAGS=-s
INCL=zlib.h zconf.h
LIBS=libz.a
AR=ar rcs
OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \
zutil.o inflate.o infblock.o inftrees.o infcodes.o infutil.o \
inffast.o
TEST_OBJS = minigzip.o untgz.o
all: minigzip.exe untgz.exe
rebuild: clean all
libz.a: $(OBJS)
$(AR) $@ $(OBJS)
%.exe : %.o $(LIBS)
$(LD) $(LDFLAGS) -o $@ $< $(LDLIBS)
.PHONY : clean
clean:
$(RM) *.d *.o *.exe libz.a foo.gz
DEPS := $(wildcard *.d)
ifneq ($(DEPS),)
include $(DEPS)
endif