-CFLAGS=-g -DPROTOTYPES=1
+CFLAGS=-g -DPROTOTYPES=1 -Wall
CPPFLAGS=-I.
ifeq (cygwin,$(patsubst CYGWIN%,cygwin,$(shell uname -s)))
EXEEXT=.exe
EXEEXT=
endif
OBJS1 = ar.o io.o encode.o decode.o maketree.o maketbl.o huf.o \
- strlib.o pathlib.o filelib.o
+ strlib.o pathlib.o filelib.o header.o add.o extract.o list.o \
+ error.o
OBJS2 = getopt_long.o
OBJS = $(OBJS1) $(OBJS2)
$(TARGET): $(OBJS)
$(CC) $(CFLAGS) $^ -o $@
-prototypes.h:
+proto:
sh ./cproto.sh $(OBJS1:.o=.c)
%.o: %.c
install -m 755 olha$(EXEEXT) /usr/local/bin
check: $(TARGET) randtest
- sh ./tests/lha-test.sh 2 10 3 4 5 7
+ sh ./tests/lha-test.sh 2 10 3 4 5 7 8 16 11
+ # 12: testing the end of line conversion.
+ # 13: testing the kanji code conversion.
+ # 14: testing to handle symbolic links
+ # 15: testing to self extracting archive
+ # 17: testing to remove relative path
+ # 18: restore directory permission
sh ./test.sh
t: $(TARGET)
| sed 's/\($*\)\.o[ :]*/\1.o $@ : /g' > $@; \
[ -s $@ ] || rm -f $@
-.PHONY: clean distclean install check t randtest
+.PHONY: clean distclean install check t randtest proto