1
0
Fork 0

openbsd bits for Makefile and q_platform

This commit is contained in:
Ryan Freeman 2019-09-22 16:55:21 -07:00
parent 64afa7cb17
commit c8b41d33dc
2 changed files with 49 additions and 3 deletions

View File

@ -438,7 +438,7 @@ ifeq ($(PLATFORM),openbsd)
BASE_CFLAGS += -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes \
-I/usr/X11R6/include -I/usr/local/include \
-I/usr/local/include/SDL -fvisibility=hidden
-fvisibility=hidden
DEBUG_CFLAGS=$(BASE_CFLAGS) -g
@ -460,9 +460,16 @@ ifeq ($(PLATFORM),openbsd)
THREAD_LDFLAGS=-lpthread
# don't need -ldl (FreeBSD)
LDFLAGS=-lm -lSDL -lGL -lX11 -L/usr/local/lib -L/usr/X11R6/lib -lX11 -lXext
LDFLAGS=-lm
CLIENT_LDFLAGS =-lm -lSDL -lGL -lX11 -L/usr/local/lib -L/usr/X11R6/lib -lX11 -lXext
ifeq ($(USE_SDL),1)
BASE_CFLAGS += -I/usr/local/include/SDL2
CLIENT_LDFLAGS = -L/usr/X11R6/lib -L/usr/local/lib -lSDL2
else
CLIENT_LDFLAGS = -L/usr/X11R6/lib -L/usr/lib -lX11
endif
CLIENT_LDFLAGS += -lm -lGL -L/usr/local/lib
ifeq ($(USE_CODEC_VORBIS),1)
CLIENT_LDFLAGS += -lvorbisfile -lvorbis -logg

View File

@ -167,6 +167,45 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#endif
//================================================================ OpenBSD ===
// This is very much like the FreeBSD one and can probably be merged
#ifdef __OpenBSD__
#include <sys/types.h>
#include <sys/types.h>
#include <machine/endian.h>
#define OS_STRING "openbsd"
#define ID_INLINE inline
#define PATH_SEP '/'
#define PATH_SEP_FOREIGN '\\'
#ifdef __i386__
#define ARCH_STRING "i386"
// OpenBSD has alot of platforms
#define Q3_LITTLE_ENDIAN
#undef id386
#define id386 1
#endif
#ifdef __amd64__
#define ARCH_STRING "x86_64"
#define Q3_LITTLE_ENDIAN
#undef idx64
#define idx64 1
#endif
#if BYTE_ORDER == BIG_ENDIAN
#define Q3_BIG_ENDIAN
#else
#define Q3_LITTLE_ENDIAN
#endif
#define DLL_EXT ".so"
#endif
//================================================================== Q3VM ===
#ifdef Q3_VM