#=============================================================================
# makefile-header: Global definitions for non-Windows Unreal.
#
# Makefiles must define UNREAL_DIR before including makefile-header.
#=============================================================================

#-----------------------------------------------------------------------------
# Configuration.
#-----------------------------------------------------------------------------

# Specify version here.  Used for object storage directory.
VERSION				= 928

# Specify link method here.  Either [static] or [shared].
LINKSTYLE			= shared

# Target type.  Either [linux] or [freebsd] or [psx2] or [macosx]
TARGETTYPE			= linux

# Machine type.  Either [i386] or [mips-ee] or [powerpc]
MACHTYPE			= i386

# Specify build here.  Either [release] or [debug]. No trailing space allowed.
BUILD				= release

# Specify compiler here. Either [icc] or [gcc].
COMPILER			= gcc

# Specify error format here.  Either [gcc] or [visualc]
ERRORFORMAT			= gcc

# Compile in UNICODE support? Either [true] or [false].
DOUNICODE			= true

# Do case-insensitive file opens? Either [true] or [false].
NOFILECASE			= true

# Include Karma code? Either [true] or [false].
DOKARMA				= true

# Demo version? Either [true] or [false].
DEMOVERSION         = false

# These need to be set at compile time for UT2003. Set to 1 or 0.
DO_CHECK			= 1
DO_GUARD			= 1
DO_CLOCK			= 1
DO_STAT				= 1
DO_CHECK_SLOW   	= 0
DO_GUARD_SLOW   	= 0
DO_CLOCK_SLOW   	= 0
DO_STAT_SLOW   		= 0
#-----------------------------------------------------------------------------

SHELL				= /bin/sh
BUILD_SUBDIR			= $(BUILD)-$(TARGETTYPE)-$(MACHTYPE)-$(LINKSTYLE)

ifeq ($(TARGETTYPE),linux)
  ISGNU=true
endif
ifeq ($(TARGETTYPE),freebsd)
  ISGNU=true
endif
ifeq ($(TARGETTYPE),macosx)
  ISGNU=true
endif

ifneq ($(ISGNU),true)
  ISGNU=false
endif

# Release build.
ifeq ($(BUILD),release)
	ifeq ($(ISGNU),true)
		ifeq ($(COMPILER),gcc)
               	                 #-Werror -fomit-frame-pointer
			BUILD_CXXFLAGS		= -O2 -D_REENTRANT -D_NDEBUG=1
		else
			BUILD_CXXFLAGS		= -D_REENTRANT -D_NDEBUG=1
		endif
	endif
	ifeq ($(TARGETTYPE),psx2)
		BUILD_CXXFLAGS		= -O2 -fno-strict-aliasing -ffast-math -Werror -Wa,-al -fno-common -G0 -msingle-float
							# -O3 -fno-strict-aliasing -ffast-math -Werror -Wa,-al -fno-common -G0 -msingle-float
	endif
endif

# Debug build.
ifeq ($(BUILD),debug)
	ifeq ($(ISGNU),true)
		ifeq ($(COMPILER),gcc)
			BUILD_CXXFLAGS		= -O2 -D_REENTRANT -g -D_DEBUG
		else
			BUILD_CXXFLAGS		= -wr873,1125,858,69,654,161,186 -D_REENTRANT -O0 -Kc++eh -Zp4
		endif
	endif
	ifeq ($(TARGETTYPE),psx2)
		BUILD_CXXFLAGS		= -O2 -fno-strict-aliasing -ffast-math -Werror -Wa,-al -fno-common -G0 -g -msingle-float
							# -O3 -fno-strict-aliasing -ffast-math -Werror -Wa,-al -fno-common -G0 -g -msingle-float
	endif
endif

ifeq ($(TARGETTYPE),macosx)
  BUILD_CXXFLAGS += -DMACOSX=1 -pipe
endif

ifeq ($(TARGETTYPE),linux)
  BUILD_CXXFLAGS += -DLINUX=1 -pipe
endif

ifeq ($(TARGETTYPE),freebsd)
  # !!! FIXME: Karma headers need LINUX defined.
  BUILD_CXXFLAGS += -DLINUX=1 -DFREEBSD=1 -pipe
endif

# Shared build.
ifeq ($(LINKSTYLE),shared)
	STATICLINK			= 0
        ifeq ($(TARGETTYPE),macosx)
	  LIBSUFFIX			= dylib
	else
	  LIBSUFFIX			= so
	endif
endif

# Static build.
ifeq ($(LINKSTYLE),static)
	STATICLINK			= 1
	LIBSUFFIX			= a
endif

ifeq ($(DOUNICODE),true)
    UNICODE_CXXFLAGS    = -DUNICODE=1
	ifeq ($(COMPILER),icc)
        UNICODE_CXXFLAGS += -Qoption,c,-_W4
    endif
else
    UNICODE_CXXFLAGS    = -DNO_UNICODE_OS_SUPPORT=1
endif

ifeq ($(NOFILECASE),true)
    FILECASE_CXXFLAGS   = -D__FILE_NOCASE=1
endif

ifeq ($(DOKARMA),true)
    ifeq ($(TARGETTYPE),macosx)
        %error MacOS X does not have Karma libs right now.
    endif

    METOOLKIT_DIR = $(UNREAL_DIR)/metoolkit
    METOOLKIT_INC = $(METOOLKIT_DIR)/include
    ifeq ($(BUILD),debug)
      METOOLKIT_LIB = $(METOOLKIT_DIR)/lib.chk/linux_single_gcc2.95
    else
      METOOLKIT_LIB = $(METOOLKIT_DIR)/lib.rel/linux_single_gcc2.95
    endif
    KARMA_CXXFLAGS = -DWITH_KARMA=1 -I$(METOOLKIT_INC)
    KARMA_LIBS = $(wildcard $(METOOLKIT_LIB)/*.a)
endif

ifeq ($(DEMOVERSION),true)
    BUILD_CXXFLAGS += -DDEMOVERSION=1
endif

DO_CXXFLAGS = -DDO_CHECK=$(DO_CHECK) -DDO_CHECK_SLOW=$(DO_CHECK_SLOW) \
              -DDO_GUARD=$(DO_GUARD) -DDO_GUARD_SLOW=$(DO_GUARD_SLOW) \
              -DDO_CLOCK=$(DO_CLOCK) -DDO_CLOCK_SLOW=$(DO_CLOCK_SLOW) \
              -DDO_STAT=$(DO_STAT) -DDO_STAT_SLOW=$(DO_STAT_SLOW)

#-----------------------------------------------------------------------------
# Directories.
#-----------------------------------------------------------------------------

# Output.
OUTPUT_DIR			= $(UNREAL_DIR)/System

# PSX2 support directories.
PSX2_LIB			= $(PSX2ROOT)/ee/lib
PSX2_INC			= $(PSX2ROOT)/ee/include
PSX2_COMMON_INC			= $(PSX2ROOT)/common/include

# Core directories.
CORE_SRC			= $(UNREAL_DIR)/Core/Src
CORE_INC			= $(UNREAL_DIR)/Core/Inc
CORE_BUILD			= $(UNREAL_DIR)/Core/$(BUILD_SUBDIR)

# Engine directories.
ENGINE_SRC			= $(UNREAL_DIR)/Engine/Src
ENGINE_INC			= $(UNREAL_DIR)/Engine/Inc
ENGINE_BUILD			= $(UNREAL_DIR)/Engine/$(BUILD_SUBDIR)

# IpDrv directories.
IPDRV_SRC			= $(UNREAL_DIR)/IpDrv/Src
IPDRV_INC			= $(UNREAL_DIR)/IpDrv/Inc
IPDRV_BUILD			= $(UNREAL_DIR)/IpDrv/$(BUILD_SUBDIR)

# Fire directories.
FIRE_SRC			= $(UNREAL_DIR)/Fire/Src
FIRE_INC			= $(UNREAL_DIR)/Fire/Inc
FIRE_BUILD			= $(UNREAL_DIR)/Fire/$(BUILD_SUBDIR)

# ALAudio directories.
ALAUDIO_SRC			= $(UNREAL_DIR)/ALAudio/Src
ALAUDIO_INC			= $(UNREAL_DIR)/ALAudio/Inc
ALAUDIO_BUILD			= $(UNREAL_DIR)/ALAudio/$(BUILD_SUBDIR)

# !!! FIXME: do something with this?
OPENGLLNX_INC		= $(UNREAL_DIR)/OpenGLDrv/Inc/linuxGL
OPENAL_INC			= $(UNREAL_DIR)/OpenAL/Inc
SDL12_INC 			= $(UNREAL_DIR)/SDL12/include
SDL12_LIBS			= $(UNREAL_DIR)/System/libSDL-1.2.so.0

# Editor directories.
EDITOR_SRC			= $(UNREAL_DIR)/Editor/Src
EDITOR_INC			= $(UNREAL_DIR)/Editor/Inc
EDITOR_BUILD			= $(UNREAL_DIR)/Editor/$(BUILD_SUBDIR)

# UCC directories.
UCC_SRC				= $(UNREAL_DIR)/UCC/Src
UCC_INC				= $(UNREAL_DIR)/UCC/Inc
UCC_BUILD			= $(UNREAL_DIR)/UCC/$(BUILD_SUBDIR)

# XLaunch directories.
XLAUNCH_SRC			= $(UNREAL_DIR)/XLaunch/Src
XLAUNCH_INC			= $(UNREAL_DIR)/XLaunch/Inc
XLAUNCH_BUILD			= $(UNREAL_DIR)/XLaunch/$(BUILD_SUBDIR)

# PSX2Launch directories.
PSX2LAUNCH_SRC			= $(UNREAL_DIR)/PSX2Launch/Src
PSX2LAUNCH_INC			= $(UNREAL_DIR)/PSX2Launch/Inc
PSX2LAUNCH_BUILD		= $(UNREAL_DIR)/PSX2Launch/$(BUILD_SUBDIR)

# SDLLaunch directories.
SDLLAUNCH_SRC			= $(UNREAL_DIR)/SDLLaunch/Src
SDLLAUNCH_INC			= $(UNREAL_DIR)/SDLLaunch/Inc
SDLLAUNCH_BUILD			= $(UNREAL_DIR)/SDLLaunch/$(BUILD_SUBDIR)

# OpenGLDrv directories.
OPENGLDRV_SRC			= $(UNREAL_DIR)/OpenGLDrv/Src
OPENGLDRV_INC			= $(UNREAL_DIR)/OpenGLDrv/Inc
OPENGLDRV_BUILD			= $(UNREAL_DIR)/OpenGLDrv/$(BUILD_SUBDIR)

# Render directories.
RENDER_SRC			= $(UNREAL_DIR)/Render/Src
RENDER_INC			= $(UNREAL_DIR)/Render/Inc
RENDER_BUILD			= $(UNREAL_DIR)/Render/$(BUILD_SUBDIR)

# OpenGLDrv directories.
OPENGLDRV_SRC			= $(UNREAL_DIR)/OpenGLDrv/Src
OPENGLDRV_INC			= $(UNREAL_DIR)/OpenGLDrv/Inc
OPENGLDRV_BUILD			= $(UNREAL_DIR)/OpenGLDrv/$(BUILD_SUBDIR)

# XMesaGLDrv directories.
XMESAGLDRV_SRC			= $(UNREAL_DIR)/XMesaGLDrv/Src
XMESAGLDRV_INC			= $(UNREAL_DIR)/XMesaGLDrv/Inc
XMESAGLDRV_BUILD		= $(UNREAL_DIR)/XMesaGLDrv/$(BUILD_SUBDIR)

# XDrv directories.
XDRV_SRC			= $(UNREAL_DIR)/XDrv/Src
XDRV_INC			= $(UNREAL_DIR)/XDrv/Inc
XDRV_BUILD			= $(UNREAL_DIR)/XDrv/$(BUILD_SUBDIR)

# PSX2Drv directories.
PSX2DRV_SRC			= $(UNREAL_DIR)/PSX2Drv/Src
PSX2DRV_INC			= $(UNREAL_DIR)/PSX2Drv/Inc
PSX2DRV_IOPMODULE		= $(UNREAL_DIR)/PSX2Drv/IOPModule
PSX2DRV_BUILD			= $(UNREAL_DIR)/PSX2Drv/$(BUILD_SUBDIR)

# PSX2NetDrv directories.
PSX2NETDRV_SRC			= $(UNREAL_DIR)/PSX2NetDrv/Src
PSX2NETDRV_INC			= $(UNREAL_DIR)/PSX2NetDrv/Inc
PSX2NETDRV_BUILD		= $(UNREAL_DIR)/PSX2NetDrv/$(BUILD_SUBDIR)

# GlideDrv directories.
GLIDEDRV_SRC			= $(UNREAL_DIR)/GlideDrv/Src
GLIDEDRV_INC			= $(UNREAL_DIR)/GlideDrv/Inc
GLIDEDRV_BUILD			= $(UNREAL_DIR)/GlideDrv/$(BUILD_SUBDIR)

# Unreal audio subsystem directories.
AUDIO_SRC			= $(UNREAL_DIR)/Audio/Src
AUDIO_INC			= $(UNREAL_DIR)/Audio/Inc
AUDIO_BUILD			= $(UNREAL_DIR)/Audio/$(BUILD_SUBDIR)

# UWeb
UWEB_SRC			= $(UNREAL_DIR)/UWeb/Src
UWEB_INC			= $(UNREAL_DIR)/UWeb/Inc
UWEB_BUILD			= $(UNREAL_DIR)/UWeb/$(BUILD_SUBDIR)

# PSX Render
PSX2RENDER_SRC			= $(UNREAL_DIR)/PSX2Render/Src
PSX2RENDER_INC			= $(UNREAL_DIR)/PSX2Render/Src
PSX2RENDER_BUILD		= $(UNREAL_DIR)/PSX2Render/$(BUILD_SUBDIR)

# PSX Audio
PSX2AUDIO_SRC			= $(UNREAL_DIR)/PSX2Audio/Src
PSX2AUDIO_INC			= $(UNREAL_DIR)/PSX2Audio/Inc
PSX2AUDIO_IOPMODULE		= $(UNREAL_DIR)/PSX2Audio/IOPModule
PSX2AUDIO_BUILD			= $(UNREAL_DIR)/PSX2Audio/$(BUILD_SUBDIR)

# PSX iLink Network Driver
PSX2ILINKDRV_SRC		= $(UNREAL_DIR)/PSX2iLinkDrv/Src
PSX2ILINKDRV_INC		= $(UNREAL_DIR)/PSX2iLinkDrv/Inc
PSX2ILINKDRV_IOPMODULE		= $(UNREAL_DIR)/PSX2iLinkDrv/IOPModule
PSX2ILINKDRV_BUILD		= $(UNREAL_DIR)/PSX2iLinkDrv/$(BUILD_SUBDIR)

# XGame directories.
XGAME_SRC			= $(UNREAL_DIR)/XGame/Src
XGAME_INC			= $(UNREAL_DIR)/XGame/Inc
XGAME_BUILD			= $(UNREAL_DIR)/XGame/$(BUILD_SUBDIR)

# XInterface directories.
XINTERFACE_SRC		= $(UNREAL_DIR)/XInterface/Src
XINTERFACE_INC		= $(UNREAL_DIR)/XInterface/Inc
XINTERFACE_BUILD	= $(UNREAL_DIR)/XInterface/$(BUILD_SUBDIR)

# zlib directories.
ZLIB_SRC			= $(UNREAL_DIR)/zlib/
ZLIB_INC			= $(UNREAL_DIR)/zlib/
ZLIB_BUILD			= $(UNREAL_DIR)/zlib/$(BUILD_SUBDIR)

# ogg directories.
OGG_SRC				= $(UNREAL_DIR)/Vorbis/ogg/src
OGG_INC				= $(UNREAL_DIR)/Vorbis/ogg/include
OGG_BUILD			= $(UNREAL_DIR)/Vorbis/ogg/$(BUILD_SUBDIR)

# vorbis directories.
VORBIS_SRC			= $(UNREAL_DIR)/Vorbis/vorbis/lib
VORBIS_INC			= $(UNREAL_DIR)/Vorbis/vorbis/include
VORBIS_BUILD		= $(UNREAL_DIR)/Vorbis/vorbis/$(BUILD_SUBDIR)

# SDLDrv directories.
SDLDRV_SRC			= $(UNREAL_DIR)/SDLDrv/Src
SDLDRV_INC			= $(UNREAL_DIR)/SDLDrv/Inc
SDLDRV_BUILD		= $(UNREAL_DIR)/SDLDrv/$(BUILD_SUBDIR)

# Source directories.
ALL_SRC_DIRS			= $(CORE_INC) $(CORE_SRC) \
					  $(ENGINE_INC) $(ENGINE_SRC) \
					  $(IPDRV_INC) $(IPDRV_SRC) \
					  $(FIRE_INC) $(FIRE_SRC) \
					  $(ALAUDIO_INC) $(ALAUDIO_SRC) \
					  $(UCC_INC) $(UCC_SRC) \
					  $(RENDER_INC) $(RENDER_SRC) \
					  $(EDITOR_SRC) $(EDITOR_INC) \
					  $(OPENGLDRV_SRC) $(OPENGLDRV_INC) \
					  $(XMESAGLDRV_SRC) $(XMESAGLDRV_INC) \
					  $(GLIDEDRV_SRC) $(GLIDEDRV_INC) \
					  $(XDRV_SRC) $(XDRV_INC) \
					  $(XLAUNCH_SRC) $(XLAUNCH_INC) \
					  $(AUDIO_SRC) $(AUDIO_INC) \
					  $(UWEB_SRC) $(UWEB_INC) \
					  $(XGAME_INC) $(XGAME_SRC) \
					  $(OPENGLDRV_INC) $(OPENGLDRV_SRC) \
					  $(SDLDRV_INC) $(SDLDRV_SRC) \
					  $(SDLLAUNCH_INC) $(SDLLAUNCH_SRC) \
					  $(XINTERFACE_INC) $(XINTERFACE_SRC) \
					  $(ZLIB_INC) $(ZLIB_SRC) \
					  $(OGG_INC) $(OGG_SRC) \
					  $(VORBIS_INC) $(VORBIS_SRC) \


#-----------------------------------------------------------------------------
# Output files.
#-----------------------------------------------------------------------------

# Core library
CORE				= $(OUTPUT_DIR)/Core.$(LIBSUFFIX)
CORE_SONAME			= Core.so

# Engine library
ENGINE				= $(OUTPUT_DIR)/Engine.$(LIBSUFFIX)
ENGINE_SONAME			= Engine.so

# IpDrv library
IPDRV				= $(OUTPUT_DIR)/IpDrv.$(LIBSUFFIX)
IPDRV_SONAME			= IpDrv.so

# Fire library
FIRE				= $(OUTPUT_DIR)/Fire.$(LIBSUFFIX)
FIRE_SONAME			= Fire.so

# ALAudio library
ALAUDIO				= $(OUTPUT_DIR)/ALAudio.$(LIBSUFFIX)
ALAUDIO_SONAME			= ALAudio.so

# Editor library
EDITOR				= $(OUTPUT_DIR)/Editor.$(LIBSUFFIX)
EDITOR_SONAME			= Editor.so

# UCC executable
UCC				= $(OUTPUT_DIR)/ucc-bin$(STD_RUNEXT)

# XLaunch executable
XLAUNCH				= $(OUTPUT_DIR)/ut2003-bin$(STD_RUNEXT)

# SDLLaunch executable
SDLLAUNCH				= $(OUTPUT_DIR)/ut2003-bin$(STD_RUNEXT)

# Playstation executable
PSX2LAUNCH			= $(OUTPUT_DIR)/psx2game$(STD_RUNEXT)

# XGame library
XGAME   			= $(OUTPUT_DIR)/XGame.$(LIBSUFFIX)
XGAME_SONAME		= XGame.so

# XInterface library
XINTERFACE   			= $(OUTPUT_DIR)/XInterface.$(LIBSUFFIX)
XINTERFACE_SONAME		= XInterface.so

# zlib library
ZLIB		= $(OUTPUT_DIR)/zlib.$(LIBSUFFIX)
ZLIB_SONAME		= zlib.so

# ogg library
OGG		= $(OUTPUT_DIR)/ogg.$(LIBSUFFIX)
OGG_SONAME		= ogg.so

# ogg library
VORBIS		= $(OUTPUT_DIR)/vorbis.$(LIBSUFFIX)
VORBIS_SONAME		= vorbis.so

# SDLDrv library
SDLDRV   			= $(OUTPUT_DIR)/SDLDrv.$(LIBSUFFIX)
SDLDRV_SONAME		= SDLDrv.so

# OpenGLDrv library
OPENGLDRV   			= $(OUTPUT_DIR)/OpenGLDrv.$(LIBSUFFIX)
OPENGLDRV_SONAME		= OpenGLDrv.so

# Render library
RENDER				= $(OUTPUT_DIR)/Render.$(LIBSUFFIX)
RENDER_SONAME			= Render.so

# OpenGLDv library
OPENGLDRV			= $(OUTPUT_DIR)/OpenGLDrv.$(LIBSUFFIX)
OPENGLDRV_SONAME		= OpenGLDrv.so

# XMesaGLDrv library
XMESAGLDRV			= $(OUTPUT_DIR)/XMesaGLDrv.$(LIBSUFFIX)
XMESAGLDRV_SONAME		= XMesaGLDrv.so

# XDrv library
XDRV				= $(OUTPUT_DIR)/XDrv.$(LIBSUFFIX)
XDRV_SONAME			= XDrv.so

# GlideDrv library
GLIDEDRV			= $(OUTPUT_DIR)/GlideDrv.$(LIBSUFFIX)
GLIDEDRV_SONAME			= GlideDrv.so

# Audio library
AUDIO				= $(OUTPUT_DIR)/Audio.$(LIBSUFFIX)
AUDIO_SONAME			= Audio.so

# UWeb library
UWEB				= $(OUTPUT_DIR)/UWeb.$(LIBSUFFIX)
UWEB_SONAME			= UWeb.so

# PSX2Drv library
PSX2DRV				= $(OUTPUT_DIR)/PSX2Drv.$(LIBSUFFIX)
PSX2DRV_SONAME			= PSX2Drv.so

# PSX2NetDrv library
PSX2NETDRV			= $(OUTPUT_DIR)/PSX2NetDrv.$(LIBSUFFIX)
PSX2NETDRV_SONAME		= PSX2NetDrv.so

# PSX2Render library
PSX2RENDER			= $(OUTPUT_DIR)/PSX2Render.$(LIBSUFFIX)
PSX2RENDER_SONAME		= PSX2Render.so

# PSX2Audio library
PSX2AUDIO			= $(OUTPUT_DIR)/PSX2Audio.$(LIBSUFFIX)
PSX2AUDIO_SONAME		= PSX2Audio.so

# PSX2iLinkDrv library
PSX2ILINKDRV			= $(OUTPUT_DIR)/PSX2iLinkDrv.$(LIBSUFFIX)
PSX2ILINKDRV_SONAME		= psx2iLinkDrv.so

#-----------------------------------------------------------------------------
# Standard compiler/linker options.
#-----------------------------------------------------------------------------

ifeq ($(LINKSTYLE),shared)
  ifeq ($(TARGETTYPE),linux)
    ifeq ($(COMPILER),gcc)
       EXT_LDFLAGS		= -shared -Wl,-soname,
       EXT_CXXFLAGS		= -fPIC
    else
       EXT_LDFLAGS		= -shared -Qoption,link,-soname,
       EXT_CXXFLAGS		= -KPIC
    endif
  endif
  ifeq ($(TARGETTYPE),macosx)
    EXT_LDFLAGS = -fno-common -dynamiclib
    EXT_CXXFLAGS = -fPIC
  endif
  ifeq ($(TARGETTYPE),freebsd)
    EXT_LDFLAGS	= -shared -Wl,-soname,
    EXT_CXXFLAGS = -fPIC
  endif
endif

ifeq ($(ISGNU),true)
STD_CXX			= $(COMPILER)
STD_CXXFLAGS	= $(BUILD_CXXFLAGS) $(UNICODE_CXXFLAGS) $(FILECASE_CXXFLAGS) \
				  $(KARMA_CXXFLAGS) $(DO_CXXFLAGS) \
				  -D__STATIC_LINK=$(STATICLINK)
endif

ifeq ($(ISGNU),true)
  ifeq ($(TARGETTYPE),linux)
    ifeq ($(MACHTYPE),i386)
      STD_CXXFLAGS += -D__LINUX_X86__
    endif

    ifeq ($(COMPILER),gcc)
      STD_LDFLAGS		= -Wl,-rpath,.
    else
      STD_LDFLAGS		= -Qoption,link,-rpath,.
    endif
    STD_LIBS		= -lm -ldl -lnsl -lpthread
  endif
  
  ifeq ($(TARGETTYPE),freebsd)
    STD_LDFLAGS = -Wl,-rpath,.
    STD_LIBS		= -lm -pthread
  endif

  STD_AR			= ar
  STD_RUNEXT      	=
endif

ifeq ($(TARGETTYPE),psx2)
PSX2ROOT        	= /usr/local/sce
STD_CXX			= ee-gcc
STD_AS			= $(STD_CXX)
STD_CXXFLAGS		= $(BUILD_CXXFLAGS) $(UNICODE_CXXFLAGS) \
				  -fno-for-scope \
				  -D__PSX2_EE__ -D__STATIC_LINK=$(STATICLINK) -DDO_GUARD=0 -DDO_CHECK=0 \
		  		  -I$(PSX2ROOT)/ee/gcc/include/g++-2 \
		  		  -I$(PSX2ROOT)/ee/include \
				  -I$(PSX2ROOT)/common/include \
				  -I$(UNREAL_DIR)
STD_ASFLAGS		= -c -xassembler-with-cpp -Wal,-al
STD_DVPASM		= ee-dvp-as
STD_DVPASMFLAGS	= -g -I$(PSX2ROOT)/ee/include
STD_LDFLAGS		= -nostartfiles -L$(PSX2_LIB)
STD_LIBS		=
STD_OBJDUMP		= ee-objdump
RUN				= dsedb -r run
STRIP   	        = ee-strip
STD_AR			= ee-ar
STD_RUNEXT      	= .elf
LCFILE			= $(UNREAL_DIR)/PSX2Launch/Src/app.cmd
VCL				= vcl
VCLOPT			= -t1
GASP			= gasp

endif


#-----------------------------------------------------------------------------
# The End.
#-----------------------------------------------------------------------------
