# Using Crashlogs example makefile
#
# See http://hdrlab.org.nz/using-crash-logs/ for more
#
# written by Hans de Ruiter
#
# License:
# This is provided as-is and can be used and distributed by anyone
# without restrictions.

CC     = gcc
CP	   = copy
RM     = delete
STRIP  = strip

OPTIMIZE = -O3
DEBUG =
CFLAGS = -mcrt=newlib $(OPTIMIZE) -Wall -gstabs 

TARGET = badboy

# The source files
SRCS = badboy.c

# Flags passed to gcc during linking
LINK =

# Additional linker libraries
LIBS = 

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

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

# Rules for building
all: $(TARGET)

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

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