!include <ntwin32.mak>

all: main.exe the_dll.dll

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

the_dll.obj: the_dll.c
    $(cc) $(cdebug) $(cflags) $(cvarsdll) the_dll.c

the_dll.rbj: the_dll.rc the_dll.bmp the_dll.cur the_dll.ico
    rc -r -fo the_dll.res the_dll.rc
    cvtres -$(CPU) the_dll.res -o the_dll.rbj

the_dll.dll: the_dll.def the_dll.rbj the_dll.obj
    $(link) $(linkdebug) \
    -base:0x1C000000     \
    -dll                 \
    -entry:DLLEntryPoint$(DLLENTRY) \
    -out:the_dll.dll     \
    the_dll.rbj the_dll.obj $(guilibsdll)

main.exe: main.obj main.def
    $(cvtobj) $(cvtdebug) *.obj
    $(link) $(linkdebug) $(guiflags) -out:main.exe main.obj $(guilibsdll)
