
# Makefile for NMAKE. Tools to be used:
# either JWASM, WRC and WLINK (default)
# or      MASM, MS RC and MS LINK.
# the tools must be found somewhere in PATH.

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

MSLINK=1

NAME=WinGUI1
DEBUG=0
OUTDIR=.

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

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

LOPT=/LibPath:..\..\Lib64 /MAP:$*.map /SUBSYSTEM:WINDOWS $(LOPTD) /OPT:NOWIN98
LIBS=kernel32.lib user32.lib
LINK=link.exe $(LOPT) /OUT:$*.exe $*.obj rsrc.res $(LIBS) 
RC=rc.exe /i..\..\Include

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

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

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

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

