
!include <ntwin32.mak>

my_lib = advapi32.lib olesvr32.lib

all: srvrdemo.exe

# Update the resource if necessary

srvrdemo.res: srvrdemo.rc
    $(rc) $(rcvars) -r srvrdemo.rc

# Update the object file if necessary

srvrdemo.obj:  srvrdemo.c
    $(cc) $(cflags) $(cvars) $(cdebug) srvrdemo.c

doc.obj:   doc.c
    $(cc) $(cflags) $(cvars) $(cdebug) doc.c

obj.obj:   obj.c
    $(cc) $(cflags) $(cvars) $(cdebug) obj.c

file.obj:   file.c
    $(cc) $(cflags) $(cvars) $(cdebug) file.c

server.obj: server.c
    $(cc) $(cflags) $(cvars) $(cdebug) server.c

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

srvrdemo.exe: srvrdemo.obj doc.obj obj.obj server.obj file.obj srvrdemo.res srvrdemo.def
    $(link) $(linkdebug) $(guiflags) -out:srvrdemo.exe srvrdemo.obj file.obj doc.obj obj.obj server.obj srvrdemo.res $(guilibs) $(my_lib)
