2014-03-15 16:59:03 +00:00
|
|
|
#
|
|
|
|
# sdl/makefile.cfg for SRB2/SDL
|
|
|
|
#
|
|
|
|
|
|
|
|
#
|
|
|
|
#SDL...., *looks at Alam*, THIS IS A MESS!
|
|
|
|
#
|
|
|
|
|
|
|
|
ifdef UNIXCOMMON
|
|
|
|
include sdl/MakeNIX.cfg
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef PANDORA
|
|
|
|
include sdl/SRB2Pandora/Makefile.cfg
|
|
|
|
endif #ifdef PANDORA
|
|
|
|
|
|
|
|
ifdef CYGWIN32
|
|
|
|
include sdl/MakeCYG.cfg
|
|
|
|
endif #ifdef CYGWIN32
|
|
|
|
|
|
|
|
ifdef SDL_PKGCONFIG
|
|
|
|
SDL_CFLAGS?=$(shell $(PKG_CONFIG) $(SDL_PKGCONFIG) --cflags)
|
|
|
|
SDL_LDFLAGS?=$(shell $(PKG_CONFIG) $(SDL_PKGCONFIG) --libs)
|
|
|
|
else
|
|
|
|
ifdef PREFIX
|
2014-07-26 07:06:00 +00:00
|
|
|
SDL_CONFIG?=$(PREFIX)-sdl2-config
|
2014-03-15 16:59:03 +00:00
|
|
|
else
|
2014-07-26 07:06:00 +00:00
|
|
|
SDL_CONFIG?=sdl2-config
|
2014-03-15 16:59:03 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef STATIC
|
|
|
|
SDL_CFLAGS?=$(shell $(SDL_CONFIG) --cflags)
|
|
|
|
SDL_LDFLAGS?=$(shell $(SDL_CONFIG) --static-libs)
|
|
|
|
else
|
|
|
|
SDL_CFLAGS?=$(shell $(SDL_CONFIG) --cflags)
|
|
|
|
SDL_LDFLAGS?=$(shell $(SDL_CONFIG) --libs)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
#use the x86 asm code
|
|
|
|
ifndef CYGWIN32
|
|
|
|
ifndef NOASM
|
|
|
|
USEASM=1
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
OBJS+=$(OBJDIR)/i_video.o $(OBJDIR)/dosstr.o $(OBJDIR)/endtxt.o $(OBJDIR)/hwsym_sdl.o
|
|
|
|
|
2014-07-25 23:10:24 +00:00
|
|
|
OPTS+=-DDIRECTFULLSCREEN -DHAVE_SDL
|
2014-03-15 16:59:03 +00:00
|
|
|
|
|
|
|
ifndef NOHW
|
|
|
|
OBJS+=$(OBJDIR)/r_opengl.o $(OBJDIR)/ogl_sdl.o
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifndef NOHS
|
|
|
|
ifdef OPENAL
|
|
|
|
OBJS+=$(OBJDIR)/s_openal.o
|
|
|
|
OPTS+=-DSTATIC3DS
|
|
|
|
STATICHS=1
|
|
|
|
else
|
|
|
|
ifdef FMOD
|
|
|
|
OBJS+=$(OBJDIR)/s_fmod.o
|
|
|
|
OPTS+=-DSTATIC3DS
|
|
|
|
STATICHS=1
|
|
|
|
else
|
|
|
|
ifdef MINGW
|
|
|
|
ifdef DS3D
|
|
|
|
OBJS+=$(OBJDIR)/s_ds3d.o
|
|
|
|
OPTS+=-DSTATIC3DS
|
|
|
|
STATICHS=1
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef NOMIXER
|
|
|
|
i_sound_o=$(OBJDIR)/sdl_sound.o
|
|
|
|
else
|
|
|
|
i_sound_o=$(OBJDIR)/mixer_sound.o
|
|
|
|
OPTS+=-DHAVE_MIXER
|
2018-08-26 18:20:41 +00:00
|
|
|
ifdef MINGW
|
2018-08-21 18:57:53 +00:00
|
|
|
SDL_LDFLAGS+=-lSDL2_mixer_ext
|
2018-08-26 18:20:41 +00:00
|
|
|
else
|
|
|
|
SDL_LDFLAGS+=-lSDL2_mixer
|
|
|
|
endif
|
2014-03-15 16:59:03 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef SDL_TTF
|
|
|
|
OPTS+=-DHAVE_TTF
|
2014-07-26 07:06:00 +00:00
|
|
|
SDL_LDFLAGS+=-lSDL2_ttf -lfreetype -lz
|
2014-03-15 16:59:03 +00:00
|
|
|
OBJS+=$(OBJDIR)/i_ttf.o
|
|
|
|
endif
|
|
|
|
|
2014-07-26 07:06:00 +00:00
|
|
|
ifdef SDL_IMAGE
|
|
|
|
OPTS+=-DHAVE_IMAGE
|
|
|
|
SDL_LDFLAGS+=-lSDL2_image
|
|
|
|
endif
|
2014-03-15 16:59:03 +00:00
|
|
|
|
|
|
|
ifdef SDL_NET
|
|
|
|
OPTS+=-DHAVE_SDLNET
|
2014-07-26 07:06:00 +00:00
|
|
|
SDL_LDFLAGS+=-lSDL2_net
|
2014-03-15 16:59:03 +00:00
|
|
|
endif
|
|
|
|
|
2016-02-08 01:53:27 +00:00
|
|
|
ifdef MINGW
|
|
|
|
ifndef NOSDLMAIN
|
|
|
|
SDLMAIN=1
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2014-03-15 16:59:03 +00:00
|
|
|
ifdef SDLMAIN
|
|
|
|
OPTS+=-DSDLMAIN
|
|
|
|
else
|
|
|
|
ifdef MINGW
|
|
|
|
SDL_CFLAGS+=-Umain
|
|
|
|
SDL_LDFLAGS+=-mconsole
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifndef NOHW
|
|
|
|
ifdef OPENAL
|
|
|
|
ifdef MINGW
|
|
|
|
LIBS:=-lopenal32 $(LIBS)
|
|
|
|
else
|
|
|
|
LIBS:=-lopenal $(LIBS)
|
|
|
|
endif
|
|
|
|
else
|
|
|
|
ifdef MINGW
|
|
|
|
ifdef DS3D
|
|
|
|
LIBS:=-ldsound -luuid $(LIBS)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
CFLAGS+=$(SDL_CFLAGS)
|
|
|
|
LIBS:=$(SDL_LDFLAGS) $(LIBS)
|
|
|
|
ifdef STATIC
|
|
|
|
LIBS+=$(shell $(SDL_CONFIG) --static-libs)
|
|
|
|
endif
|