#
# Makefile.cfg for SRB2/XBOX
#

#
#hmmm, the XBOX
#

	NOHW=1    #No working OpenGL right now
	NOHS=1    #No HWSound right now
	NOASM=1   #No Fast code
	NONET=1   #No network code
	NOMD5=1   #No Slow MD5
	NOPNG=1   #No Screenshot
	#SDLMAIN=1 #SDLMain!

ifndef OPENXDK
	OPENXDK=/usr/local/openxdk
endif

	CXBE=$(OPENXDK)/bin/cxbe

ifdef ECHO
	CXBE:=@$(CXBE)
endif

ifndef NOHW
	OPTS+=-DMINI_GL_COMPATIBILITY
endif

	BUILTLM=-fno-builtin
	CFLAGS+=-D_XBOX -std=gnu99 -ffreestanding $(BUILTLM) -fno-exceptions
	CFLAGS+=-I$(OPENXDK)/i386-pc-xbox/include -I$(OPENXDK)/include
	OPTS+=-nostdlib -mno-cygwin -march=i386
	LDFLAGS+=-nostdlib -Wl,--file-alignment,0x20 -Wl,--section-alignment,0x20 -shared -Wl,--entry,_WinMainCRTStartup -Wl,--strip-all -L$(OPENXDK)/i386-pc-xbox/lib -L$(OPENXDK)/lib
	LIBS=-lg -lc -lm
	SDL_CFLAGS?=-I$(OPENXDK)/include/SDL
	SDL_LDFLAGS?=-lSDL -lopenxdk -lhal -lc -lhal -lusb -lhal -lc -lxboxkrnl

	i_system_o+=$(OBJDIR)/xboxhelp.o

	# name of the exefile
	EXENAME?=SRB2XBOX.EXE
	BINNAME?=default.xbe
