cleaned up ifdefs and comments

This commit is contained in:
alex 2020-11-11 03:50:00 -08:00
parent eb842f4acf
commit 8e4a7b79db
3 changed files with 12 additions and 3 deletions

View File

@ -574,7 +574,6 @@ ifeq ($(WINDOW_API),DXGI)
endif
BACKEND_LDFLAGS += -ld3dcompiler -ldxgi -ldxguid
BACKEND_LDFLAGS += -lsetupapi -ldinput8 -luser32 -lgdi32 -limm32 -lole32 -loleaut32 -lshell32 -lwinmm -lversion -luuid -static
# This isn't actually searched for includes on Leopard, and sdl-config is one directory too deep
else ifeq ($(WINDOW_API),SDL2)
ifeq ($(WINDOWS_BUILD),1)
BACKEND_LDFLAGS += -lglew32 -lglu32 -lopengl32
@ -598,7 +597,11 @@ endif
# SDL can be used by different systems, so we consolidate all of that shit into this
ifeq ($(SDL_USED),2)
ifeq ($(PPC_OSX_BUILD),1)
BACKEND_CFLAGS += -DHAVE_SDL2=1 `$(SDLCONFIG) --cflags` -I/usr/local/include
else
BACKEND_CFLAGS += -DHAVE_SDL2=1 `$(SDLCONFIG) --cflags`
endif
ifeq ($(WINDOWS_BUILD),1)
BACKEND_LDFLAGS += `$(SDLCONFIG) --static-libs` -lsetupapi -luser32 -limm32 -lole32 -loleaut32 -lshell32 -lwinmm -lversion
else
@ -705,7 +708,7 @@ else ifeq ($(TARGET_RPI),1)
else ifeq ($(OSX_BUILD),1)
LDFLAGS := -lm $(BACKEND_LDFLAGS) -no-pie -lpthread
# Flag -no-pie not available in MacPorts GCC 4.9
# Flag -no-pie not available in MacPorts GCC 4.9, and most likely is not neccesary anyways according to https://opensource.apple.com/source/ld64/ld64-134.9/ld64-134.9/doc/man/man1/ld.1.auto.html
else ifeq ($(PPC_OSX_BUILD),1)
LDFLAGS := -lm $(BACKEND_LDFLAGS) -lpthread
else

View File

@ -1,7 +1,10 @@
#ifdef RAPI_GL
#include <stdint.h>
#include <stdbool.h>
// stdbool.h can not be defined (and does not need to be defined) on the below platform
#if !defined(__APPLE__) && !defined(__BIG_ENDIAN__) && !defined(__GNU__C)
#include <stdbool.h> #include <stdbool.h>
#endif
#ifndef _LANGUAGE_C
# define _LANGUAGE_C

View File

@ -620,7 +620,10 @@ extern "C" {
#define __attribute__(x)
#endif
// This function can not be found by MacPorts GCC 4.9 and needs to be explicitly stated
#if defined(__APPLE__) && defined(__BIG_ENDIAN__) && defined(__GNU__C)
extern long long int llrint ( double x );
#endif
void _af_error (int errorCode, const char *fmt, ...)
__attribute__((format(printf, 2, 3)));