MAKE = make
CC   = vc +aosppc
CP	 = copy
RM   = delete

# Change these as required
OPTIMIZE = -O4 -speed  -maxoptpasses=50
DEBUG =
CFLAGS = $(OPTIMIZE) $(DEBUG) -Iinclude #-DDEBUG

# Flags passed to gcc during linking
LINK = $(OPTIMIZE) $(DEBUG)

# Additional linker libraries
LIBS = -lvc

# Name of the "thing" to build
TARGET  = TN_ACM.tnplug
VERSION = 1

# Source code files used in this project
# Add any additional files to this line

SRCS = init.c initplayer.c announceplayer.c openplayer.c \
	decodeframeplayer.c donotify.c util.c decode.c

# -------------------------------------------------------------
# Nothing should need changing below this line

OBJS = $(SRCS:.c=.o)

# Rules for building
$(TARGET): $(OBJS)
	$(CC) $(LINK) -nostdlib -o $(TARGET) $(OBJS) $(LIBS)

init.o: $(TARGET)_rev.h

.PHONY: install
install: $(TARGET)
	$(CP) $(TARGET) Apps:TuneNet/Plugins/

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

.PHONY: distclean
distclean:
	$(RM) $(OBJS)

.PHONY: revision
revision:
	bumprev $(VERSION) $(TARGET)
