# Manage project files: build, remove, etc.

# add new files here:
PROGRAMS = step0 step1 step2 step3 step4 step5 step6 step7 step8 step9 step10 step11

# acording development platform, library names can change:
# For Linux (Mesa 4.1):
LIBRARIES = -lglut -lGL -lGLU -lm
# For GNU-Win32 (Cygwin):
# LIBRARIES = -lglut32 -lglu32 -lopengl32

INCLUDE = -I/usr/include/ -I/usr/local/include/
LIBDIR  = -L/usr/X11R6/lib -L/usr/local/lib

CC = gcc
CXX = $(CC)
OPTIONS = -Wall
CFLAGS = $(OPTIONS) $(INCLUDE)
CXXFLAGS = $(OPTIONS)

info:
	@echo "Available commands:"
	@echo " make all   - build project files"
	@echo " make clean - remove object and binary files"
	@echo "Edit this makefile to add more files."

all: $(PROGRAMS)

step%: step%.o
	$(CC) $(CFLAGS) -o $@ $(LIBDIR) $< $(LIBRARIES)

clean:
	rm *~ *.o step*[0123456789] step*[0123456789].exe -f
