
# creates DSOUND2.EXE

name = DSOUND2

DEBUG=0
OUTDIR=.

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

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

!if $(MASM)
ASM = ml -c -coff -nologo -Fl -Sg -Fo$* -I ..\..\include
!else
ASM = jwasm -c -coff -nologo -Fl -Sg -Fo$* -I ..\..\include
!endif

!if $(MSLINK)
LIBS= kernel32.lib user32.lib gdi32.lib dsound.lib
LOPT=/OUT:$*.EXE /LIBPATH:..\..\lib /SUBSYSTEM:CONSOLE $(LOPTD) /NOLOGO /MAP
LINK=link.exe $(OUTDIR)\$(name).obj $(LOPT) $(LIBS)
!else
LIBS= Library kernel32.lib, user32.lib, gdi32.lib, dsound.lib
LOPT=format windows nt LIBPATH ..\..\Lib op map, quiet
LINK=@wlink.exe $(LOPT) file $(OUTDIR)\$(name).obj $(LIBS)
!endif

$(name).exe: $*.obj
	$(LINK)

$(name).obj: $(name).asm
	$(ASM) $(name).asm

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