diff options
| author | Ray <raysan5@gmail.com> | 2015-01-10 11:56:10 +0100 |
|---|---|---|
| committer | Ray <raysan5@gmail.com> | 2015-01-10 11:56:10 +0100 |
| commit | 39fda7af8210aa6f55b8c499396d7f45f68f630f (patch) | |
| tree | afa8267d6222ad8887ec6b614cf40a3f6320eee8 /examples | |
| parent | d739895e4a8602034d7a65a3be0c90163dabb817 (diff) | |
| parent | 31934ac374d0e7ca90037794ed3057c6e84e4c8a (diff) | |
| download | raylib-39fda7af8210aa6f55b8c499396d7f45f68f630f.tar.gz raylib-39fda7af8210aa6f55b8c499396d7f45f68f630f.zip | |
Merge pull request #15 from Galloman/develop
Improved support for mac osx.
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/makefile | 20 |
1 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) |
