-
Notifications
You must be signed in to change notification settings - Fork 12
/
Makefile
58 lines (46 loc) · 1.27 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
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileContributor: Antonio Niño Díaz, 2023
.PHONY: all clean examples install libs sys templates tests tools
all: libs sys tools
CP := cp
INSTALL := install
MAKE := make
RM := rm -rf
examples:
+$(MAKE) -C examples
# libnds depends on grit and bin2c
libs: tools
+$(MAKE) -C libs
# The default ARM7 depends on some libraries
sys: libs
+$(MAKE) -C sys
templates:
+$(MAKE) -C templates
tests:
+$(MAKE) -C tests
tools:
+$(MAKE) -C tools
# Default installation path of BlocksDS core components
INSTALLDIR ?= /opt/blocksds/core/
INSTALLDIR_ABS := $(abspath $(INSTALLDIR))
install: all
@echo " INSTALL $(INSTALLDIR_ABS)"
@test $(INSTALLDIR_ABS)
$(RM) $(INSTALLDIR_ABS)
$(INSTALL) -d $(INSTALLDIR_ABS)
+$(MAKE) -C libs install INSTALLDIR=$(INSTALLDIR_ABS)/libs
+$(MAKE) -C sys install INSTALLDIR=$(INSTALLDIR_ABS)/sys
+$(MAKE) -C tools install INSTALLDIR=$(INSTALLDIR_ABS)/tools
+$(CP) -r sys/cmake $(INSTALLDIR_ABS)/cmake
+$(CP) -r licenses $(INSTALLDIR_ABS)
@if [ `git rev-parse HEAD 2> /dev/null` ]; then \
git rev-parse HEAD > $(INSTALLDIR)/version.txt ; \
fi
clean:
+$(MAKE) -C examples clean
+$(MAKE) -C libs clean
+$(MAKE) -C sys clean
+$(MAKE) -C tests clean
+$(MAKE) -C templates clean
+$(MAKE) -C tools clean