summaryrefslogtreecommitdiffhomepage
path: root/examples
diff options
context:
space:
mode:
authorRay <[email protected]>2020-01-30 13:47:39 +0100
committerRay <[email protected]>2020-01-30 13:47:39 +0100
commit9ce2331cc19082134441adb0610b9cce5a84e13f (patch)
tree28da50216078c9b8038874738b1264255f3d0278 /examples
parentcacd4a9d90d6f6dcafc3b32c9f77aa2aa9b4b2b7 (diff)
downloadraylib-9ce2331cc19082134441adb0610b9cce5a84e13f.tar.gz
raylib-9ce2331cc19082134441adb0610b9cce5a84e13f.zip
[build] Makefile examples modularization
Now examples can be compiled by module, that's useful when compilation fails at some point
Diffstat (limited to 'examples')
-rw-r--r--examples/Makefile41
-rw-r--r--examples/text/text_font_spritefont.c2
2 files changed, 33 insertions, 10 deletions
diff --git a/examples/Makefile b/examples/Makefile
index d57304b8..536922d0 100644
--- a/examples/Makefile
+++ b/examples/Makefile
@@ -350,7 +350,7 @@ ifeq ($(PLATFORM),PLATFORM_WEB)
endif
# Define all object files required
-EXAMPLES = \
+CORE = \
core/core_basic_window \
core/core_input_keys \
core/core_input_mouse \
@@ -372,7 +372,9 @@ EXAMPLES = \
core/core_scissor_test \
core/core_storage_values \
core/core_vr_simulator \
- core/core_loading_thread \
+ core/core_loading_thread
+
+SHAPES = \
shapes/shapes_basic_shapes \
shapes/shapes_bouncing_ball \
shapes/shapes_colors_palette \
@@ -387,7 +389,9 @@ EXAMPLES = \
shapes/shapes_easings_rectangle_array \
shapes/shapes_draw_ring \
shapes/shapes_draw_circle_sector \
- shapes/shapes_draw_rectangle_rounded \
+ shapes/shapes_draw_rectangle_rounded
+
+TEXTURES = \
textures/textures_logo_raylib \
textures/textures_mouse_painting \
textures/textures_rectangle \
@@ -404,7 +408,9 @@ EXAMPLES = \
textures/textures_background_scrolling \
textures/textures_sprite_button \
textures/textures_sprite_explosion \
- textures/textures_bunnymark \
+ textures/textures_bunnymark
+
+TEXT = \
text/text_raylib_fonts \
text/text_font_spritefont \
text/text_font_loading \
@@ -414,7 +420,9 @@ EXAMPLES = \
text/text_input_box \
text/text_writing_anim \
text/text_rectangle_bounds \
- text/text_unicode \
+ text/text_unicode
+
+MODELS = \
models/models_animation \
models/models_billboard \
models/models_box_collisions \
@@ -430,7 +438,9 @@ EXAMPLES = \
models/models_skybox \
models/models_yaw_pitch_roll \
models/models_heightmap \
- models/models_waving_cubes \
+ models/models_waving_cubes
+
+SHADERS = \
shaders/shaders_model_shader \
shaders/shaders_shapes_textures \
shaders/shaders_custom_uniform \
@@ -443,12 +453,16 @@ EXAMPLES = \
shaders/shaders_eratosthenes \
shaders/shaders_basic_lighting \
shaders/shaders_fog \
- shaders/shaders_simple_mask \
+ shaders/shaders_simple_mask
+
+AUDIO = \
audio/audio_module_playing \
audio/audio_music_stream \
audio/audio_raw_stream \
audio/audio_sound_loading \
- audio/audio_multichannel_sound \
+ audio/audio_multichannel_sound
+
+PHYSICS = \
physics/physics_demo \
physics/physics_friction \
physics/physics_movement \
@@ -459,7 +473,16 @@ EXAMPLES = \
CURRENT_MAKEFILE = $(lastword $(MAKEFILE_LIST))
# Default target entry
-all: $(EXAMPLES)
+all: $(CORE) $(SHAPES) $(TEXT) $(TEXTURES) $(MODELS) $(SHADERS) $(AUDIO) $(PHYSICS)
+
+core: $(CORE)
+shapes: $(SHAPES)
+text: $(TEXT)
+textures: $(TEXTURES)
+models: $(MODELS)
+shaders: $(SHADERS)
+audio: $(AUDIO)
+physics: $(PHYSICS)
# Generic compilation pattern
# NOTE: Examples must be ready for Android compilation!
diff --git a/examples/text/text_font_spritefont.c b/examples/text/text_font_spritefont.c
index dff2b47a..4a62c718 100644
--- a/examples/text/text_font_spritefont.c
+++ b/examples/text/text_font_spritefont.c
@@ -78,7 +78,7 @@ int main(void)
UnloadFont(font2); // Font unloading
UnloadFont(font3); // Font unloading
- CloseWindow(); // Close window and OpenGL context
+ CloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------
return 0;