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

# File group macros:
INC1 = \
	MyMatrix.hpp

INC2 = \
	MyProgram.hpp

SRC1 = \
	MMassign.cpp \
	MMdivide.cpp \
	MMequal.cpp \
	MMerase.cpp \
	MMminus.cpp \
	MMplus.cpp \
	MMtimes.cpp \
	MyMatrix.cpp \
	ReadFile.cpp \
	show_matrix.cpp \
	WriteFile.cpp

SRC2 = \
	body.cpp \
	init.cpp \
	MyProgram.cpp \
	term.cpp

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

EXE = \
	MyProgram.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:
$(OBJ1): $(INC1)

$(OBJ2): $(INC1) $(INC2)

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