-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
55 lines (43 loc) · 1.12 KB
/
Copy pathMakefile
File metadata and controls
55 lines (43 loc) · 1.12 KB
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
PART_NUMS_SDL2 = 1 2 3 4 5 6 7 8
PART_NUMS_SDL3 = 1 2 3 4 5 6 7 8
ifeq ($(OS),Windows_NT)
all: sdl2 sdl3
else
all: sdl2
endif
sdl2:
@echo --------------------
@echo $@ compiling
@echo --------------------
$(foreach exdir,$(PART_NUMS_SDL2), $(call def_make_$@,part$(exdir),all))
sdl2_clean:
@echo --------------------
@echo SDL2 cleaning
@echo --------------------
$(foreach exdir,$(PART_NUMS_SDL2), $(call def_make_sdl2,part$(exdir),clean))
sdl3:
@echo
@echo
@echo --------------------
@echo $@ compiling
@echo --------------------
$(foreach exdir,$(PART_NUMS_SDL3), $(call def_make_$@,part$(exdir),all))
sdl3_clean:
@echo --------------------
@echo SDL3 cleaning
@echo --------------------
$(foreach exdir,$(PART_NUMS_SDL3), $(call def_make_sdl3,part$(exdir),clean))
ifeq ($(OS),Windows_NT)
clean: sdl2_clean sdl3_clean
else
clean: sdl2_clean
endif
define def_make_sdl2
@$(MAKE) -C tutorial/sdl2/$(1) $(2)
@$(MAKE) -C tutorial/sdl2/$(1) cleancache
endef
define def_make_sdl3
@$(MAKE) -C tutorial/sdl3/$(1) $(2)
@$(MAKE) -C tutorial/sdl3/$(1) cleancache
endef
MAKEFLAGS += --no-print-directory