CC := ppc-amigaos-gcc -mcrt=newlib
STRIP := ppc-amigaos-strip -R.comment
RM := rm -f
CP := cp -p --remove-destination

CFLAGS := -Wall -O2 -g -Iinclude
LINK := -nostartfiles
LIBS := -lmpg123

TARGET := mpg123.library
VERSION := 52

OBJS := init.o

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

init.o: $(TARGET)_rev.h mpg123_vectors.c

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

revision:
	bumprev $(VERSION) $(TARGET)

dist: $(TARGET)
	$(CP) $(TARGET) ../
	$(CP) -r include/* ../SDK/local/common/include/
