CFLAGS=-g
EXEEXT=.exe
OBJS = ar.o io.o encode.o decode.o maketree.o maketbl.o huf.o getopt_long.o
TARGET = olha$(EXEEXT)

$(TARGET): $(OBJS)
	$(CC) $(CFLAGS) $^ -o $@

%.o: %.c
	$(CC) $(CFLAGS) -I. -c $<

clean:
	$(RM) $(OBJS) $(TARGET) $(TARGET).stackdump

check test: $(TARGET)
	sh ./tests/lha-test.sh 2
#	sh ./test.sh
