diff --git a/.gitignore b/.gitignore index 0caa3e08..6f09a7e9 100644 --- a/.gitignore +++ b/.gitignore @@ -78,3 +78,6 @@ sm64config.txt !/sound/**/*custom*/**/*.aiff !/assets/**/*custom*.bin !/assets/**/*custom*/**/*.bin + +# macOS bullcrap directory settings file thats autocreated +.DS_Store diff --git a/Makefile b/Makefile index 9ab49a3b..3ea2541a 100644 --- a/Makefile +++ b/Makefile @@ -532,7 +532,12 @@ else ifeq ($(SDL1_USED),1) endif ifneq ($(SDL1_USED)$(SDL2_USED),00) - BACKEND_CFLAGS += `$(SDLCONFIG) --cflags` + ifeq ($(OSX_BUILD),1) + MAC_PREFIX := `$(SDLCONFIG) --prefix` + BACKEND_CFLAGS +=-I$(MAC_PREFIX)/include `$(SDLCONFIG) --cflags` # macOS homebrew SDL2 has the config laid out differently so this makes it point to the correct folder + a failsafe for if it ever changes for some reason in the future. + else + BACKEND_CFLAGS += `$(SDLCONFIG) --cflags` + endif ifeq ($(WINDOWS_BUILD),1) BACKEND_LDFLAGS += `$(SDLCONFIG) --static-libs` -lsetupapi -luser32 -limm32 -lole32 -loleaut32 -lshell32 -lwinmm -lversion else diff --git a/tools/aiff_extract_codebook.c b/tools/aiff_extract_codebook.c index 481e3133..6570fa59 100644 --- a/tools/aiff_extract_codebook.c +++ b/tools/aiff_extract_codebook.c @@ -26,6 +26,11 @@ typedef unsigned int u32; #define NORETURN __attribute__((noreturn)) #define UNUSED __attribute__((unused)) +#ifdef __APPLE__ +// even with -std=gnu99 vsnprintf seems to not be defined in stdio.h, why? +extern int vsnprintf(char * __restrict, size_t, const char * __restrict, va_list); +#endif + typedef struct { u32 start;