From e9be2ba20c4a8126c1ebdcff8fd21e06ced7a457 Mon Sep 17 00:00:00 2001 From: Prince Frizzy Date: Mon, 19 May 2025 15:38:58 -0400 Subject: [PATCH] [build] Try to fix more compile errors --- Makefile | 4 +++- src/pc/game_main.h | 6 ++++++ src/pc/nx_main.h | 6 ------ src/pc/pc_main.h | 6 ------ 4 files changed, 9 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index cccb684ed..c08f3d3e8 100644 --- a/Makefile +++ b/Makefile @@ -1121,7 +1121,9 @@ endif CFLAGS += -fPIE # Generate a map file -LDFLAGS += -Wl,-Map $(MAP) +ifeq ($(OSX_BUILD),0) + LDFLAGS += -Wl,-Map $(MAP) +endif # Prevent a crash with -sopt export LANG := C diff --git a/src/pc/game_main.h b/src/pc/game_main.h index 38f7d42b2..2c084bb20 100644 --- a/src/pc/game_main.h +++ b/src/pc/game_main.h @@ -11,6 +11,12 @@ extern "C" { #define AT_STARTUP __attribute__((constructor)) +#ifdef GIT_HASH +#define TITLE ({ char title[96] = ""; snprintf(title, 96, "%s %s, [%s]", WINDOW_NAME, get_version(), GIT_HASH); title; }) +#else +#define TITLE ({ char title[96] = ""; snprintf(title, 96, "%s %s", WINDOW_NAME, get_version()); title; }) +#endif + extern bool gGameInited; extern bool gGfxInited; diff --git a/src/pc/nx_main.h b/src/pc/nx_main.h index cca4b81e3..9fc131a43 100644 --- a/src/pc/nx_main.h +++ b/src/pc/nx_main.h @@ -27,12 +27,6 @@ extern struct GfxWindowManagerAPI *wm_api; void nx_init(void); void nx_cleanup(void); -#ifdef GIT_HASH -#define TITLE ({ char title[96] = ""; snprintf(title, 96, "%s %s, [%s]", WINDOW_NAME, get_version(), GIT_HASH); title; }) -#else -#define TITLE ({ char title[96] = ""; snprintf(title, 96, "%s %s", WINDOW_NAME, get_version()); title; }) -#endif - #ifdef __cplusplus } #endif diff --git a/src/pc/pc_main.h b/src/pc/pc_main.h index 3952e6ae4..2c81129bd 100644 --- a/src/pc/pc_main.h +++ b/src/pc/pc_main.h @@ -55,12 +55,6 @@ extern "C" { #define RAPI_NAME "Dummy" #endif -#ifdef GIT_HASH -#define TITLE ({ char title[96] = ""; snprintf(title, 96, "%s %s, [%s]", WINDOW_NAME, get_version(), GIT_HASH); title; }) -#else -#define TITLE ({ char title[96] = ""; snprintf(title, 96, "%s %s", WINDOW_NAME, get_version()); title; }) -#endif - #ifdef __cplusplus } #endif