# Produce MSDOS library suitable for use by PDOS/86
# Build with pdmake -f makefile.wco

CC=wcl
COPTS=-D__SZ4__ -oneatx -ecc -zp1 -q -w -c -I. -I..\src -mh -zl -D__MSDOS__ -DPDOS86 -DBUFSIZ=512 -DNOUNDMAIN -fpi87 -s -zdp -zu

pdptest.exe: dosstart.obj pdptest.obj stdio.obj string.obj stdlib.obj \
       start.obj time.obj errno.obj assert.obj signal.obj locale.obj \
       ctype.obj setjmp.obj math.obj pdossupc.obj dossupa.obj dossupc.obj
  if exist watcomo.lib del watcomo.lib
  wlib -b -q watcomo +stdio.obj
  wlib -b -q watcomo +string.obj
  wlib -b -q watcomo +stdlib.obj
  wlib -b -q watcomo +start.obj
  wlib -b -q watcomo +time.obj
  wlib -b -q watcomo +errno.obj
  wlib -b -q watcomo +assert.obj
  wlib -b -q watcomo +signal.obj
  wlib -b -q watcomo +locale.obj
  wlib -b -q watcomo +ctype.obj
  wlib -b -q watcomo +setjmp.obj
  wlib -b -q watcomo +math.obj
  wlib -b -q watcomo +pdossupc.obj
  wlib -b -q watcomo +dossupa.obj
  wlib -b -q watcomo +dossupc.obj
  wlib -b -q watcomo +dosstart.obj

.c.obj:
  $(CC) $(COPTS) $<

.asm.obj:
#  ml -c -D__SZ4__ -DPDOS86 -Dmemodel=huge -DWATCOMC $<
  wasm -zcm -q -DPDOS86 -DWATCOM -DWATCOMC -D__SZ4__ -Dmemodel=huge $<
