setlocal
if not "%1" == "" goto NMAKEBUILD
set OBJDIR=.\%PROCESSOR_ARCHITECTURE%\
if "%EXCURSIONSDK%" == "" set EXCURSIONSDK=..\..
set INCLUDE=%INCLUDE%;%EXCURSIONSDK%\lib\X11\config;%EXCURSIONSDK%\include
call %EXCURSIONSDK%\bin\xmkmf
nmake all
goto EXIT

:NMAKEBUILD

if "%EXCURSIONSDK%" == "" set EXCURSIONSDK=..\..\..
set INCLUDE=%INCLUDE%;%EXCURSIONSDK%\lib\X11\config;%EXCURSIONSDK%\include
if NOT EXIST %PROCESSOR_ARCHITECTURE% mkdir %PROCESSOR_ARCHITECTURE%
cd %PROCESSOR_ARCHITECTURE%
copy ..\*.uil
nmake -f ..\makefile%1

:EXIT
endlocal

