# GLUT-basic template
#
# See GLUT-basic.c for details
#
# written by Hans de Ruiter
#
# License:
# This source code can be used and/or modified without restrictions.
# It is provided as is and the author disclaims all warranties, expressed 
# or implied, including, without limitation, the warranties of
# merchantability and of fitness for any purpose. The user must assume the
# entire risk of using the Software.

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

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

TARGET = GLUT-basic

# The source files
SRCS = GLUT-basic.c

# Flags passed to gcc during linking
LINK =

# Additional linker libraries
LIBS = -lGL -lGLUT

# -------------------------------------------------------------
# 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)
