Skip to content
Snippets Groups Projects
Commit 3ffbc2bb authored by Alam Ed Arias's avatar Alam Ed Arias
Browse files

Merge remote-tracking branch 'origin/public_next' into 2214

parents 983453e2 e570328c
No related branches found
No related tags found
No related merge requests found
...@@ -172,6 +172,11 @@ if("${CMAKE_SYSTEM_NAME}" MATCHES "Linux") ...@@ -172,6 +172,11 @@ if("${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
endif() endif()
endif() endif()
if("${CMAKE_SYSTEM_NAME}" MATCHES "Haiku")
target_compile_definitions(SRB2SDL2 PRIVATE -DNOEXECINFO)
target_link_libraries(SRB2SDL2 PRIVATE network)
endif()
if("${CMAKE_SYSTEM_NAME}" MATCHES "Darwin") if("${CMAKE_SYSTEM_NAME}" MATCHES "Darwin")
target_compile_definitions(SRB2SDL2 PRIVATE -DMACOSX) target_compile_definitions(SRB2SDL2 PRIVATE -DMACOSX)
endif() endif()
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
# Previously featured:\ # Previously featured:\
PANDORA\ PANDORA\
HAIKU\
DUMMY\ DUMMY\
DJGPPDOS\ DJGPPDOS\
SOLARIS\ SOLARIS\
...@@ -17,6 +16,7 @@ all_systems:=\ ...@@ -17,6 +16,7 @@ all_systems:=\
UNIX\ UNIX\
LINUX\ LINUX\
FREEBSD\ FREEBSD\
HAIKU\
# check for user specified system # check for user specified system
ifeq (,$(filter $(all_systems),$(.VARIABLES))) ifeq (,$(filter $(all_systems),$(.VARIABLES)))
...@@ -35,6 +35,8 @@ system:=$(shell uname -s) ...@@ -35,6 +35,8 @@ system:=$(shell uname -s)
ifeq ($(system),Linux) ifeq ($(system),Linux)
new_system:=LINUX new_system:=LINUX
else ifeq ($(system),Haiku)
new_system:=HAIKU
else else
$(error \ $(error \
......
#
# Makefile options for Haiku
#
opts+=-DUNIXCOMMON -DLUA_USE_POSIX
ifndef DEDICATED
ifndef DUMMY
SDL?=1
DEDICATED?=0
endif
endif
NOEXECINFO=1
ifeq (${SDL},1)
EXENAME?=srb2haiku
else ifeq (${DEDICATED},1)
EXENAME?=srb2haikud
endif
ifndef NONET
libs+=-lnetwork
endif
define _set =
$(1)_CFLAGS?=$($(1)_opts)
$(1)_LDFLAGS?=$($(1)_libs)
endef
lib:=../libs/gme
LIBGME_opts:=-I$(lib)/include
LIBGME_libs:=-l:libgme.so.0
$(eval $(call _set,LIBGME))
lib:=../libs/libopenmpt
LIBOPENMPT_opts:=-I$(lib)/inc
LIBOPENMPT_libs:=-l:libopenmpt.so.0
$(eval $(call _set,LIBOPENMPT))
ifdef SDL
lib:=../libs/SDL2_mixer
mixer_opts:=-I$(lib)/include
mixer_libs:=-l:libSDL2_mixer-2.0.so.0
lib:=../libs/SDL2
SDL_opts:=-I$(lib)/include $(mixer_opts)
SDL_libs:=$(mixer_libs) -l:libSDL2-2.0.so.0
$(eval $(call _set,SDL))
endif
lib:=../libs/zlib
ZLIB_opts:=-I$(lib)
ZLIB_libs:=-l:libz.so.1
$(eval $(call _set,ZLIB))
ifndef PNG_CONFIG
PNG_opts:=
PNG_libs:=-l:libpng16.so.16
$(eval $(call _set,PNG))
endif
lib:=../libs/curl
CURL_opts:=-I$(lib)/include
CURL_libs:=-l:libcurl.so.4
$(eval $(call _set,CURL))
lib:=../libs/miniupnpc
MINIUPNPC_opts:=-I$(lib)/include
MINIUPNPC_libs:=-l:libminiupnpc.so.17
$(eval $(call _set,MINIUPNPC))
...@@ -35,6 +35,10 @@ endif ...@@ -35,6 +35,10 @@ endif
else ifdef FREEBSD else ifdef FREEBSD
UNIX=1 UNIX=1
platform=freebsd platform=freebsd
else ifdef HAIKU
# Give Haiku its own configuration, since it
# isn't actually UNIX.
include Makefile.d/haiku.mk
else ifdef SOLARIS # FIXME: UNTESTED else ifdef SOLARIS # FIXME: UNTESTED
UNIX=1 UNIX=1
platform=solaris platform=solaris
......
...@@ -33,6 +33,7 @@ else ...@@ -33,6 +33,7 @@ else
opts+=-DHAVE_MIXER opts+=-DHAVE_MIXER
sources+=sdl/mixer_sound.c sources+=sdl/mixer_sound.c
ifndef HAIKU # Haiku has a special import path
ifdef HAVE_MIXERX ifdef HAVE_MIXERX
opts+=-DHAVE_MIXERX opts+=-DHAVE_MIXERX
libs+=-lSDL2_mixer_ext libs+=-lSDL2_mixer_ext
...@@ -40,6 +41,7 @@ sources+=sdl/mixer_sound.c ...@@ -40,6 +41,7 @@ sources+=sdl/mixer_sound.c
libs+=-lSDL2_mixer libs+=-lSDL2_mixer
endif endif
endif endif
endif
ifndef NOTHREADS ifndef NOTHREADS
opts+=-DHAVE_THREADS opts+=-DHAVE_THREADS
......
...@@ -2307,7 +2307,7 @@ void I_Sleep(UINT32 ms) ...@@ -2307,7 +2307,7 @@ void I_Sleep(UINT32 ms)
void I_SleepDuration(precise_t duration) void I_SleepDuration(precise_t duration)
{ {
#if defined(__linux__) || defined(__FreeBSD__) #if defined(__linux__) || defined(__FreeBSD__) || defined(__HAIKU__)
UINT64 precision = I_GetPrecisePrecision(); UINT64 precision = I_GetPrecisePrecision();
struct timespec ts = { struct timespec ts = {
.tv_sec = duration / precision, .tv_sec = duration / precision,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment