1 CFLAGS=-g -DPROTOTYPES=1 -Wall
3 ifeq (cygwin,$(patsubst CYGWIN%,cygwin,$(shell uname -s)))
8 OBJS1 = ar.o io.o encode.o decode.o maketree.o maketbl.o huf.o \
9 strlib.o pathlib.o filelib.o header.o add.o extract.o list.o \
13 OBJS = $(OBJS1) $(OBJS2)
16 TARGET = olha$(EXEEXT)
19 $(CC) $(CFLAGS) $^ -o $@
22 sh ./cproto.sh $(OBJS1:.o=.c)
25 $(CC) $(CFLAGS) $(CPPFLAGS) -c $<
28 $(RM) $(OBJS) $(TARGET) $(TARGET).stackdump
31 $(RM) $(DEPS) tests/test.log
34 install -m 755 olha$(EXEEXT) /usr/local/bin
36 check: $(TARGET) randtest
37 sh ./tests/lha-test.sh 2 10 3 4 5 7 8 16 11
38 # 12: testing the end of line conversion.
39 # 13: testing the kanji code conversion.
40 # 14: testing to handle symbolic links
41 # 15: testing to self extracting archive
42 # 17: testing to remove relative path
43 # 18: restore directory permission
47 cd t && python lha-test.py
50 cd ./randtest && PATH=..:$$PATH ruby randtest.rb
52 # include $(wildcard *.d)
57 @set -e; $(CC) -M $(CPPFLAGS) $< \
58 | sed 's/\($*\)\.o[ :]*/\1.o $@ : /g' > $@; \
61 .PHONY: clean distclean install check t randtest proto