CC := vc +aosppc
RM := rm -f
CP := cp -p --remove-dest

CFLAGS := -O3
LINK := -final
LIBS := -lauto

TARGET := vditool
VERSION := 1

OBJS := main.o progress.o vdi.o raw.o

all: $(TARGET)

$(TARGET): $(OBJS)
	$(CC) -o $@ $(LINK) $^ $(LIBS)

main.o: $(TARGET)_rev.h
$(OBJS): vditool.h

.PHONY: install dist clean revision

install: $(TARGET)
	$(CP) $(TARGET) SYS:C/

dist: $(TARGET)
	$(CP) $(TARGET) ../

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

revision:
	bumprev $(VERSION) $(TARGET)
