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
12 OBJS = $(OBJS1) $(OBJS2)
15 TARGET = olha$(EXEEXT)
18 $(CC) $(CFLAGS) $^ -o $@
21 sh ./cproto.sh $(OBJS1:.o=.c)
24 $(CC) $(CFLAGS) $(CPPFLAGS) -c $<
27 $(RM) $(OBJS) $(TARGET) $(TARGET).stackdump
30 $(RM) $(DEPS) tests/test.log
33 install -m 755 olha$(EXEEXT) /usr/local/bin
35 check: $(TARGET) randtest
36 sh ./tests/lha-test.sh 2 10 3 4 5 7 8 16 11
37 # 12: testing the end of line conversion.
38 # 13: testing the kanji code conversion.
39 # 14: testing to handle symbolic links
40 # 15: testing to self extracting archive
41 # 17: testing to remove relative path
42 # 18: restore directory permission
46 cd t && python lha-test.py
49 cd ./randtest && PATH=..:$$PATH ruby randtest.rb
51 # include $(wildcard *.d)
56 @set -e; $(CC) -M $(CPPFLAGS) $< \
57 | sed 's/\($*\)\.o[ :]*/\1.o $@ : /g' > $@; \
60 .PHONY: clean distclean install check t randtest proto