# Update the resource if necessary

demo3.res: demo3.rc demo3.h
    rc -r demo3.rc

# Update the object file if necessary

demo3.obj: demo3.c demo3.h
    cl -c -AS -Gsw -Oas -Zpe demo3.c

# Update the executable file if necessary, and if so, add the resource back in.

demo3.exe: demo3.obj demo3.def
    link /NOD demo3,,, libw slibcew, demo3.def
    rc demo3.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.

demo3.exe: demo3.res
    rc demo3.res


