forked from capnramses/antons_opengl_tutorials_book
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_all_linux_osx.sh
executable file
·73 lines (69 loc) · 1.41 KB
/
build_all_linux_osx.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#!/bin/bash
# any error code causes script to exit with error code
set -e
## determine if should use 64-bit or 32-bit makefiles
ARCH=`uname -m`
MAKEFILE="unknown"
if [[ "$OSTYPE" == "linux-gnu" ]]; then
#MAKEFILE=Makefile.linux32
if [ ${ARCH} == 'x86_64' ]; then
MAKEFILE=Makefile.linux64
fi
elif [[ "$OSTYPE" == "darwin"* ]]; then
MAKEFILE=Makefile.osx
fi
## list of all the demo folders
declare -a demo_folders=(
"00_hello_triangle"
"00_hello_triangle_gl2.1"
"01_extended_init"
"02_shaders"
"03_vertex_buffer_objects"
"04_mats_and_vecs"
"05_virtual_camera"
"06_vcam_with_quaternion"
"07_ray_picking"
"08_phong"
"09_texture_mapping"
"10_screen_capture"
"11_video_capture"
"12_debugging_shaders"
"13_mesh_import"
"14_multi_tex"
"15_phongtextures"
"16_frag_reject"
"17_alpha_blending"
"18_spotlights"
"19_fog"
"20_normal_mapping"
"21_cube_mapping"
"22_geom_shaders"
"23_tessellation_shaders"
"24_gui_panels"
"25_sprite_sheets"
"26_bitmap_fonts"
"27_font_atlas"
"28_uniform_buffer_object"
"29_particle_systems"
"30_skinning_part_one"
"31_skinning_part_two"
"32_skinning_part_three"
"33_extension_check"
"34_framebuffer_switch"
"35_image_kernel"
"36_colour_picking"
"37_deferred_shading"
"38_texture_shadows"
"39_texture_mapping_srgb"
"40_compute_shader"
"41_shader_hot_reload"
)
## call make inside each folder
for i in "${demo_folders[@]}" ; do
if [ -d "$i" ]; then
echo "$i"
cd $i
make -f $MAKEFILE
cd ..
fi
done