
# simple Win32 console "hello world" sample.
# either JWASM and WLINK (default)
# or MASM and MS LINK
# can be used and must be found in a directory included in PATH.

# to create the binary with JWASM/WLINK, just enter NMAKE
# to create the binary with MASM/MS LINK, enter NMAKE MASM=1

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

NAME=WinCon1
OUTDIR=.

AOPT=-c -win64 -Zp8 -nologo -Fl$* -Sg -Fo$* -I..\..\Include $(AOPTD)
ASM= jwasm.exe $(AOPT)

LOPTS=/NOLOGO /MAP /LibPath:..\..\Lib64 /SUBSYSTEM:CONSOLE /FIXED:NO /OPT:NOWIN98
LIBS=kernel32.lib user32.lib
LINK=link.exe $*.obj $(LOPTS) $(LIBS)


$(OUTDIR)\$(NAME).exe: $(OUTDIR)\$(NAME).obj makefile
	@$(LINK)

$(OUTDIR)\$(NAME).obj: $(NAME).asm makefile
	@$(ASM) $(NAME).asm

clean:
	@erase *.obj
	@erase *.lst
	@erase *.map
