.path.obj = .
.path.c = .
.path.exe = .

ROOT    = C:\BC5
INCLUDE = $(ROOT)\INCLUDE;..\INCLUDE
RES     = true-tpl.res
OBJS    = true-tpl.obj eicoll.obj farintf.obj cregexp.obj clocale.obj
LIBS    = cw32.lib import32.lib
#FLAGS = -X -4 -k- -K -w -O2 -Oc -Oi -RT- -a1 -x- -f- -ff- -I..\INCLUDE
#FLAGS = -4 -x- -f- -ff- -w -RT- -I..\INCLUDE
FLAGS = -4 -k- -x- -f- -w -RT- -a2 -R- -M- -v- -I$(INCLUDE)
!ifdef DEBUG
  OBJSS = $(OBJS)
  DEFS  = -DDEBUG
!else
  DEFS  =
  OBJSS = $(OBJS)
!endif

.c.obj:
  bcc32 -c $(FLAGS) $(DEFS) {$. }

.cpp.obj:
  bcc32 -c $(FLAGS) $(DEFS) {$. }

.rc.res:
  brcc32 -r -i$(INCLUDE) $<

true-tpl.dll: $(OBJS) $(RES)
  tlink32 -n -x -OS -Tpd -aa -v- -P  @&&|
$(OBJSS)
$&
nul
$(LIBS)
,$(RES)
|
  @del *.obj > nul
  @del $(RES) > nul
  @-md TrueTPL > nul
  @echo y|del TrueTPL > nul
  @-move C:\Progra~1\Far\Plugins\Editor\TrueTPL\true-tpl.dll .\TrueTPL\true-tpl.dll
  @copy true-tpl.dll "\Program Files\Far\Plugins\Editor\TrueTPL\true-tpl.dll"
  @copy *.lng "\Program Files\Far\Plugins\Editor\TrueTPL\*.lng"
