TASM = tasm /MX /ZI /T

TPC = tpc /m /l /$d-,l- /ocompiler;tedit

PAS = basm.pas bptdlg.pas calstkwn.pas compiler.pas compopt.pas \
compvars.pas compwind.pas config.pas controls.pas cpuwin.pas debug.pas \
editor.pas evaldlg.pas extend.pas fnames.pas help.pas helpfile.pas \
helphist.pas helpscrn.pas helputil.pas tstatus.pas mem.pas outputwn.pas \
tmenu.pas reg.pas shell.pas tcolors.pas tdinfo.pas tdos.pas tedit.pas \
tracer.pas tstddlg.pas context.pas tvars.pas twindows.pas utils.pas \
vfiles.pas videoio.pas vmem.pas vmemutil.pas vswap.pas watchwin.pas \
strnames.pas

BASM = compiler\basm.obj compiler\opcodes.obj

COMPILER = compiler\stdproc.obj compiler\stdfunc.obj compiler\stdutils.obj \
compiler\debugger.obj compiler\put.obj compiler\declare.obj \
compiler\opers.obj compiler\convert.obj compiler\codegen.obj \
compiler\compile.obj compiler\error.obj compiler\arith.obj \
compiler\object.obj compiler\stmtpart.obj compiler\stmt.obj \
compiler\lex.obj compiler\expr.obj compiler\convert2.obj compiler\asm.obj \
compiler\link.obj compiler\units.obj compiler\cheap.obj compiler\tpstart.obj

DEBUG = compiler\debug.obj compiler\debug2.obj

EXTEND = compiler\extarith.obj compiler\extconv.obj compiler\extpow10.obj \
compiler\extstr.obj

TDINFO = compiler\tdinfo.obj compiler\linkmap.obj

TEDIT = tedit\edmain.obe tedit\edpages.obe tedit\edcursor.obe \
tedit\eddelete.obe tedit\edrw.obe tedit\edsearch.obe tedit\edmatch.obe \
tedit\edchange.obe tedit\edindent.obe tedit\edinsert.obe tedit\edpos.obe \
tedit\edtoggle.obe tedit\edblock.obe tedit\edredraw.obe tedit\edkeys.obe \
tedit\edrepl.obe tedit\edundo.obe tedit\edlines.obe

VIDEOIO = videoio.obj

OBJECT = $(BASM) $(COMPILER) $(DEBUG) $(EXTEND) $(TDINFO) $(TEDIT) $(VIDEOIO)

turbo.exe: $(PAS) turbo.pas params.pas runerr.pas getopt.pas turbo2.pas \
turbo1.pas turbo.tvr $(OBJECT)
 $(TPC) /dsingleexe turbo
 copy /b turbo.exe+turbo.ovr+turbo.tvr

turbo.tvr: $(PAS) tres.pas turbo.cmd $(OBJECT)
 $(TPC) tres
 tres
 del tres.exe

.asm.obj:
 $(TASM) /ICOMPILER $*,$*.obj

.asm.obe:
 $(TASM) /M /ITEDIT $*,$*.obe

compiler\basm.obj: compiler\basm.asm compiler\basm.inc compiler\asmexpr.inc \
  compiler\asmlex.inc compiler\asminstr.inc
compiler\opcodes.obj: compiler\opcodes.asm compiler\basm.inc

compiler\stdproc.obj: compiler\stdproc.asm compiler\compiler.inc
compiler\stdfunc.obj: compiler\stdfunc.asm compiler\compiler.inc
compiler\stdutils.obj: compiler\stdutils.asm compiler\compiler.inc
compiler\debugger.obj: compiler\debugger.asm compiler\compiler.inc
compiler\put.obj: compiler\put.asm compiler\compiler.inc
compiler\declare.obj: compiler\declare.asm compiler\compiler.inc
compiler\opers.obj: compiler\opers.asm compiler\compiler.inc
compiler\convert.obj: compiler\convert.asm compiler\compiler.inc
compiler\codegen.obj: compiler\codegen.asm compiler\compiler.inc
compiler\compile.obj: compiler\compile.asm compiler\compiler.inc
compiler\error.obj: compiler\error.asm compiler\compiler.inc
compiler\arith.obj: compiler\arith.asm compiler\compiler.inc
compiler\object.obj: compiler\object.asm compiler\compiler.inc
compiler\stmtpart.obj: compiler\stmtpart.asm compiler\compiler.inc
compiler\stmt.obj: compiler\stmt.asm compiler\compiler.inc
compiler\lex.obj: compiler\lex.asm compiler\compiler.inc
compiler\expr.obj: compiler\expr.asm compiler\compiler.inc
compiler\convert2.obj: compiler\convert2.asm compiler\compiler.inc
compiler\asm.obj: compiler\asm.asm compiler\compiler.inc
compiler\link.obj: compiler\link.asm compiler\compiler.inc
compiler\units.obj: compiler\units.asm compiler\compiler.inc
compiler\cheap.obj: compiler\cheap.asm compiler\compiler.inc
compiler\tpstart.obj: compiler\tpstart.asm compiler\compiler.inc

compiler\debug.obj: compiler\debug.asm compiler\debanalz.inc \
  compiler\debopcod.inc compiler\debemul.inc

compiler\extarith.obj: compiler\extarith.asm compiler\extend.inc
compiler\extconv.obj: compiler\extconv.asm compiler\extend.inc
compiler\extpow10.obj: compiler\extpow10.asm compiler\extend.inc
compiler\extstr.obj: compiler\extstr.asm compiler\extend.inc

compiler\tdinfo.obj: compiler\tdinfo.asm compiler\tdinfo1.inc \
  compiler\tdinfo2.inc compiler\tdinfo3.inc compiler\tdinfo4.inc \
  compiler\tdinfo5.inc compiler\tdinfo6.inc compiler\tdinfo7.inc \
  compiler\compiler.inc
compiler\linkmap.obj: compiler\linkmap.asm compiler\compiler.inc

tedit\edmain.obe: tedit\edmain.asm tedit\ed.inc
tedit\edpages.obe: tedit\edpages.asm tedit\ed.inc
tedit\edcursor.obe: tedit\edcursor.asm tedit\ed.inc
tedit\eddelete.obe: tedit\eddelete.asm tedit\ed.inc
tedit\edrw.obe: tedit\edrw.asm tedit\ed.inc
tedit\edsearch.obe: tedit\edsearch.asm tedit\ed.inc
tedit\edmatch.obe: tedit\edmatch.asm tedit\ed.inc
tedit\edchange.obe: tedit\edchange.asm tedit\ed.inc
tedit\edindent.obe: tedit\edindent.asm tedit\ed.inc
tedit\edinsert.obe: tedit\edinsert.asm tedit\ed.inc
tedit\edpos.obe: tedit\edpos.asm tedit\ed.inc
tedit\edtoggle.obe: tedit\edtoggle.asm tedit\ed.inc
tedit\edblock.obe: tedit\edblock.asm tedit\ed.inc
tedit\edredraw.obe: tedit\edredraw.asm tedit\ed.inc
tedit\edkeys.obe: tedit\edkeys.asm tedit\ed.inc
tedit\edrepl.obe: tedit\edrepl.asm tedit\ed.inc
tedit\edundo.obe: tedit\edundo.asm tedit\ed.inc
tedit\edlines.obe: tedit\edlines.asm tedit\ed.inc
