
# Makefile for GNU make

SUBDIRS = \
  01_vertex_program \
  02_vertex_and_fragment_program \
  03_uniform_parameter \
  04_varying_parameter \
  05_texture_sampling \
  06_vertex_twisting \
  07_two_texture_accesses \
  08_vertex_transform \
  09_vertex_lighting \
  10_fragment_lighting \
  11_two_lights_with_structs \
  12_light_attenuation \
  13_spotlight \
  14_bulge \
  15_particle_system \
  16_keyframe_interpolation \
  18_cube_map_reflection \
  19_cube_map_refraction \
  20_chromatic_dispersion \
  21_bump_map_wall \
  22_specular_bump_map \
  23_bump_map_floor \
  24_bump_map_torus \
  25_uniform_fog \
  26_toon_shading \
  27_projective_texturing \
  $(NULL)

define SPAWN_MAKE
	$(MAKE) -C $(1) -f Makefile $@

endef

.PHONY: all FORCE $(SUBDIRS)

all:
	$(foreach dir,$(SUBDIRS),$(call SPAWN_MAKE,$(dir)))

FORCE:

.DEFAULT:
	$(foreach dir,$(SUBDIRS),$(call SPAWN_MAKE,$(dir)))
