# Makefile for TASM using Borland MAKE (3.6)
AS = tasm
!IFDEF CMD_PROMPT
OPT_PROMPT = /dCMD_PROMPT
!ENDIF
!IFDEF NODIRS
AFLAGS = /t/z/w $(OPT_PROMPT) /dNODIRS
!ELSE
AFLAGS = /t/z/w $(OPT_PROMPT)
!ENDIF
LINK = tlink
LFLAGS = /t/s

INC = common.inc general.inc ascii.inc buffers.inc dos.inc bios.inc

.asm.obj:
	$(AS) $(AFLAGS) $<

!IFDEF NODIRS
OBJS = cmdedit.obj cmdmacro.obj edit.obj history.obj strstack.obj \
       utl.obj install.obj
!IFDEF CMD_PROMPT
PROJ = cmdeditp
!ELSE
PROJ = cmdedit
!ENDIF
!ELSE
OBJS = cmdedit.obj cmdmacro.obj dirs.obj edit.obj history.obj strstack.obj \
       utl.obj install.obj
!IFDEF CMD_PROMPT
PROJ = cmdedtdp
!ELSE
PROJ = cmdeditd
!ENDIF
!ENDIF

all: $(PROJ).com

cmdedit.obj:  cmdedit.asm $(INC)

cmdmacro.obj: cmdmacro.asm $(INC)

!IFNDEF NODIRS
dirs.obj:     dirs.asm $(INC)
!ENDIF

edit.obj:     edit.asm $(INC)

history.obj:  history.asm $(INC)

install.obj:  install.asm $(INC) help.inc

strstack.obj: strstack.asm $(INC)

utl.obj:      utl.asm $(INC)

$(PROJ).com: $(OBJS)
	$(LINK) $(LFLAGS) $(OBJS), $(PROJ).com
