#
NAME	= modeless
SRCS	= $(NAME).c

LINK32_FLAGS=winmm.lib\
 kernel32.lib user32.lib gdi32.lib\
 winspool.lib\
 comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo\
 /subsystem:windows /incremental:no /machine:I386 /out:$(NAME).exe

INCLS	= $(NAME).h

RCFILES = $(NAME).rc

DEBUG	= 0
##### Build Option Macros #####
!if $(DEBUG)
DDEF	= -DDEBUG
CLOPT	= -Zid -Od
MOPT	= -Zi
LOPT	=
!else
DDEF	=
CLOPT	= -Od
LOPT	=
!endif

##### Tool Macros #####
ASM	= masm -Mx $(MOPT) $(DDEF) $(DEF)
CC	= cl -nologo -c -W3 $(CLOPT) $(DDEF) $(DEF)
LINK	= link $(LINK32_FLAGS)
RC	= rc $(DDEF) $(DEF)
HC	= hc

.c.obj:
    $(CC) $*.c

.asm.obj:
    $(ASM) $*.asm;

.rc.res:
    $(RC) -r $*.rc

goal: $(NAME).exe

$(NAME).exe: $(SRCS:.c=.obj) $(NAME).res
    $(LINK) $(NAME).res @<<
    $(SRCS:.c=.obj) $(OBJS)
<<

##### Dependents #####
$(SRCS:.c=.obj):
$(NAME).res: $(RCFILES)

##### Clean Directory #####
clean:
    -del *.obj
    -del *.res
    -del *.exe
    -del *.map
    -del *.sym
