#######  Makefile for multiple source file program  #####
#
#  Date 16 April 2001
#  Author Ivo, Craig
#  Version 1.0
#  Purpose: 
#  Notes:  specific to Borland 5.5 c++ compiler
#	MSDOS> make -n
#	MSDOS> make clean
#	MSDOS> make all
#	MSDOS> make -f makefile
#	MSDOS> make test

CPP = bcc32

########################   Definitions ###################

Myflags = -IC:\Borland\BCC55\Include \
	-IC:\Ivo.dir\UCLA_Classes\Spring01_PIC10A\UCLA_CPP_PIC10.dir/Savitch_CPP_EBook.dir\SourceCode.dir\ch03
MyLinkFlags = -LC:\Borland\BCC55\Lib
MyLibs = -lm


########################   Targets    #################################

all : sorter_main.exe


# for multiple input source files

OBJ=sorter_main.obj myOrder.obj

sorter_main.exe: $(OBJ) 
	$(CPP) $(CPPFLAGS) $(MyLinkFlags)  $(OBJ) $(MyLibs)

test: sorter_main.exe


###########################  Implicit Rules #######################
.cpp.obj:
    $(CPP) $(CPPFLAGS) $(Myflags) -c {$? }

.obj.exe:
    $(CPP) $(CPPFLAGS) $(MyLinkFlags)  $< $(MyLibs)

clean:
   -@if exist *.obj del *.obj                 >nul
   -@if exist *.lib del *.lib                 >nul
   -@if exist rwstdmsg.res del rwstdmsg.res   >nul
   -@if exist *.exe del *.exe                 >nul
   -@if exist *.dll del *.dll                 >nul
   -@if exist *.tds del *.tds                 >nul
   -@if exist $(PCHROOT).* del $(PCHROOT).*   >nul
