Browse Source

Review examples makefile for RPI

pull/132/head
raysan5 8 years ago
parent
commit
e977915577
1 changed files with 31 additions and 22 deletions
  1. +31
    -22
      examples/Makefile

+ 31
- 22
examples/Makefile View File

@ -78,44 +78,38 @@ endif
#CFLAGSEXTRA = -Wextra -Wmissing-prototypes -Wstrict-prototypes
# define any directories containing required header files
INCLUDES = -I. -I../src -I../src/external
ifeq ($(PLATFORM),PLATFORM_RPI)
INCLUDES = -I. -I../../src -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads
INCLUDES += -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads
endif
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
# add standard directories for GNU/Linux
ifeq ($(PLATFORM_OS),LINUX)
INCLUDES = -I. -I../src -I/usr/local/include/raylib/
else ifeq ($(PLATFORM_OS),OSX)
INCLUDES = -I. -I../src
else
INCLUDES = -I. -I../../src -IC:/raylib/raylib/src
INCLUDES += -I/usr/local/include/raylib/
else ifeq ($(PLATFORM_OS),WINDOWS)
# external libraries headers
# GLFW3
INCLUDES += -I../../external/glfw3/include
INCLUDES += -I../src/external/glfw3/include
# OpenAL Soft
INCLUDES += -I../../external/openal_soft/include
INCLUDES += -I../src/external/openal_soft/include
endif
endif
# define library paths containing required libs
LFLAGS = -L. -L../src
ifeq ($(PLATFORM),PLATFORM_RPI)
LFLAGS = -L. -L../../src -L/opt/vc/lib
LFLAGS += -L/opt/vc/lib
endif
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
# add standard directories for GNU/Linux
ifeq ($(PLATFORM_OS),LINUX)
LFLAGS = -L. -L../../src
else ifeq ($(PLATFORM_OS),OSX)
LFLAGS = -L. -L../src
else
LFLAGS = -L. -L../../src -LC:/raylib/raylib/src
ifeq ($(PLATFORM_OS),WINDOWS)
# external libraries to link with
# GLFW3
LFLAGS += -L../../external/glfw3/lib/$(LIBPATH)
ifneq ($(PLATFORM_OS),OSX)
LFLAGS += -L../src/external/glfw3/lib/$(LIBPATH)
# OpenAL Soft
LFLAGS += -L../../external/openal_soft/lib/$(LIBPATH)
endif
LFLAGS += -L../src/external/openal_soft/lib/$(LIBPATH)
endif
endif
@ -148,7 +142,7 @@ ifeq ($(PLATFORM),PLATFORM_RPI)
endif
ifeq ($(PLATFORM),PLATFORM_WEB)
# just adjust the correct path to libraylib.bc
LIBS = ../src/libraylib.bc
LIBS = ../release/html5/libraylib.bc
endif
# define additional parameters and flags for windows
@ -178,6 +172,8 @@ EXAMPLES = \
core_3d_picking \
core_3d_camera_free \
core_3d_camera_first_person \
core_2d_camera \
core_oculus_rift \
shapes_logo_raylib \
shapes_basic_shapes \
shapes_colors_palette \
@ -208,6 +204,7 @@ EXAMPLES = \
shaders_shapes_textures \
shaders_custom_uniform \
shaders_postprocessing \
shaders_standard_lighting \
audio_sound_loading \
audio_music_stream \
fix_dylib \
@ -287,7 +284,15 @@ core_3d_camera_free: core_3d_camera_free.c
# compile [core] example - 3d camera first person
core_3d_camera_first_person: core_3d_camera_first_person.c
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS)
# compile [core] example - 2d camera
core_2d_camera: core_2d_camera.c
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS)
# compile [core] example - oculus rift
core_oculus_rift: core_oculus_rift.c
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS)
# compile [shapes] example - raylib logo (with basic shapes)
shapes_logo_raylib: shapes_logo_raylib.c
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS)
@ -411,7 +416,11 @@ shaders_custom_uniform: shaders_custom_uniform.c
# compile [shaders] example - postprocessing shader
shaders_postprocessing: shaders_postprocessing.c
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS)
# compile [shaders] example - standard lighting
shaders_standard_lighting: shaders_standard_lighting.c
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS)
# compile [audio] example - sound loading and playing (WAV and OGG)
audio_sound_loading: audio_sound_loading.c
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS)

Loading…
Cancel
Save