Fix OS X build, use system OpenAL, builds with clang now

This commit is contained in:
Milan Nikolic 2017-01-31 13:15:46 +01:00
parent 3849082a41
commit e56840b91e
4 changed files with 15 additions and 14 deletions

View file

@ -59,10 +59,15 @@
#include "utils.h" // Required for: fopen() Android mapping, TraceLog()
#endif
#include "AL/al.h" // OpenAL basic header
#include "AL/alc.h" // OpenAL context header (like OpenGL, OpenAL requires a context to work)
//#include "AL/alext.h" // OpenAL extensions header, required for AL_EXT_FLOAT32 and AL_EXT_MCFORMATS
#ifdef __APPLE__
#include "OpenAL/al.h" // OpenAL basic header
#include "OpenAL/alc.h" // OpenAL context header (like OpenGL, OpenAL requires a context to work)
#else
#include "AL/al.h" // OpenAL basic header
#include "AL/alc.h" // OpenAL context header (like OpenGL, OpenAL requires a context to work)
#endif
//#include "AL/alext.h" // OpenAL extensions header, required for AL_EXT_FLOAT32 and AL_EXT_MCFORMATS
// OpenAL extension: AL_EXT_FLOAT32 - Support for 32bit float samples
// OpenAL extension: AL_EXT_MCFORMATS - Support for multi-channel formats (Quad, 5.1, 6.1, 7.1)
@ -1227,4 +1232,4 @@ void TraceLog(int msgType, const char *text, ...)
if (msgType == ERROR) exit(1); // If ERROR message, exit program
}
#endif
#endif

View file

@ -4,7 +4,7 @@ package raylib
#cgo linux,!arm LDFLAGS: -lglfw3 -lGL -lopenal -lm -pthread -ldl -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor
#cgo linux,arm,!android LDFLAGS: -lGLESv2 -lEGL -lpthread -lrt -lm -lbcm_host -lvcos -lvchiq_arm -lopenal
#cgo windows LDFLAGS: -lglfw3 -lopengl32 -lgdi32 -lopenal32 -lwinmm
#cgo darwin LDFLAGS: -lglfw3 -framework OpenGL -framework OpenAl -framework Cocoa
#cgo darwin LDFLAGS: -lglfw -framework OpenGL -framework OpenAL -framework Cocoa
#cgo android LDFLAGS: -llog -landroid -lEGL -lGLESv2 -lOpenSLES -lopenal -lm -landroid_native_app_glue
#cgo CFLAGS: -std=gnu99 -fgnu89-inline -Wno-missing-braces -Wno-unused-result

View file

@ -83,7 +83,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
//#include <stdbool.h>
@ -1592,4 +1592,4 @@ void jar_mod_seek_start(jar_mod_context_t * ctx)
//-------------------------------------------------------------------------------
#endif //end of header file
#endif //end of header file

View file

@ -296,13 +296,9 @@
//----------------------------------------------------------------------------------
#ifndef __cplusplus
// Boolean type
#ifndef __APPLE__
#if !defined(_STDBOOL_H)
typedef enum { false, true } bool;
#define _STDBOOL_H
#endif
#else
#include <stdbool.h>
#if !defined(_STDBOOL_H)
typedef enum { false, true } bool;
#define _STDBOOL_H
#endif
#endif