
# either JWASM/WLINK (default) or MASM/MSLINK is used

NAME=DDraw1

OUTDIR=.

!ifndef MASM
MASM=0
MSLINK=0
!else
MSLINK=1
!endif

ASMOPT=-c -coff -nologo -Fl -I..\..\Include
!if $(MASM)
ASM=ml.exe $(ASMOPT)
!else
ASM=jwasm.exe $(ASMOPT)
!endif

!if $(MSLINK)
LIBS=kernel32.lib user32.lib gdi32.lib ddraw.lib
LOPTS= /OPT:NOWIN98 /MAP /LIBPATH:..\..\Lib /SUBSYSTEM:windows /FIXED:NO
LINK=@link.exe $(LOPTS) $* /ENTRY:start $(LIBS)
!else
LIBS=Library kernel32.lib, user32.lib, ddraw.lib
LOPTS=format windows nt runtime windows op MAP,quiet LIBPATH ..\..\Lib 
LINK=@wlink.exe debug watcom $(LOPTS) file $(OUTDIR)\$(NAME).obj  $(LIBS)
!endif

$(OUTDIR)\$(NAME).exe: $*.obj
	$(LINK)

$(OUTDIR)\$(NAME).obj: $(NAME).asm Makefile
	$(ASM) -Fo$(OUTDIR)\$(NAME).obj $(NAME).asm

CLEAN :
	-@erase "$(OUTDIR)\$(NAME).obj"
	-@erase "$(OUTDIR)\$(NAME).lst"
	-@erase "$(OUTDIR)\$(NAME).map"
