# libfpk -- using FPK archive on P/ECE
# 	By Yui N., 2003.
# http://www.autch.net/

TARGET = libfpk.lib
OBJS = fpkCloseArchive.o fpkExtractToBuffer.o fpkGetFileInfoN.o fpkGetFileInfoS.o \
	fpkOpenArchive.o hitodeLZSSDecoder.o pceFileReadPos.o zlibDecode.o inflate.o
TESTS = test/makefile test/test.c test/test.pex test/test.srf
DEPFLAGS = -nostdinc -isystem c:/piece/include -I- -I.

$(TARGET): $(OBJS)
	lib33 $@ $^

.c.o:
	pcc33 -c -O3 $<

zip: $(TARGET)
	zip -9 libfpk *.c *.h *.lib *.txt makefile makefile.dep $(TESTS)

clean:
	rm -f *.o

depend:
	echo "# auto-generated by \"make depend\"" > makefile.dep
	for f in *.c; do cpp -E -MM $(DEPFLAGS) $$f >> makefile.dep; done

include makefile.dep
