# Standard Windows make file.  The utility MAKE.EXE compares the
# creation date of the file to the left of the colon with the file(s)
# to the right of the colon.  If the file(s) on the right are newer
# then the file on the left, Make will execute all of the command lines
# following this line that are indented by at least one tab or space.
# Any valid MS-DOS command line may be used.

# This line allows NMAKE to work as well

all: view.exe

# Update the resource if necessary

view.res: view.rc view.h
    rc -r view.rc

# Update the object file if necessary

view.obj: view.c view.h
    cl -c -AS -Gsw -Od -Zipe -W3 view.c

convert.obj: convert.c convert.h
    cl -c -AS -Gsw -Od -Zipe -W3 convert.c

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

view.exe:: view.obj convert.obj view.def
    link /NOD/NOE/CO view convert,,, libw slibcew penwin, view.def
    rc view.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.

view.exe:: view.res
    rc view.res
