-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
34 lines (25 loc) · 706 Bytes
/
Makefile
File metadata and controls
34 lines (25 loc) · 706 Bytes
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
MAKEFLAGS += --no-print-directory
UTILS_DIR := utils
UTIL_MODULES := \
$(UTILS_DIR)/ines/header \
$(UTILS_DIR)/ines/inspect \
$(UTILS_DIR)/chr/colors \
$(UTILS_DIR)/chr/convert
.DEFAULT_GOAL := all
.PHONY: all build test clean
all: $(addprefix all-,$(UTIL_MODULES))
build: $(addprefix build-,$(UTIL_MODULES))
test: $(addprefix test-,$(UTIL_MODULES))
clean: $(addprefix clean-,$(UTIL_MODULES))
define MODULE_RULES
.PHONY: all-$(1) build-$(1) test-$(1) clean-$(1)
all-$(1):
@$$(MAKE) -C "$(1)" all
build-$(1):
@$$(MAKE) -C "$(1)" build
test-$(1):
@$$(MAKE) -C "$(1)" test
clean-$(1):
@$$(MAKE) -C "$(1)" clean
endef
$(foreach m,$(UTIL_MODULES),$(eval $(call MODULE_RULES,$(m))))