2010-01-13 02:21:39 +00:00
|
|
|
#LDFLAGS = -Llibs -search_paths_first -g -Wall
|
|
|
|
LDFLAGS = -L/Library/Fink/sl64/lib -search_paths_first -g -Wall
|
2009-12-26 04:08:51 +00:00
|
|
|
CFLAGS = -I/Library/Fink/sl64/include -g -O0 -std=c99 -Wall
|
2009-12-20 03:57:39 +00:00
|
|
|
|
2009-12-28 05:51:28 +00:00
|
|
|
CC = gcc $(CFLAGS) -c -o
|
|
|
|
LD = gcc $(LDFLAGS) -o
|
|
|
|
|
2010-01-12 22:00:37 +00:00
|
|
|
all: pixz pixzlist pixztar write read
|
2009-12-28 05:51:28 +00:00
|
|
|
|
|
|
|
|
2009-12-29 06:48:51 +00:00
|
|
|
%.o: %.c pixz.h
|
2009-12-28 05:51:28 +00:00
|
|
|
$(CC) $@ $<
|
|
|
|
|
2009-12-29 06:48:51 +00:00
|
|
|
pixz: pixz.o encode.o block.o util.o
|
|
|
|
$(LD) $@ $^ -llzma
|
2009-12-28 05:51:28 +00:00
|
|
|
|
|
|
|
pixzlist: pixzlist.o
|
2009-12-29 06:48:51 +00:00
|
|
|
$(LD) $@ $^ -llzma
|
|
|
|
|
2010-01-10 02:56:01 +00:00
|
|
|
pixztar: tar.o util.o index.o encode.o block.o
|
2010-01-13 02:21:39 +00:00
|
|
|
$(LD) $@ $^ -larchive -llzma
|
2009-12-28 05:51:28 +00:00
|
|
|
|
2010-01-12 06:57:11 +00:00
|
|
|
write: write.o
|
2010-01-13 02:21:39 +00:00
|
|
|
$(LD) $@ $^ -larchive -llzma
|
2009-12-28 05:51:28 +00:00
|
|
|
|
2010-01-12 22:00:37 +00:00
|
|
|
read: read.o
|
2010-01-13 02:21:39 +00:00
|
|
|
$(LD) $@ $^ -larchive -llzma
|
2010-01-12 22:00:37 +00:00
|
|
|
|
2009-12-26 04:08:51 +00:00
|
|
|
run: pixz
|
|
|
|
time ./$< < test.in > test.out
|
2009-12-20 04:02:18 +00:00
|
|
|
@md5sum test.in
|
|
|
|
@xz -d < test.out | md5sum
|
2009-12-20 03:57:39 +00:00
|
|
|
|
|
|
|
clean:
|
2009-12-29 06:48:51 +00:00
|
|
|
rm -f *.o pixz pixzlist pixztar test.out
|
2009-12-20 03:57:39 +00:00
|
|
|
|
2009-12-28 05:51:28 +00:00
|
|
|
.PHONY: all run clean
|