# Nmake macros for building Windows 32-Bit apps

!include <ntwin32.mak>

TARGETNAME =    txtout32

all: $(TARGETNAME).dll

OBJS=           txtout.obj drvproc.obj

OTHERCLOPTS=-nologo -I.
OTHERRCOPTS=-DWIN32_LEAN_AND_MEAN -I.


# Update the resource if necessary

txtout.res: txtout.rc txtout.h txtout.rcv
    $(rc) -r -DWIN32 $(OTHERRCOPTS) txtout.rc


# Update the object files if necessary

drvproc.obj: drvproc.c txtout.h
    $(cc) $(cdebug) $(cflags) $(cvarsdll) $(OTHERCLOPTS) drvproc.c

txtout.obj: txtout.c txtout.h
    $(cc) $(cdebug) $(cflags) $(cvarsdll) $(OTHERCLOPTS) txtout.c


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

$(TARGETNAME).dll:    $(OBJS) txtout.res
    $(implib) -out:$(@B).lib -def:$(TARGETNAME).def $(OBJS)
    $(link) $(linkdebug) $(dllflags) -out:$@ \
          $(@B).exp $(OBJS) txtout.res $(guilibsdll) winmm.lib
