##### Module Macro #####
NAME	=  asmclock
SRCS	= $(NAME).asm
OBJS	=

##### C7 Macro #####
C7     = 1

##### Library Macro #####
LIBS	= libw slibcew commdlg
MOD	= -AS


##### DEBUG Defined #####
DEBUG	=  1

##### Build Option Macros #####
!if $(DEBUG)
DDEF	= -DDEBUG
CLOPT	= -Zid -Od
MOPT	=  /c /Cp /W2 /WX /I.\ /FRASMCLOCK.sbr /VM /nologo /FoASMCLOCK.OBJ
LOPT	=
!else
DDEF	=
CLOPT	= -Os
LOPT	=
!endif

##### General Macros #####
DEF	=

##### Tool Macros #####
ASM	= ml $(MOPT)
CC	= cl -nologo -c $(MOD) -G2sw -Zp -W3 $(CLOPT) $(DDEF) $(DEF)
LINK	= link /NOD /NOE /M $(LOPT)
RC	= rc $(DDEF) $(DEF)
HC	= hc

##### Inference Rules #####
.c.obj:
    $(CC) $*.c

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

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

##### Main (default) Target #####
goal: $(NAME).exe

##### Dependents For Goal and Command Line #####
$(NAME).exe: $(SRCS:.asm=.obj) $(NAME).def
    $(LINK) @<<
    $(SRCS:.asm=.obj) $(OBJS),
    $(NAME).exe,
    $(NAME).map,
    $(LIBS),
    $(NAME).def
<<
!if $(DEBUG)
!if !$(C7)
    cvpack -p $(NAME).exe
!endif
    mapsym $(NAME).map
!endif

##### Dependents #####
$(SRCS:.asm=.obj): $(INCLS)

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