Review examples makefile for RPI

This commit is contained in:
raysan5 2016-06-27 18:31:23 +02:00
parent 572936ec65
commit e977915577

View file

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