DOCS = README
TARGETS = cbmconvert disk2zip zip2disk $(DOCS)

OBJS = main.o util.o read.o write.o unlynx.o unark.o unarc.o t64.o \
       image.o archive.o
HDRS = util.h input.h output.h

# C compiler settings

#CC = checkergcc
CC = gcc
CFLAGS = -Wall -ansi -pedantic -Wmissing-prototypes -Wstrict-prototypes\
	 -Wmissing-declarations -Wwrite-strings -Wshadow -Wpointer-arith\
	 -Wcast-align -Waggregate-return -Wnested-externs
#CFLAGS += -O9 -fomit-frame-pointer -funroll-loops -finline-functions
CFLAGS += -g

# Targets

all: $(TARGETS)

clean:
	rm -f $(OBJS)

reallyclean: clean
	rm -f $(TARGETS)

# Rules

cbmconvert: $(OBJS)
	$(CC) $(LDFLAGS) -o $@ $^

$(OBJS): $(HDRS)

%: %.html
	lynx -dump $^ > $@
