NODEBUG=
!include <ntwin32.mak>

PROGRAM = maze

!ifndef PROCESSOR_ARCHITECTURE
!error Cannot determine CPU type - please set environment variable PROCESSOR_ARCHITECTURE to x86, ALPHA, or MIPS
!endif

!ifndef EXCURSIONSDK
!error Please set environment variable EXCURSIONSDK to point to the XSDK area
!endif

TOPDIR = $(EXCURSIONSDK)
OBJS = maze.obj getopt.obj

LIBDIR = $(PROCESSOR_ARCHITECTURE)

DXLIBS = $(EXCURSIONSDK)\lib\$(LIBDIR)\X11.lib

MSVCFLAGS = -NODEFAULTLIB:libc.lib

MYFLAGS = $(cflags) $(cdebug) $(cvarsdll) -W0 -D__STDC__ \
    -I$(EXCURSIONSDK)\include\DXm -I$(EXCURSIONSDK)\include\Mrm -I$(EXCURSIONSDK)\include\Xm \
    -I$(EXCURSIONSDK)\include\uil -I$(EXCURSIONSDK)\include\X11 -I$(EXCURSIONSDK)\include

all:: $(PROGRAM).exe

$(OBJS): ..\$*.c
    $(cc)  $(MYFLAGS)  ..\$*.c -Fo$*.obj

$(PROGRAM).res: ..\$(PROGRAM).rc
    $(rc) $(rcvars) -r -fo $(PROGRAM).res $(cvarsdll) ..\$(PROGRAM).rc

$(PROGRAM).exe: $(OBJS) $(PROGRAM).res
    $(link) \
    $(MSVCFLAGS) \
    $(ldebug) \
    $(OBJS) $(PROGRAM).res \
    $(guilflags) $(guilibsdll) $(DXLIBS) -subsystem:windows -entry:mainCRTStartup \
    -out:$*.exe

