
# WinINet sample 
# either JWASM/WLINK (default) or MASM/MSLINK is to be used.

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

NAME=WinINet
DEBUG=0
OUTDIR=.

!if $(DEBUG)
LOPTD=/DEBUG:FULL
AOPTD=-Zi
!else
LOPTD=
AOPTD=
!endif

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

!if $(MSLINK)
LIBS=kernel32.lib user32.lib msvcrt.lib wininet.lib
LOPTS= /MAP /LIBPATH:..\..\Lib /SUBSYSTEM:windows /OPT:NOWIN98
LINK=@link.exe $(LOPTS) $* rsrc.res $(LIBS)
RC=@rc.exe -i..\..\Include -fo$*.res 
!else
LOPTS= LibPath ..\..\Lib op MAP, quiet, res=rsrc.res, map
LIBS=library kernel32.lib,user32.lib,msvcrt.lib,wininet.lib
LINK=@wlink.exe debug watcom format windows nt runtime windows file $(OUTDIR)\$(NAME).obj $(LOPTS) $(LIBS)
RC=@wrc -q -r -i=..\..\Include
!endif

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

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

$(OUTDIR)\rsrc.res: rsrc.rc
	$(RC) rsrc.rc

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