# Update the resource if necessary

demo2.res: demo2.rc demo2.h
    rc -r demo2.rc

# Update the object file if necessary

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

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

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

demo2.exe: demo2.res
    rc demo2.res


