CC := vc +aosppc
RM := rm -f
CP := cp -p --remove-destination
MV := mv

CFLAGS := -O3 -size -maxoptpasses=20
LINK := -final
LIBS := -lauto

TARGET := CDDAPatch
VERSION := 52
OBJS := main.o cxbroker.o trimstr.o amiupdate.o tooltypes.o checklib.o asprintfpooled.o
RELEASEDIR := ../

all: $(TARGET)

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

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

.PHONY: clean dist revision

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

dist: $(TARGET)
	$(CP) $(TARGET) $(RELEASEDIR)

revision:
	bumprev $(VERSION) $(TARGET)
