• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1CC=cc
2CFLAGS := $(CFLAGS) -O -I../..
3
4UNZ_OBJS = miniunz.o unzip.o ioapi.o ../../libz.a
5ZIP_OBJS = minizip.o zip.o   ioapi.o ../../libz.a
6
7.c.o:
8	$(CC) -c $(CFLAGS) $*.c
9
10all: miniunz minizip
11
12miniunz:  $(UNZ_OBJS)
13	$(CC) $(CFLAGS) -o $@ $(UNZ_OBJS)
14
15minizip:  $(ZIP_OBJS)
16	$(CC) $(CFLAGS) -o $@ $(ZIP_OBJS)
17
18test:	miniunz minizip
19	@rm -f test.*
20	@echo hello hello hello > test.txt
21	./minizip test test.txt
22	./miniunz -l test.zip
23	@mv test.txt test.old
24	./miniunz test.zip
25	@cmp test.txt test.old
26	@rm -f test.*
27
28clean:
29	/bin/rm -f *.o *~ minizip miniunz test.*
30