# This line allows NMAKE to work as well

all: qry_bldr.exe

# Update the resource if necessary

qry_bldr.res: qry_bldr.rc qry_bldr.h
    rc -r qry_bldr.rc

# Update the object file if necessary

qry_bldr.obj: qry_bldr.c qry_bldr.h
    cl -c -AL -Gsw -Oas -Zpe qry_bldr.c

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

qry_bldr.exe: qry_bldr.obj qry_bldr.def
    link /NOD qry_bldr,,, libw llibcew ..\lib\qelib.lib, qry_bldr.def
    rc qry_bldr.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.

qry_bldr.exe: qry_bldr.res
    rc qry_bldr.res
