# Update the resource if necessary

demo4.res: demo4.rc demo4.h
    rc -r demo4.rc

# Update the object file if necessary

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

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

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

demo4.exe: demo4.res
    rc demo4.res


