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

# File group macros:
INC = \
	newton.hpp

SRC1 = \
	norm.cpp \
	solve.cpp

SRC2 = \
	body.cpp \
	calcDF.cpp \
	calcF.cpp \
	init.cpp \
	newton.cpp \
	term.cpp

OBJ1 = $(SRC1:.cpp=.obj)
OBJ2 = $(SRC2:.cpp=.obj)

EXE = \
	newton.exe

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

# The executable file depends upon the object files and actions follow:
$(EXE): $(OBJ1) $(OBJ2)
	$(CPP) $(OPTS) -e$(EXE) $(OBJ1) $(OBJ2)

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

# Object files depend upon include files:
$(OBJ2): $(INC)

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