2024-01-21 20:24:10 +03:00
|
|
|
CC?=cc
|
2024-03-09 23:59:57 +03:00
|
|
|
CFLAGS := -O $(CFLAGS) -I../..
|
2011-09-10 10:27:17 +04:00
|
|
|
|
|
|
|
UNZ_OBJS = miniunz.o unzip.o ioapi.o ../../libz.a
|
|
|
|
ZIP_OBJS = minizip.o zip.o ioapi.o ../../libz.a
|
|
|
|
|
|
|
|
.c.o:
|
|
|
|
$(CC) -c $(CFLAGS) $*.c
|
|
|
|
|
|
|
|
all: miniunz minizip
|
|
|
|
|
|
|
|
miniunz: $(UNZ_OBJS)
|
|
|
|
$(CC) $(CFLAGS) -o $@ $(UNZ_OBJS)
|
|
|
|
|
|
|
|
minizip: $(ZIP_OBJS)
|
|
|
|
$(CC) $(CFLAGS) -o $@ $(ZIP_OBJS)
|
|
|
|
|
|
|
|
test: miniunz minizip
|
2022-01-02 01:32:17 +03:00
|
|
|
@rm -f test.*
|
|
|
|
@echo hello hello hello > test.txt
|
|
|
|
./minizip test test.txt
|
2011-09-10 10:27:17 +04:00
|
|
|
./miniunz -l test.zip
|
2022-01-02 01:32:17 +03:00
|
|
|
@mv test.txt test.old
|
2011-09-10 10:27:17 +04:00
|
|
|
./miniunz test.zip
|
2022-01-02 01:32:17 +03:00
|
|
|
@cmp test.txt test.old
|
|
|
|
@rm -f test.*
|
2011-09-10 10:27:17 +04:00
|
|
|
|
|
|
|
clean:
|
2022-01-02 01:32:17 +03:00
|
|
|
/bin/rm -f *.o *~ minizip miniunz test.*
|