forked from MrBean35000vr/netslug-wii
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
64 lines (49 loc) · 1.52 KB
/
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
###############################################################################
# Makefile
# by Alex Chadwick
#
# A makefile script for generation of all brainslug modules
###############################################################################
MODULES += console-gx
MODULES += console-sd
MODULES += gecko
MODULES += libfat
MODULES += libfat-sd
MODULES += libsd
MODULES += template
###############################################################################
# Parameters
# Used to suppress command echo.
Q ?= @
LOG ?= @echo $@
###############################################################################
# Rule to make everything.
PHONY += all
all: $(addsuffix _module,$(MODULES))
%_module:
$Q$(MAKE) -C $*
###############################################################################
# Install rule
# Rule to install bslug.
PHONY += install
install : $(addsuffix _module_install,$(MODULES))
%_module_install: $(BSLUGDIR)/modules
$(LOG)
$Qcp -r $* $(BSLUGDIR)/modules
$(BSLUGDIR)/modules:
-$Qmkdir $(BSLUGDIR)/modules
# Rule to install bslug.
PHONY += uninstall
uninstall :
$(LOG)
-$Qrm -rf $(BSLUGDIR)/modules
###############################################################################
# Clean rule
# Rule to clean files.
PHONY += clean
clean: $(addsuffix _module_clean,$(MODULES))
%_module_clean:
$Q$(MAKE) -C $* clean
###############################################################################
# Phony targets
.PHONY : $(PHONY)