#**************************************************************************
# PROGRAM: Sample16
# PURPOSE: A Win16 Sample Application Template Makefile
#**************************************************************************

PROJ=Sample

# This line allows NMAKE to work as well
all: $(PROJ).exe $(PROJ).hlp

# Update the resource if necessary
$(PROJ).res: $(PROJ).rc $(PROJ).dlg $(PROJ).h
    rc -r $(PROJ).rc

# Update the object file if necessary
$(PROJ).obj: $(PROJ).c $(PROJ).h
    cl -c -AS -Gsw -Oas -Zpe $(PROJ).c

# Update the executable file if necessary, and if so, add the resource back in.
$(PROJ).exe: $(PROJ).obj $(PROJ).def
    link /NOD $(PROJ),,, libw slibcew, $(PROJ).def
    rc $(PROJ).res

# If the .res file is new and the .exe file is not, update the resource.
# Note that the .rc file can be updated without having to either 
# compile or link the file.
$(PROJ).exe: $(PROJ).res
    rc $(PROJ).res

#update help file
$(PROJ).hlp: $(PROJ).rtf $(PROJ).hpj
    hc $(PROJ)
