ms = \msvc

.SUFFIXES:
.SUFFIXES: .obj .idd .c .asm

ac = asm -q -coff -Zi -DDEBUG -I$(inc)
cc = cl /c /nologo -Gz /Zi -I$(inc)
lc = link /debug /nologo /map
!ifdef dll
ex = dll
lf = /dll
c0 = $(lib)\dllc
!else
ex = exe
c0 = $(lib)\c0
!endif
cx = $(lib)\cf
!ifndef objs
objs=$(name).obj
!endif

$(bin)\$(name).$(ex): $(objs)
 $(lc) $(lf) @<<
/out:$(bin)\$(name).$(ex)
/libpath:$(ms)\lib
/subsystem:console
$(c0).obj
$(objs)
$(cx).lib
<<
 del *.obj

.idd.obj:
 iddc -mf $*.idd
.asm.obj:
 $(ac) $*.asm
.c.obj:
 $(cc) $*.c
