#
#   Makefile
#

APP = FADE
OBJ = $(APP).obj mainwnd.obj about.obj file.obj palfade.obj dib.obj errors.obj cutcolor.obj options.obj

!IFDEF DBG

# Debugging build
CC  = cl -c -AM -Gsw -nologo -Od -W3 -Zipe -DSTRICT
LN  = link /m/CO/NOD/NOE/NOL/AL:16

!ELSE

# Non-Debugging build
CC  = cl -c -AM -Gsw -nologo -Os -W3 -Zpe -DSTRICT
LN  = link /NOD/NOE/NOL/AL:16

!ENDIF

# Rules
.c.obj:
    @echo Compiling: $*.c
    $(CC) -NT $* $*.c >$*.err
    @type $*.err
    @del $*.err

$(APP).exe: $(OBJ) $(APP).res $(APP).def
    @echo Linking: $(APP).exe
    $(LN) @<<ln.lrf
$(OBJ)
$(APP).exe
NUL
commdlg mlibcew libw
$(APP).def
<<
    @echo Adding Resources: $(APP).res
    rc -v $(APP).res $(APP).exe

$(APP).res: $(APP).rc global.h $(APP).ico file.h options.h
    @echo Compiling Resources: $(APP).rc
    rc -r $(APP).rc

# Dependencies
$(APP).obj    : $(APP).c mainwnd.h global.h
mainwnd.obj   : mainwnd.c mainwnd.h about.h global.h palfade.h file.h options.h
about.obj     : about.c about.h
file.obj      : file.c file.h global.h dib.h
palfade.obj   : palfade.c palfade.h global.h options.h
dib.obj       : dib.c dib.h file.h options.h
errors.obj    : errors.c errors.h
cutcolor.obj  : cutcolor.c cutcolor.h
options.obj   : options.c options.h
