# GLUT-fullscreen template
#
# See GLUT-fullscreen.c and GLUT-fullscreen2.c for details
#
# 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 -DMINIGL

TARGET = GLUT-fullscreen
TARGET2 = GLUT-fullscreen2

# The source files
SRCS = GLUT-fullscreen.c
SRCS2 = GLUT-fullscreen2.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)
OBJS2 = $(SRCS2:.c=.o)

# Rules for building
all: $(TARGET) $(TARGET2)

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

$(TARGET2): $(OBJS2)
	$(CC) $(CFLAGS) -o $@.debug $(OBJS2) $(LIBS) $(LINK)
	$(STRIP) $@.debug -o $@

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