# This is the makefile for Win32 to build pdpclib using
# Open Watcom

CC=wcl386
CFLAGS=-oneatx
COPTS=-c -ecc $(CFLAGS) -zl -fpi87 -q -D__WIN32__ -D__STATIC__ -I. -I..\src

all: clean pdptest.exe

pdptest.exe: p32start.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 __memmgr.obj fpfuncsw.obj winsupa.obj
  wlink File p32start.obj,pdptest.obj Name pdptest.exe Form windows nt Runtime con Library watcomw.lib,../src/kernel32.lib Option quiet,start=_mainCRTStartup

.c.obj:
  $(CC) $(COPTS) $<
  wlib -b -q watcomw.lib +$@

.asm.obj:
  wasm -q -zcm -DWATCOM $<
#  as86 -f coff -o $@ $<
#  ml -nologo -c $<
  wlib -b -q watcomw.lib +$@

clean:
  rm -f *.obj
  rm -f pdptest.exe
  rm -f watcomw.lib
