# Command macros:
CPP	= bcc32
OPTS	= 
DEL	= del

# File group macros:
INCS = \
	glheader.hpp

SRCS = \
	display.cpp\
	gldataload.cpp\
	gldim.cpp\
	gldriver.cpp\
	glgauss.cpp\
	glread.cpp\
	glsavew.cpp\
	init.cpp\
	keyboard.cpp\
	mouse.cpp\
	pan.cpp\
	readerror.cpp\
	reshape.cpp\
	zoom.cpp
 
OBJS = $(SRCS:.cpp=.obj)

EXE = \
	curve.exe

# Make everything up-to-date:
all: $(EXE)

# The executable file depends upon the object files and actions follow:
$(EXE): $(OBJS)
	$(CPP) $(OPTS) -e$(EXE) $(OBJS) glut32.lib

# glut32.lib necessary for OpenGL programming!

# Implicit rule for building object files from source files:
.cpp.obj:
	$(CPP) $(OPTS) -c $*.cpp

# Object files depend upon include files:
$(OBJS): $(INCS)

# Clean up the directory:
clean:
	-@if exist *.obj $(DEL) *.obj > nul
	-@if exist *.tds $(DEL) *.tds > nul
	-@if exist *.exe $(DEL) *.exe > nul

# resources:
# http://www.eng.hawaii.edu/Tutor/Make/
# http://www.gnu.org/manual/make/html_chapter/make_toc.html
