#----------------------------------------------
# Paths to Tools
# 
# Note: Modify the following paths to
# correspond to your environment.
#
#----------------------------------------------
CPATH   = D:\BC5                    # Location of Borland tools
CC      = $(CPATH)\bin\Bcc          # compiler
LINK    = $(CPATH)\bin\TLink        # linker
MAKE    = $(CPATH)\bin\Make         # make utility
DOSDIR  = D:\General        		# path to DOS6XL files


#----------------------------------------------
# Path to API Libraries and Include files
# 
# Note: Modify the following paths to
# correspond to your environment.
#
#----------------------------------------------
SPLIB   = mvispapi.lib 				# Path to Serial Port API library
HDMLIB	= mvidf1hm.lib				# Path to DF1 half-duplex master API library
DOSINC  = $(DOSDIR)\inc             # path to DOS6XL include files
DOSLIB  = $(DOSDIR)\lib             # path to DOS6XL library files


#----------------------------------------------
# Options
#----------------------------------------------
CFLAGS  = -c -v- -w -ml -I$(CPATH)\include;$(DOSINC)
LFLAGS  = -v- -Tde -c -s -m /v+ 


#----------------------------------------------
# Target Name
#----------------------------------------------
TARG    = hmsample


#---------------------------------
# Library files
#---------------------------------
LIBS    =   $(SPLIB) $(HDMLIB) $(DOSDIR)\lib\kernel.lib


#----------------------------------------------
# Object files
#----------------------------------------------
OBJ     = $(TARG).obj 


#---------------------------------
# Final target
#---------------------------------
$(TARG).exe : $(OBJ) $(LIBS)
    $(LINK) @&&|
$(LFLAGS) c0l $(OBJ)
$*.exe
$*.map
$(LIBS) noehl cl
|
	pdconvrt $(TARG).exe


clean:
    del *.exe
    del *.obj
    del *.map

rebuild:
    $(MAKE) clean
    $(MAKE)

.c.obj:
    $(CC) $(CFLAGS) $*.c


$(TARG).obj: $(TARG).c $(LIBS)  makefile



