-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
91 lines (65 loc) · 1.71 KB
/
Makefile
File metadata and controls
91 lines (65 loc) · 1.71 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#
# Makefile
#
# This is the top-level dx Makefile. All full product builds start here.
#
# See Makefile.dx for the list of customizations + required environment
#
# Include the default definitions + configuration
include Makefile.dx
#
# Top-level directories that may be built
#
ROOT_SUBDIRS := doc media src
#
# Cannot build any media images until the source tree is built
#
media: src
#
# By default, build the entire tree: source, documentation, everything
#
.PHONY: all
all: $(ROOT_SUBDIRS)
#
# Build the child subdirectories individually
#
PARALLEL_JOBS := $(shell grep -c processor /proc/cpuinfo)
.PHONY: $(ROOT_SUBDIRS)
$(ROOT_SUBDIRS):
@./configure --check
@$(MAKE) -C $@ -j $(PARALLEL_JOBS) -l $(PARALLEL_JOBS) all
#
# Clean the source tree. Leave "configure" output and external sources.
#
.PHONY: clean
clean:
@./configure --check
@echo Cleaning top-level tree ...
@for dir in $(ROOT_SUBDIRS); do \
$(MAKE) -C $$dir clean; \
done
#
# Full clean. Clean the source tree. Delete "configure" output. Delete
# external/third-party sources.
#
.PHONY: distclean
distclean: clean
@$(MAKE) -C src/lib $@
@rm -f $(DX_ARCHIVE_FILE)
@./configure --distclean
#
# Display a brief help message listing targets + options
#
.PHONY: help
help:
@echo
@echo "Building the dx operating system --"
@echo "* \"make all\" builds the entire tree"
@echo "* \"make clean\" cleans the source tree"
@echo "* \"make distclean\" cleans the source tree, config files"
@echo "* \"make doc\" builds the doxygen (HTML) documentation"
@echo "* \"make help\" displays this message"
@echo "* \"make src\" builds the source tree"
@echo
@echo "Add \"DEBUG=1\" to generate a debug build, e.g., \"make all DEBUG=1\""
@echo