# makefile for ZRDX 0.42 (C) 1998, Sergey Belyakov
# You must build this project with Borland C 3.1 and Microsoft linker(5.31, for example)
# define "P" to make packed version

binder\zrxbind.exe: binder\bnd.asm stub0.asb
  tasm binder\bnd.asm /m
  tlink bnd.obj, binder\zrxbind.exe

stub0.asb: zrdx.exe bin2asm.exe
  bin2asm.exe zrdx.exe stub0.asb

bin2asm.exe: bin2asm.cpp
  #set lib=%WATCOM@%\lib286
  #set include=%WATCOM%\h
  bcc bin2asm.cpp

aligner.exe: aligner\aligner.cpp
  bcc aligner\aligner.cpp

zrdx.exe: zrdx0.exe aligner.exe
  copy zrdx0.exe zrdx.exe
!ifdef P
  lzexe zrdx.exe
  aligner zrdx.exe 12640
!else
  aligner zrdx.exe 16384
!endif

zrdx0.exe: zrdx.obj
  link.exe zrdx, zrdx0, zrdx;

zrdx.obj: prot.inc segdefs.asm autolbl.inc protdata.asm closerec.asm \
          zrdx.asm prothand.asm realhand.asm gmacros.asm dpmifunc.asm \
          vcpiemu.asm mem.asm protinit.asm realinit.asm loader.asm \
          extender.asm
  tasmx zrdx.asm /m/l
