
CC     = $(CROSS_COMPILE)gcc 
STRIP  = $(CROSS_COMPILE)strip 
CXX    = $(CROSS_COMPILE)c++ 
AS     = $(CROSS_COMPILE)as 
LD     = $(CROSS_COMPILE)ld 
RANLIB = $(CROSS_COMPILE)ranlib 
RM     = delete

VERSION = 52
REVISION= 1

# Change these as required
OPTIMIZE= -Os
DEBUG	= -ggdb
#CFLAGS  = -mcrt=newlib -W -Wall -Wwrite-strings $(OPTIMIZE)
CFLAGS  = -mcrt=newlib -W -Wall -Wwrite-strings $(DEBUG)

# Flags passed to gcc during linking
LINK	= -mcrt=newlib

# Name of the "thing" to build
TARGET	= rTI84.exe

# Additional linker libraries
LIBS = 

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

SRCS = rti84.c

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

OBJS = $(SRCS:.c=.o)
# Rules for building
$(TARGET): $(OBJS)
	$(CC) $(LINK) -o $(TARGET).debug $(OBJS) $(LIBS) -Wl,--cref,-M,-Map=$@.map
	$(STRIP) -R.comment $(TARGET).debug -o $(TARGET)

.PHONY: clean
clean:
	$(RM) $(TARGET) $(TARGET).debug $(TARGET).map $(OBJS)
	@echo "Done!!"

.PHONY: revision
revision:
	bumprev -v $(VERSION) -r $(REVISION) -n $(TARGET) -b ADM8511

