From 31934ac374d0e7ca90037794ed3057c6e84e4c8a Mon Sep 17 00:00:00 2001 From: David Gallardo Date: Thu, 8 Jan 2015 22:09:29 +0100 Subject: [PATCH] Improved support for mac. Reference to libglfw dylib fixed --- examples/makefile | 20 +++++++++++++++----- external/glfw3/lib/osx/libglfw.3.0.dylib | Bin 127856 -> 127856 bytes 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/examples/makefile b/examples/makefile index 500ba715..b4d7bfa3 100644 --- a/examples/makefile +++ b/examples/makefile @@ -99,10 +99,12 @@ else # external libraries to link with # GLFW3 LFLAGS += -L../external/glfw3/lib/$(LIBPATH) -# GLEW - LFLAGS += -L../external/openal_soft/lib/$(LIBPATH) -# OpenAL Soft - LFLAGS += -L../external/glew/lib/$(LIBPATH) + ifneq ($(PLATFORM_OS),OSX) + # OpenAL Soft + LFLAGS += -L../external/openal_soft/lib/$(LIBPATH) + # GLEW + LFLAGS += -L../external/glew/lib/$(LIBPATH) + endif endif # define any libraries to link into executable @@ -177,6 +179,8 @@ EXAMPLES = \ models_cubicmap \ audio_sound_loading \ audio_music_stream \ + fix_dylib \ + #core_input_gamepad \ @@ -309,11 +313,17 @@ audio_sound_loading: audio_sound_loading.c audio_music_stream: audio_music_stream.c $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) +# fix dylib install path name for each executable (MAC) +fix_dylib: +ifeq ($(PLATFORM_OS),OSX) + find . -type f -perm +ugo+x -print0 | xargs -t -0 -R 1 -I file install_name_tool -change libglfw.3.0.dylib ../external/glfw3/lib/osx/libglfw.3.0.dylib file +endif + # clean everything clean: ifeq ($(PLATFORM),PLATFORM_DESKTOP) ifeq ($(PLATFORM_OS),OSX) - find . -type f -perm +ugo+x -delete + find . -type f -perm +ugo+x -delete rm -f *.o else ifeq ($(PLATFORM_OS),LINUX) diff --git a/external/glfw3/lib/osx/libglfw.3.0.dylib b/external/glfw3/lib/osx/libglfw.3.0.dylib index 963d716d127232cb0f65aeee06c70e6fa92d5739..15674573ccc9efbce8df1b54042dca0604158db2 100644 GIT binary patch delta 73 zcmezHjQzti_6Z`478^ykb7&YaFfd2}F(VK&FffC0PG(YiPFlI1v7UimN+pm76y2=C VnPW700k1*x1ncb+tQj9{2LP-26Vd2nb3`OCFfd2}F(VK&FffC$erR!OQL%neVo737VrF)teo$&b zesN|=eov3_brNorAEVvc@#PFlIKeokf*41)ypjP+6~fnuA#aO4;@Pq5xT!J6^G Fb^s`_CsP0b