mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-11 18:50:46 +00:00
Makefile: Revamp setup of all things SDL.
Highlights: *Building with msys2 can now take advantage of sdl-config and sdl2-config if present. *Add a header check to error out if SDL_mixer's major version does not match SDL. *Building with frameworks on OS X works again. Notes: *Those cross compiling, particularly targeting Windows, may need to invoke make with SDLCONFIG='' to avoid bringing in libs and headers from the host. git-svn-id: https://svn.eduke32.com/eduke32@5778 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
6e3e490b93
commit
8ef2032035
8 changed files with 98 additions and 150 deletions
|
@ -88,7 +88,7 @@ ifeq ($(PLATFORM),DARWIN)
|
||||||
ENGINE_EDITOR_OBJS += startosx.editor
|
ENGINE_EDITOR_OBJS += startosx.editor
|
||||||
endif
|
endif
|
||||||
ifeq ($(SDL_TARGET),1)
|
ifeq ($(SDL_TARGET),1)
|
||||||
ifeq (1,$(SDL_FRAMEWORK))
|
ifneq ($(SDL_FRAMEWORK),0)
|
||||||
ENGINE_OBJS+=SDLMain
|
ENGINE_OBJS+=SDLMain
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
@ -805,7 +805,7 @@ getdxdidf$(EXESUFFIX): $(ENGINE_OBJ)/getdxdidf.$o
|
||||||
$(RECIPE_IF) $(LINKER) -o $@ $^ $(COMMONFLAGS) $(LINKERFLAGS) $(LIBDIRS) $(LIBS) -ldinput $(RECIPE_RESULT_ONESTEP)
|
$(RECIPE_IF) $(LINKER) -o $@ $^ $(COMMONFLAGS) $(LINKERFLAGS) $(LIBDIRS) $(LIBS) -ldinput $(RECIPE_RESULT_ONESTEP)
|
||||||
makesdlkeytrans$(EXESUFFIX): $(ENGINE_OBJ)/makesdlkeytrans.$o
|
makesdlkeytrans$(EXESUFFIX): $(ENGINE_OBJ)/makesdlkeytrans.$o
|
||||||
$(ONESTEP_STATUS)
|
$(ONESTEP_STATUS)
|
||||||
$(RECIPE_IF) $(LINKER) -o $@ $^ $(COMMONFLAGS) $(LINKERFLAGS) $(LIBDIRS) $(LIBS) $(SDL_INCLUDES) $(RECIPE_RESULT_ONESTEP)
|
$(RECIPE_IF) $(LINKER) -o $@ $^ $(COMMONFLAGS) $(LINKERFLAGS) $(LIBDIRS) $(LIBS) $(RECIPE_RESULT_ONESTEP)
|
||||||
arttool$(EXESUFFIX): $(ENGINE_OBJ)/arttool.$o
|
arttool$(EXESUFFIX): $(ENGINE_OBJ)/arttool.$o
|
||||||
$(ONESTEP_STATUS)
|
$(ONESTEP_STATUS)
|
||||||
$(RECIPE_IF) $(L_CXX) $(CXXONLYFLAGS) $(L_CXXONLYFLAGS) -o $@ $^ $(COMMONFLAGS) $(LINKERFLAGS) $(LIBDIRS) $(LIBS) $(STDCPPLIB) $(RECIPE_RESULT_ONESTEP)
|
$(RECIPE_IF) $(L_CXX) $(CXXONLYFLAGS) $(L_CXXONLYFLAGS) -o $@ $^ $(COMMONFLAGS) $(LINKERFLAGS) $(LIBDIRS) $(LIBS) $(STDCPPLIB) $(RECIPE_RESULT_ONESTEP)
|
||||||
|
|
|
@ -385,9 +385,6 @@ else
|
||||||
ifneq (0,$(KRANDDEBUG))
|
ifneq (0,$(KRANDDEBUG))
|
||||||
COMMONFLAGS += -fno-inline -fno-inline-functions -fno-inline-functions-called-once
|
COMMONFLAGS += -fno-inline -fno-inline-functions -fno-inline-functions-called-once
|
||||||
endif
|
endif
|
||||||
ifeq (1,$(SDL_TARGET))
|
|
||||||
COMPILERFLAGS += -DNOSDLPARACHUTE
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifndef OPTOPT
|
ifndef OPTOPT
|
||||||
|
@ -684,16 +681,9 @@ endif
|
||||||
# NOTE: If your setup doesn't have libstdc++, you can try using libsupc++.
|
# NOTE: If your setup doesn't have libstdc++, you can try using libsupc++.
|
||||||
# Search for STDCPPLIB below and change it to -lsupc++.
|
# Search for STDCPPLIB below and change it to -lsupc++.
|
||||||
|
|
||||||
SDL_INCLUDES=-I$(SDLROOT)/include -I$(SDLROOT)/include/SDL
|
|
||||||
SDL_LIB=-l$(SDLNAME)
|
|
||||||
SDL_MIXER_LIB=-l$(SDLNAME)_mixer
|
|
||||||
|
|
||||||
ifeq ($(SUBPLATFORM),LINUX)
|
ifeq ($(SUBPLATFORM),LINUX)
|
||||||
RENDERTYPE=SDL
|
|
||||||
MIXERTYPE=SDL
|
|
||||||
COMPILERFLAGS+= -DHAVE_INTTYPES
|
COMPILERFLAGS+= -DHAVE_INTTYPES
|
||||||
GTKCOMPAT32=0
|
GTKCOMPAT32=0
|
||||||
SDL_FRAMEWORK=0
|
|
||||||
|
|
||||||
# On Linux, we don't need to specify libstdc++ manually, the linker will
|
# On Linux, we don't need to specify libstdc++ manually, the linker will
|
||||||
# presumably take care for us.
|
# presumably take care for us.
|
||||||
|
@ -749,20 +739,12 @@ ifeq ($(PLATFORM),DARWIN)
|
||||||
COMPILERFLAGS+= -I/sw/include
|
COMPILERFLAGS+= -I/sw/include
|
||||||
endif
|
endif
|
||||||
|
|
||||||
RENDERTYPE = SDL
|
|
||||||
MIXERTYPE = SDL
|
|
||||||
STDCPPLIB:=-lstdc++
|
STDCPPLIB:=-lstdc++
|
||||||
COMPILERFLAGS += -DHAVE_INTTYPES
|
COMPILERFLAGS += -DHAVE_INTTYPES
|
||||||
DLLSUFFIX=.dylib
|
DLLSUFFIX=.dylib
|
||||||
GTKCOMPAT32 = 0
|
GTKCOMPAT32 = 0
|
||||||
WITHOUT_GTK ?= 1
|
WITHOUT_GTK ?= 1
|
||||||
|
|
||||||
ifeq (1,$(SDL_FRAMEWORK))
|
|
||||||
SDL_INCLUDES=-I$(APPLE_FRAMEWORKS)/SDL.framework/Headers -I$(APPLE_FRAMEWORKS)/SDL_mixer.framework/Headers
|
|
||||||
SDL_LIB=-l$(SDLNAME)main -Wl,-framework,SDL -Wl,-rpath -Wl,"@loader_path/../Frameworks"
|
|
||||||
SDL_MIXER_LIB=-Wl,-framework,SDL_mixer
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq (1,$(DARWIN9))
|
ifeq (1,$(DARWIN9))
|
||||||
COMPILERFLAGS += -DDARWIN9
|
COMPILERFLAGS += -DDARWIN9
|
||||||
endif
|
endif
|
||||||
|
@ -789,18 +771,11 @@ ifeq ($(PLATFORM),WINDOWS)
|
||||||
MIXERTYPE?=WIN
|
MIXERTYPE?=WIN
|
||||||
ifneq ($(RENDERTYPE),SDL)
|
ifneq ($(RENDERTYPE),SDL)
|
||||||
ifeq ($(MIXERTYPE),SDL)
|
ifeq ($(MIXERTYPE),SDL)
|
||||||
MIXERTYPE:=WIN
|
override MIXERTYPE:=WIN
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
SDL_INCLUDES=
|
|
||||||
ifeq ($(SDL_TARGET),1)
|
|
||||||
SDL_MIXER_LIB=platform/Windows/lib$(WINLIB)/SDL_mixer.lib
|
|
||||||
endif
|
|
||||||
|
|
||||||
WITHOUT_GTK?=1
|
WITHOUT_GTK?=1
|
||||||
SDLCONFIG=
|
|
||||||
SDL_FRAMEWORK=1
|
|
||||||
EXESUFFIX=.exe
|
EXESUFFIX=.exe
|
||||||
DLLSUFFIX=.dll
|
DLLSUFFIX=.dll
|
||||||
LIBDIRS+= -Lplatform/Windows/lib$(WINLIB)
|
LIBDIRS+= -Lplatform/Windows/lib$(WINLIB)
|
||||||
|
@ -812,25 +787,22 @@ ifeq ($(PLATFORM),WINDOWS)
|
||||||
STDCPPLIB:=-lstdc++
|
STDCPPLIB:=-lstdc++
|
||||||
|
|
||||||
COMMONFLAGS += -fno-pic
|
COMMONFLAGS += -fno-pic
|
||||||
|
else
|
||||||
|
RENDERTYPE?=SDL
|
||||||
|
MIXERTYPE?=SDL
|
||||||
endif
|
endif
|
||||||
ifeq ($(PLATFORM),BSD)
|
ifeq ($(PLATFORM),BSD)
|
||||||
COMPILERFLAGS+= -I/usr/local/include
|
COMPILERFLAGS+= -I/usr/local/include
|
||||||
|
|
||||||
RENDERTYPE=SDL
|
|
||||||
MIXERTYPE=SDL
|
|
||||||
COMPILERFLAGS+= -DHAVE_INTTYPES
|
COMPILERFLAGS+= -DHAVE_INTTYPES
|
||||||
STDCPPLIB:=-lstdc++
|
STDCPPLIB:=-lstdc++
|
||||||
endif
|
endif
|
||||||
ifeq ($(PLATFORM),BEOS)
|
ifeq ($(PLATFORM),BEOS)
|
||||||
override NOASM=1
|
override NOASM=1
|
||||||
|
|
||||||
RENDERTYPE=SDL
|
|
||||||
MIXERTYPE=SDL
|
|
||||||
STDCPPLIB:=-lstdc++
|
STDCPPLIB:=-lstdc++
|
||||||
endif
|
endif
|
||||||
ifeq ($(PLATFORM),SKYOS)
|
ifeq ($(PLATFORM),SKYOS)
|
||||||
RENDERTYPE=SDL
|
|
||||||
MIXERTYPE=SDL
|
|
||||||
EXESUFFIX=.app
|
EXESUFFIX=.app
|
||||||
override NOASM=1
|
override NOASM=1
|
||||||
COMPILERFLAGS+= -DUNDERSCORES -I/boot/programs/sdk/include/sdl
|
COMPILERFLAGS+= -DUNDERSCORES -I/boot/programs/sdk/include/sdl
|
||||||
|
@ -838,9 +810,6 @@ ifeq ($(PLATFORM),SKYOS)
|
||||||
LIBS+= -lSDL -lnet
|
LIBS+= -lSDL -lnet
|
||||||
endif
|
endif
|
||||||
ifeq ($(PLATFORM),WII)
|
ifeq ($(PLATFORM),WII)
|
||||||
RENDERTYPE=SDL
|
|
||||||
MIXERTYPE=SDL
|
|
||||||
SDL_INCLUDES=
|
|
||||||
EXESUFFIX=.elf
|
EXESUFFIX=.elf
|
||||||
override USE_OPENGL=0
|
override USE_OPENGL=0
|
||||||
override POLYMER=0
|
override POLYMER=0
|
||||||
|
@ -851,28 +820,21 @@ ifeq ($(PLATFORM),WII)
|
||||||
COMPILERFLAGS+= -DGEKKO -DHAVE_INTTYPES -D__POWERPC__ -I$(LIBOGC_INC) -I$(PORTLIBS)/include -Iplatform/Wii/include
|
COMPILERFLAGS+= -DGEKKO -DHAVE_INTTYPES -D__POWERPC__ -I$(LIBOGC_INC) -I$(PORTLIBS)/include -Iplatform/Wii/include
|
||||||
SDLCONFIG=
|
SDLCONFIG=
|
||||||
SDL_TARGET=1
|
SDL_TARGET=1
|
||||||
SDL_FRAMEWORK=1
|
|
||||||
LIBDIRS += -L$(LIBOGC_LIB) -L$(PORTLIBS)/lib -Lplatform/Wii/lib
|
LIBDIRS += -L$(LIBOGC_LIB) -L$(PORTLIBS)/lib -Lplatform/Wii/lib
|
||||||
endif
|
endif
|
||||||
ifeq ($(PLATFORM),QNX)
|
ifeq ($(PLATFORM),QNX)
|
||||||
RENDERTYPE=SDL
|
|
||||||
MIXERTYPE=SDL
|
|
||||||
override USE_OPENGL=0
|
override USE_OPENGL=0
|
||||||
override NOASM=1
|
override NOASM=1
|
||||||
STDCPPLIB:=-lstdc++
|
STDCPPLIB:=-lstdc++
|
||||||
LIBS+= -lsocket
|
LIBS+= -lsocket
|
||||||
endif
|
endif
|
||||||
ifeq ($(PLATFORM),SUNOS)
|
ifeq ($(PLATFORM),SUNOS)
|
||||||
RENDERTYPE=SDL
|
|
||||||
MIXERTYPE=SDL
|
|
||||||
override USE_OPENGL=0
|
override USE_OPENGL=0
|
||||||
override NOASM=1
|
override NOASM=1
|
||||||
STDCPPLIB:=-lstdc++
|
STDCPPLIB:=-lstdc++
|
||||||
LIBS+= -lsocket -lnsl
|
LIBS+= -lsocket -lnsl
|
||||||
endif
|
endif
|
||||||
ifeq ($(PLATFORM),SYLLABLE)
|
ifeq ($(PLATFORM),SYLLABLE)
|
||||||
RENDERTYPE=SDL
|
|
||||||
MIXERTYPE=SDL
|
|
||||||
override USE_OPENGL=0
|
override USE_OPENGL=0
|
||||||
override NOASM=1
|
override NOASM=1
|
||||||
endif
|
endif
|
||||||
|
@ -897,55 +859,54 @@ ifneq (0,$(CLANG))
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(SDL_TARGET),2)
|
|
||||||
SDLCONFIG ?= sdl2-config
|
|
||||||
SDLNAME ?= SDL2
|
|
||||||
endif
|
|
||||||
ifeq ($(SDL_TARGET),1)
|
|
||||||
SDLCONFIG ?= sdl-config
|
|
||||||
SDLNAME ?= SDL
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifneq ($(SDLCONFIG),)
|
|
||||||
SDLVERSION:=$(strip $(shell $(SDLCONFIG) --version))
|
|
||||||
ifneq ($(SDLVERSION),)
|
|
||||||
SDLROOT:=$(strip $(shell $(SDLCONFIG) --prefix))
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
SDL_STATIC?=1
|
|
||||||
|
|
||||||
ifeq ($(RENDERTYPE),SDL)
|
ifeq ($(RENDERTYPE),SDL)
|
||||||
|
ifeq ($(SDL_TARGET),2)
|
||||||
|
SDLCONFIG ?= sdl2-config
|
||||||
|
SDLNAME ?= SDL2
|
||||||
|
endif
|
||||||
|
ifeq ($(SDL_TARGET),1)
|
||||||
|
SDLCONFIG ?= sdl-config
|
||||||
|
SDLNAME ?= SDL
|
||||||
|
ifeq (0,$(RELEASE))
|
||||||
|
COMPILERFLAGS += -DNOSDLPARACHUTE
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifneq ($(strip $(SDLCONFIG)),)
|
||||||
|
ifeq ($(strip $(shell $(SDLCONFIG) --version $(DONT_PRINT_STDERR))),)
|
||||||
|
override SDLCONFIG =
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
COMPILERFLAGS += -DSDL_TARGET=$(SDL_TARGET)
|
COMPILERFLAGS += -DSDL_TARGET=$(SDL_TARGET)
|
||||||
|
|
||||||
ifeq ($(SDL_FRAMEWORK),1)
|
ifneq ($(SDL_FRAMEWORK),0)
|
||||||
COMPILERFLAGS += -DSDL_FRAMEWORK
|
ifeq ($(PLATFORM),DARWIN)
|
||||||
endif
|
LIBDIRS += -F$(APPLE_FRAMEWORKS)
|
||||||
|
ifeq ($(MIXERTYPE),SDL)
|
||||||
ifneq ($(PLATFORM),WINDOWS)
|
COMPILERFLAGS += -I$(APPLE_FRAMEWORKS)/$(SDLNAME)_mixer.framework/Headers
|
||||||
ifeq ($(SDL_FRAMEWORK),1)
|
LIBS += -Wl,-framework,$(SDLNAME)_mixer
|
||||||
ifeq ($(PLATFORM),DARWIN)
|
|
||||||
LIBS += -Wl,-framework,SDL
|
|
||||||
COMPILERFLAGS+= -I$(APPLE_FRAMEWORKS)/SDL.framework/Headers \
|
|
||||||
-I$(APPLE_FRAMEWORKS)/SDL_mixer.framework/Headers
|
|
||||||
endif
|
|
||||||
else
|
|
||||||
ifneq ($(SDLCONFIG),)
|
|
||||||
SDLCONFIG_COMMONFLAGS:=$(subst -Dmain=SDL_main,,$(strip $(shell $(SDLCONFIG) --cflags)))
|
|
||||||
SDLCONFIG_LIBS:=$(strip $(shell $(SDLCONFIG) --libs))
|
|
||||||
|
|
||||||
LIBS+= $(SDLCONFIG_LIBS)
|
|
||||||
COMMONFLAGS+= $(SDLCONFIG_COMMONFLAGS)
|
|
||||||
endif
|
endif
|
||||||
|
COMPILERFLAGS += -I$(APPLE_FRAMEWORKS)/$(SDLNAME).framework/Headers
|
||||||
|
LIBS += -Wl,-framework,$(SDLNAME) -Wl,-rpath -Wl,"@loader_path/../Frameworks"
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
COMPILERFLAGS += -D_GNU_SOURCE=1
|
ifeq ($(MIXERTYPE),SDL)
|
||||||
ifneq ($(SDL_STATIC),0)
|
LIBS += -l$(SDLNAME)_mixer
|
||||||
ifneq ($(SDL_TARGET),1) # Since SDL2 is under the zlib license, link statically if possible.
|
endif
|
||||||
LIBS+= -static
|
ifneq ($(SDLCONFIG),)
|
||||||
endif
|
SDLCONFIG_CFLAGS := $(strip $(subst -Dmain=SDL_main,,$(shell $(SDLCONFIG) --cflags)))
|
||||||
|
SDLCONFIG_LIBS := $(strip $(subst -mwindows,,$(shell $(SDLCONFIG) --libs)))
|
||||||
|
|
||||||
|
COMMONFLAGS += $(SDLCONFIG_CFLAGS)
|
||||||
|
LIBS += $(SDLCONFIG_LIBS)
|
||||||
|
else
|
||||||
|
ifeq ($(SDL_TARGET),1)
|
||||||
|
COMPILERFLAGS += -D_GNU_SOURCE=1
|
||||||
|
endif
|
||||||
|
COMPILERFLAGS += -D_REENTRANT -DSDL_USEFOLDER
|
||||||
|
LIBS+= -l$(SDLNAME)
|
||||||
endif
|
endif
|
||||||
LIBS+= -l$(SDLNAME)main -l$(SDLNAME) -lmingw32 -lgdi32 -limm32 -lole32 -loleaut32 -lwinmm -lversion
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq (1,$(WITHOUT_GTK))
|
ifeq (1,$(WITHOUT_GTK))
|
||||||
|
@ -969,25 +930,14 @@ ifeq ($(RENDERTYPE),SDL)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
COMPILERFLAGS += $(SDL_INCLUDES)
|
ifeq ($(PLATFORM),WINDOWS)
|
||||||
ifneq ($(MIXERTYPE),WIN)
|
LIBS += -ldxguid_sdl -lmingw32 -lgdi32 -limm32 -lole32 -loleaut32 -lwinmm -lversion
|
||||||
LIBS += $(SDL_MIXER_LIB)
|
|
||||||
endif
|
endif
|
||||||
LIBS += $(SDL_LIB)
|
|
||||||
endif
|
endif
|
||||||
ifeq ($(RENDERTYPE),WIN)
|
ifeq ($(RENDERTYPE),WIN)
|
||||||
LIBS+= -ldxguid
|
LIBS+= -ldxguid
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# SDL depends on these
|
|
||||||
ifeq ($(PLATFORM),WINDOWS)
|
|
||||||
ifeq ($(RENDERTYPE),SDL)
|
|
||||||
SDL_LIB:=-l$(SDLNAME)main $(SDL_LIB)
|
|
||||||
ifeq ($(MIXERTYPE),WIN)
|
|
||||||
LIBS+= -ldxguid_sdl
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
ifeq ($(PLATFORM),WII)
|
ifeq ($(PLATFORM),WII)
|
||||||
LIBS+= -laesnd_tueidj -lpng -lfat -lwiiuse -lbte -logc -lm -lwiikeyboard
|
LIBS+= -laesnd_tueidj -lpng -lfat -lwiiuse -lbte -logc -lm -lwiikeyboard
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -92,7 +92,7 @@ MT=mt
|
||||||
CFLAGS= /MT /J /nologo $(flags_cl) \
|
CFLAGS= /MT /J /nologo $(flags_cl) \
|
||||||
/I$(DUKE3D_INC) /I$(ENGINE_INC)\msvc /I$(ENGINE_INC) /I$(MACT_ROOT) /I$(AUDIOLIB_ROOT)\include /I$(ENET_ROOT)\include \
|
/I$(DUKE3D_INC) /I$(ENGINE_INC)\msvc /I$(ENGINE_INC) /I$(MACT_ROOT) /I$(AUDIOLIB_ROOT)\include /I$(ENET_ROOT)\include \
|
||||||
/W2 $(ENGINEOPTS) \
|
/W2 $(ENGINEOPTS) \
|
||||||
/I$(PLATFORM)\include /I$(AUDIOINC)\include /DRENDERTYPE$(RENDERTYPE)=1 /DMIXERTYPE$(MIXERTYPE)=1 /DSDL_FRAMEWORK /DSDL_TARGET=2
|
/I$(PLATFORM)\include /I$(AUDIOINC)\include /DRENDERTYPE$(RENDERTYPE)=1 /DMIXERTYPE$(MIXERTYPE)=1 /DSDL_USEFOLDER /DSDL_TARGET=2
|
||||||
|
|
||||||
ENET_CFLAGS=/I$(ENET_INC) /I$(ENET_SRC)
|
ENET_CFLAGS=/I$(ENET_INC) /I$(ENET_SRC)
|
||||||
AUDIOLIB_CFLAGS=/I$(AUDIOLIB_INC) /I$(AUDIOLIB_SRC)
|
AUDIOLIB_CFLAGS=/I$(AUDIOLIB_INC) /I$(AUDIOLIB_SRC)
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
/* SDLMain.m - main entry point for our Cocoa-ized SDL app
|
|
||||||
Initial Version: Darrell Walisser <dwaliss1@purdue.edu>
|
|
||||||
Non-NIB-Code & other changes: Max Horn <max@quendi.de>
|
|
||||||
|
|
||||||
Feel free to customize this file to suit your needs
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef _SDLMain_h_
|
|
||||||
#define _SDLMain_h_
|
|
||||||
|
|
||||||
#import <Cocoa/Cocoa.h>
|
|
||||||
|
|
||||||
@interface SDLMain : NSObject
|
|
||||||
@end
|
|
||||||
|
|
||||||
#endif /* _SDLMain_h_ */
|
|
|
@ -7,8 +7,8 @@
|
||||||
# undef __MINGW64_VERSION_MAJOR
|
# undef __MINGW64_VERSION_MAJOR
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(SDL_FRAMEWORK)
|
#if defined SDL_USEFOLDER
|
||||||
# if (SDL_TARGET == 2)
|
# if SDL_TARGET == 2
|
||||||
# include <SDL2/SDL.h>
|
# include <SDL2/SDL.h>
|
||||||
# include <SDL2/SDL_syswm.h>
|
# include <SDL2/SDL_syswm.h>
|
||||||
# else
|
# else
|
||||||
|
@ -17,6 +17,9 @@
|
||||||
# endif
|
# endif
|
||||||
#else
|
#else
|
||||||
# include "SDL.h"
|
# include "SDL.h"
|
||||||
|
# if !defined __APPLE__
|
||||||
|
# include "SDL_syswm.h"
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined __MINGW64_VERSION_MAJOR_BACKUP && !defined __MINGW64__
|
#if defined __MINGW64_VERSION_MAJOR_BACKUP && !defined __MINGW64__
|
||||||
|
@ -43,38 +46,37 @@ Minimum required SDL versions:
|
||||||
#error SDL version found is too old
|
#error SDL version found is too old
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(_NEED_SDLMIXER)
|
#if defined _NEED_SDLMIXER
|
||||||
# if defined(SDL_FRAMEWORK)
|
|
||||||
# if defined(_WIN32) || defined(GEKKO)
|
# if defined SDL_USEFOLDER
|
||||||
# if (SDL_TARGET == 2)
|
# if SDL_TARGET == 2
|
||||||
# include <SDL2/SDL_mixer.h>
|
# include <SDL2/SDL_mixer.h>
|
||||||
# else
|
|
||||||
# include <SDL/SDL_mixer.h>
|
|
||||||
# endif
|
|
||||||
# else
|
# else
|
||||||
# if (SDL_TARGET == 2)
|
# include <SDL/SDL_mixer.h>
|
||||||
# include <SDL2/SDL_mixer.h>
|
|
||||||
# else
|
|
||||||
# include <SDL_mixer/SDL_mixer.h>
|
|
||||||
# endif
|
|
||||||
# endif
|
# endif
|
||||||
# else
|
# else
|
||||||
# include "SDL_mixer.h"
|
# include "SDL_mixer.h"
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
/* starting with 1.2.1, SDL_mixer provides MIX_xxx version
|
/* starting with 1.2.1, SDL_mixer provides MIX_xxx version
|
||||||
macros. the new SDL_MIXER_xxx version macros start with
|
macros. the new SDL_MIXER_xxx version macros start with
|
||||||
1.2.6 but they keep backwards compatibility. 1.2.0 does
|
1.2.6 but they keep backwards compatibility. 1.2.0 does
|
||||||
not even have any version macros, so let's reject it */
|
not even have any version macros, so let's reject it */
|
||||||
#if !defined(MIX_MAJOR_VERSION) || !defined(MIX_MINOR_VERSION) || !defined(MIX_PATCHLEVEL)
|
# if !defined(MIX_MAJOR_VERSION) || !defined(MIX_MINOR_VERSION) || !defined(MIX_PATCHLEVEL)
|
||||||
#error SDL_mixer version found is too old
|
# error SDL_mixer version found is too old
|
||||||
|
# endif
|
||||||
|
|
||||||
|
# ifndef MIX_COMPILEDVERSION
|
||||||
|
# define MIX_COMPILEDVERSION (SDL_VERSIONNUM(MIX_MAJOR_VERSION,MIX_MINOR_VERSION,MIX_PATCHLEVEL))
|
||||||
|
# endif
|
||||||
|
# if MIX_COMPILEDVERSION < MIX_REQUIREDVERSION
|
||||||
|
# error SDL_mixer version found is too old
|
||||||
|
# endif
|
||||||
|
|
||||||
|
# if SDL_MAJOR_VERSION != MIX_MAJOR_VERSION
|
||||||
|
# error Major version of SDL_mixer headers does not match SDL headers
|
||||||
|
# endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#ifndef MIX_COMPILEDVERSION
|
|
||||||
#define MIX_COMPILEDVERSION (SDL_VERSIONNUM(MIX_MAJOR_VERSION,MIX_MINOR_VERSION,MIX_PATCHLEVEL))
|
|
||||||
#endif
|
|
||||||
#if MIX_COMPILEDVERSION < MIX_REQUIREDVERSION
|
|
||||||
#error SDL_mixer version found is too old
|
|
||||||
#endif /* end of bad version error */
|
|
||||||
#endif /* end of SDL_mixer checks */
|
|
||||||
|
|
||||||
#endif /* SDL_INC_H_ */
|
#endif /* SDL_INC_H_ */
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,8 @@
|
||||||
Non-NIB-Code & other changes: Max Horn <max@quendi.de>
|
Non-NIB-Code & other changes: Max Horn <max@quendi.de>
|
||||||
|
|
||||||
Feel free to customize this file to suit your needs
|
Feel free to customize this file to suit your needs
|
||||||
|
|
||||||
|
Modified for EDuke32
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#import <Foundation/Foundation.h>
|
#import <Foundation/Foundation.h>
|
||||||
|
@ -15,7 +17,8 @@
|
||||||
#import <AppKit/AppKit.h>
|
#import <AppKit/AppKit.h>
|
||||||
|
|
||||||
#include "sdl_inc.h"
|
#include "sdl_inc.h"
|
||||||
#include "SDLMain.h"
|
|
||||||
|
#import <Cocoa/Cocoa.h>
|
||||||
|
|
||||||
#include <sys/param.h> /* for MAXPATHLEN */
|
#include <sys/param.h> /* for MAXPATHLEN */
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
@ -31,6 +34,11 @@
|
||||||
/* Use this flag to determine whether we use CPS (docking) or not */
|
/* Use this flag to determine whether we use CPS (docking) or not */
|
||||||
#define SDL_USE_CPS
|
#define SDL_USE_CPS
|
||||||
#ifdef SDL_USE_CPS
|
#ifdef SDL_USE_CPS
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Portions of CPS.h */
|
/* Portions of CPS.h */
|
||||||
typedef struct CPSProcessSerNum
|
typedef struct CPSProcessSerNum
|
||||||
{
|
{
|
||||||
|
@ -42,6 +50,10 @@ extern OSErr CPSGetCurrentProcess( CPSProcessSerNum *psn);
|
||||||
extern OSErr CPSEnableForegroundOperation( CPSProcessSerNum *psn, UInt32 _arg2, UInt32 _arg3, UInt32 _arg4, UInt32 _arg5);
|
extern OSErr CPSEnableForegroundOperation( CPSProcessSerNum *psn, UInt32 _arg2, UInt32 _arg3, UInt32 _arg4, UInt32 _arg5);
|
||||||
extern OSErr CPSSetFrontProcess( CPSProcessSerNum *psn);
|
extern OSErr CPSSetFrontProcess( CPSProcessSerNum *psn);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* SDL_USE_CPS */
|
#endif /* SDL_USE_CPS */
|
||||||
|
|
||||||
static int gArgc;
|
static int gArgc;
|
||||||
|
@ -83,11 +95,11 @@ static NSString *getApplicationName(void)
|
||||||
}
|
}
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@interface SDLMain (NSObject) <NSFileManagerDelegate>
|
@interface SDLMain : NSObject <NSFileManagerDelegate>
|
||||||
@end
|
@end
|
||||||
|
|
||||||
/* The main class of the application, the application's delegate */
|
/* The main class of the application, the application's delegate */
|
||||||
@implementation SDLMain (NSObject)
|
@implementation SDLMain
|
||||||
|
|
||||||
/* Set the working directory to the .app's parent directory */
|
/* Set the working directory to the .app's parent directory */
|
||||||
- (void) setupWorkingDirectory:(BOOL)shouldChdir
|
- (void) setupWorkingDirectory:(BOOL)shouldChdir
|
||||||
|
|
|
@ -73,19 +73,19 @@
|
||||||
<NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug-SDL|Win32'">nmake /f Makefile.msvc DEBUG=1 WINBITS=32 RENDERTYPE=SDL</NMakeBuildCommandLine>
|
<NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug-SDL|Win32'">nmake /f Makefile.msvc DEBUG=1 WINBITS=32 RENDERTYPE=SDL</NMakeBuildCommandLine>
|
||||||
<NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug-SDL|Win32'">nmake /f Makefile.msvc veryclean all DEBUG=1 WINBITS=32 RENDERTYPE=SDL</NMakeReBuildCommandLine>
|
<NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug-SDL|Win32'">nmake /f Makefile.msvc veryclean all DEBUG=1 WINBITS=32 RENDERTYPE=SDL</NMakeReBuildCommandLine>
|
||||||
<NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug-SDL|Win32'">nmake /f Makefile.msvc veryclean DEBUG=1 WINBITS=32 RENDERTYPE=SDL</NMakeCleanCommandLine>
|
<NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug-SDL|Win32'">nmake /f Makefile.msvc veryclean DEBUG=1 WINBITS=32 RENDERTYPE=SDL</NMakeCleanCommandLine>
|
||||||
<NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug-SDL|Win32'">USE_OPENGL;POLYMER;SDL_FRAMEWORK;SDL_TARGET=2</NMakePreprocessorDefinitions>
|
<NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug-SDL|Win32'">USE_OPENGL;POLYMER;SDL_USEFOLDER;SDL_TARGET=2</NMakePreprocessorDefinitions>
|
||||||
<NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release-SDL|Win32'">nmake /f Makefile.msvc WINBITS=32 RENDERTYPE=SDL</NMakeBuildCommandLine>
|
<NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release-SDL|Win32'">nmake /f Makefile.msvc WINBITS=32 RENDERTYPE=SDL</NMakeBuildCommandLine>
|
||||||
<NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release-SDL|Win32'">nmake /f Makefile.msvc veryclean all WINBITS=32 RENDERTYPE=SDL</NMakeReBuildCommandLine>
|
<NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release-SDL|Win32'">nmake /f Makefile.msvc veryclean all WINBITS=32 RENDERTYPE=SDL</NMakeReBuildCommandLine>
|
||||||
<NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Release-SDL|Win32'">nmake /f Makefile.msvc veryclean WINBITS=32 RENDERTYPE=SDL</NMakeCleanCommandLine>
|
<NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Release-SDL|Win32'">nmake /f Makefile.msvc veryclean WINBITS=32 RENDERTYPE=SDL</NMakeCleanCommandLine>
|
||||||
<NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release-SDL|Win32'">USE_OPENGL;POLYMER;SDL_FRAMEWORK;SDL_TARGET=2</NMakePreprocessorDefinitions>
|
<NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release-SDL|Win32'">USE_OPENGL;POLYMER;SDL_USEFOLDER;SDL_TARGET=2</NMakePreprocessorDefinitions>
|
||||||
<NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug-SDL|x64'">nmake /f Makefile.msvc DEBUG=1 WINBITS=64 RENDERTYPE=SDL</NMakeBuildCommandLine>
|
<NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug-SDL|x64'">nmake /f Makefile.msvc DEBUG=1 WINBITS=64 RENDERTYPE=SDL</NMakeBuildCommandLine>
|
||||||
<NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug-SDL|x64'">nmake /f Makefile.msvc veryclean all DEBUG=1 WINBITS=64 RENDERTYPE=SDL</NMakeReBuildCommandLine>
|
<NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug-SDL|x64'">nmake /f Makefile.msvc veryclean all DEBUG=1 WINBITS=64 RENDERTYPE=SDL</NMakeReBuildCommandLine>
|
||||||
<NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug-SDL|x64'">nmake /f Makefile.msvc veryclean DEBUG=1 WINBITS=64 RENDERTYPE=SDL</NMakeCleanCommandLine>
|
<NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug-SDL|x64'">nmake /f Makefile.msvc veryclean DEBUG=1 WINBITS=64 RENDERTYPE=SDL</NMakeCleanCommandLine>
|
||||||
<NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug-SDL|x64'">USE_OPENGL;POLYMER;NOASM;HAVE_INTTYPES;SDL_FRAMEWORK;SDL_TARGET=2</NMakePreprocessorDefinitions>
|
<NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug-SDL|x64'">USE_OPENGL;POLYMER;NOASM;HAVE_INTTYPES;SDL_USEFOLDER;SDL_TARGET=2</NMakePreprocessorDefinitions>
|
||||||
<NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release-SDL|x64'">nmake /f Makefile.msvc WINBITS=64 RENDERTYPE=SDL</NMakeBuildCommandLine>
|
<NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release-SDL|x64'">nmake /f Makefile.msvc WINBITS=64 RENDERTYPE=SDL</NMakeBuildCommandLine>
|
||||||
<NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release-SDL|x64'">nmake /f Makefile.msvc veryclean all WINBITS=64 RENDERTYPE=SDL</NMakeReBuildCommandLine>
|
<NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release-SDL|x64'">nmake /f Makefile.msvc veryclean all WINBITS=64 RENDERTYPE=SDL</NMakeReBuildCommandLine>
|
||||||
<NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Release-SDL|x64'">nmake /f Makefile.msvc veryclean WINBITS=64 RENDERTYPE=SDL</NMakeCleanCommandLine>
|
<NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Release-SDL|x64'">nmake /f Makefile.msvc veryclean WINBITS=64 RENDERTYPE=SDL</NMakeCleanCommandLine>
|
||||||
<NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release-SDL|x64'">USE_OPENGL;POLYMER;NOASM;SDL_FRAMEWORK;SDL_TARGET=2</NMakePreprocessorDefinitions>
|
<NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release-SDL|x64'">USE_OPENGL;POLYMER;NOASM;SDL_USEFOLDER;SDL_TARGET=2</NMakePreprocessorDefinitions>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug-SDL|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug-SDL|x64'">
|
||||||
<IncludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);build\include;source\jmact;source\jaudiolib\include;source\enet\include;</IncludePath>
|
<IncludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);build\include;source\jmact;source\jaudiolib\include;source\enet\include;</IncludePath>
|
||||||
|
|
|
@ -8,8 +8,8 @@ top=/var/www/synthesis/eduke32
|
||||||
lockfile=$top/synthesis_building
|
lockfile=$top/synthesis_building
|
||||||
source=eduke32
|
source=eduke32
|
||||||
output=/var/www/dukeworld.duke4.net/eduke32/synthesis
|
output=/var/www/dukeworld.duke4.net/eduke32/synthesis
|
||||||
make=( make SYNTHESIS=1 PLATFORM=WINDOWS CROSS='i686-w64-mingw32-' CC='i686-w64-mingw32-gcc-4.8.0' AS='nasm' PRETTY_OUTPUT=0 )
|
make=( make SYNTHESIS=1 PLATFORM=WINDOWS CROSS='i686-w64-mingw32-' CC='i686-w64-mingw32-gcc-4.8.0' AS='nasm' SDLCONFIG='' PRETTY_OUTPUT=0 )
|
||||||
make64=( make SYNTHESIS=1 PLATFORM=WINDOWS CROSS='x86_64-w64-mingw32-' CC='x86_64-w64-mingw32-gcc-4.8.0' AS='nasm' PRETTY_OUTPUT=0 )
|
make64=( make SYNTHESIS=1 PLATFORM=WINDOWS CROSS='x86_64-w64-mingw32-' CC='x86_64-w64-mingw32-gcc-4.8.0' AS='nasm' SDLCONFIG='' PRETTY_OUTPUT=0 )
|
||||||
clean=veryclean
|
clean=veryclean
|
||||||
|
|
||||||
# the following file paths are relative to $source
|
# the following file paths are relative to $source
|
||||||
|
|
Loading…
Reference in a new issue