mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-01-22 09:01:57 -05:00
add initial build support for hp-ux
This commit is contained in:
parent
a4c2c2f88a
commit
d3374727e7
4 changed files with 25 additions and 4 deletions
11
Makefile
11
Makefile
|
@ -65,6 +65,15 @@ ifeq ($(PLAT),sunos)
|
|||
BUILD_DIR = build-solaris
|
||||
endif
|
||||
|
||||
ifeq ($(PLAT),hp-ux)
|
||||
CC = gcc
|
||||
CFLAGS = -DCC_BUILD_ICON
|
||||
LDFLAGS =
|
||||
LIBS = -lm -lX11 -lXi -L/opt/graphics/OpenGL/lib -lGL
|
||||
BUILD_DIR = build-hpux
|
||||
TRACK_DEPENDENCIES=0
|
||||
endif
|
||||
|
||||
ifeq ($(PLAT),darwin)
|
||||
OBJECTS += $(BUILD_DIR)/Window_cocoa.o
|
||||
CFLAGS += -DCC_BUILD_ICON
|
||||
|
@ -175,6 +184,8 @@ mingw:
|
|||
$(MAKE) $(TARGET) PLAT=mingw
|
||||
sunos:
|
||||
$(MAKE) $(TARGET) PLAT=sunos
|
||||
hp-ux:
|
||||
$(MAKE) $(TARGET) PLAT=hp-ux
|
||||
darwin:
|
||||
$(MAKE) $(TARGET) PLAT=darwin
|
||||
freebsd:
|
||||
|
|
|
@ -265,6 +265,13 @@ typedef cc_uint8 cc_bool;
|
|||
#define DEFAULT_AUD_BACKEND CC_AUD_BACKEND_OPENAL
|
||||
#define DEFAULT_GFX_BACKEND CC_GFX_BACKEND_GL1
|
||||
#define DEFAULT_WIN_BACKEND CC_WIN_BACKEND_X11
|
||||
#elif defined __hpux
|
||||
#define CC_BUILD_HPUX
|
||||
#define CC_BUILD_POSIX
|
||||
#define DEFAULT_NET_BACKEND CC_NET_BACKEND_LIBCURL
|
||||
#define DEFAULT_AUD_BACKEND CC_AUD_BACKEND_OPENAL
|
||||
#define DEFAULT_GFX_BACKEND CC_GFX_BACKEND_GL1
|
||||
#define DEFAULT_WIN_BACKEND CC_WIN_BACKEND_X11
|
||||
#elif defined __FreeBSD__ || defined __DragonFly__
|
||||
#define CC_BUILD_FREEBSD
|
||||
#define CC_BUILD_POSIX
|
||||
|
|
|
@ -175,7 +175,7 @@ cc_uint64 Stopwatch_ElapsedMicroseconds(cc_uint64 beg, cc_uint64 end) {
|
|||
/* "... These functions are part of the Timers option and need not be available on all implementations..." */
|
||||
cc_uint64 Stopwatch_Measure(void) {
|
||||
struct timespec t;
|
||||
#ifdef CC_BUILD_IRIX
|
||||
#if defined CC_BUILD_IRIX || defined CC_BUILD_HPUX
|
||||
clock_gettime(CLOCK_REALTIME, &t);
|
||||
#else
|
||||
/* TODO: CLOCK_MONOTONIC_RAW ?? */
|
||||
|
@ -247,7 +247,7 @@ cc_result Directory_Enum(const cc_string* dirPath, void* obj, Directory_EnumCall
|
|||
len = String_Length(src);
|
||||
String_AppendUtf8(&path, src, len);
|
||||
|
||||
#if defined CC_BUILD_HAIKU || defined CC_BUILD_SOLARIS || defined CC_BUILD_IRIX || defined CC_BUILD_BEOS
|
||||
#if defined CC_BUILD_HAIKU || defined CC_BUILD_SOLARIS || defined CC_BUILD_HPUX || defined CC_BUILD_IRIX || defined CC_BUILD_BEOS
|
||||
{
|
||||
char full_path[NATIVE_STR_LEN];
|
||||
struct stat sb;
|
||||
|
@ -996,7 +996,7 @@ static cc_result Process_RawGetExePath(char* path, int* len) {
|
|||
Mem_Copy(path, info.name, *len);
|
||||
return 0;
|
||||
}
|
||||
#elif defined CC_BUILD_IRIX
|
||||
#elif defined CC_BUILD_IRIX || defined CC_BUILD_HPUX
|
||||
static cc_result Process_RawGetExePath(char* path, int* len) {
|
||||
static cc_string file = String_FromConst("ClassiCube");
|
||||
|
||||
|
@ -1235,7 +1235,7 @@ static void Platform_InitPosix(void) {
|
|||
}
|
||||
void Platform_Free(void) { }
|
||||
|
||||
#ifdef CC_BUILD_IRIX
|
||||
#if defined CC_BUILD_IRIX || defined CC_BUILD_HPUX
|
||||
cc_bool Platform_DescribeError(cc_result res, cc_string* dst) {
|
||||
const char* err = strerror(res);
|
||||
if (!err || res >= 1000) return false;
|
||||
|
|
|
@ -54,6 +54,9 @@
|
|||
/* XIM support based off details described in */
|
||||
/* https://tedyin.com/posts/a-brief-intro-to-linux-input-method-framework/ */
|
||||
#endif
|
||||
#ifdef CC_BUILD_HPUX
|
||||
#undef CC_BUILD_XIM
|
||||
#endif
|
||||
|
||||
#define _NET_WM_STATE_REMOVE 0
|
||||
#define _NET_WM_STATE_ADD 1
|
||||
|
|
Loading…
Reference in a new issue