-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
41 lines (32 loc) · 914 Bytes
/
Makefile
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
# All examples will be built at a time.
#
EXAMPLE_DIRS := \
examples/iconFontViewer \
examples/imPlotDemo \
examples/glfw_opengl3 \
examples/glfw_opengl3_implot \
examples/glfw_opengl3_jp \
examples/glfw_opengl3_image_load \
examples/sdl2_opengl3
ifeq ($(OS),Windows_NT)
EXAMPLE_DIRS += \
examples/sdl3_opengl3
endif
all:
zig version
$(foreach exdir,$(EXAMPLE_DIRS), $(call def_make,$(exdir),$@ ))
.PHONY: test clean gen cleanexe
test:
@echo $(notdir $(EXAMPLE_DIRS))
clean:
$(foreach exdir,$(EXAMPLE_DIRS), $(call def_make,$(exdir),cleanall ))
cleanexe:
$(foreach exdir,$(EXAMPLE_DIRS), $(call def_make,$(exdir),cleanexe ))
gen:
$(foreach exdir,$(EXAMPLE_DIRS), $(call def_make,$(exdir),$@ ))
#
define def_make
@echo ==== Enter: $(1)
@$(MAKE) -C $(1) $(2)
endef
MAKEFLAGS += --no-print-directory