# Update the resource if necessary

demo8.res: demo8.rc demo8.h
    rc -r demo8.rc

# Update the object file if necessary

demo8.obj: demo8.c demo8.h
    cl -Zi -c -AS -Gsw -Oas -Zpe demo8.c

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

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

demo8.exe: demo8.res
    rc demo8.res


