-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
72 lines (56 loc) · 1.57 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
65
66
67
68
69
70
71
72
#
# Toplevel makefile for OS/161.
#
#
# Main rules:
# all (default): depend and compile system; install into staging area
# rebuild: likewise, but start with a clean slate.
# fullrebuild: likewise, but start with a very clean slate.
#
# What all does, in order:
# tools: depend and compile the tools used in build.
# includes: install header files.
# build: depend and compile the system.
#
# Other targets:
# depend: just update make dependency information.
# tags: generate/regenerate "tags" files.
# install: install into $(OSTREE).
# clean: remove generated files.
# distclean: remove all generated files.
#
TOP=.
.include "$(TOP)/mk/os161.config.mk"
all:; # make this first
MKDIRS=$(OSTREE)
.include "$(TOP)/mk/os161.mkdirs.mk"
all: tools .WAIT includes .WAIT build
rebuild:
$(MAKE) clean
$(MAKE) all
fullrebuild:
$(MAKE) distclean
$(MAKE) all
# currently no tools required, hence no tools/ dir or work to do
tools:
@true
build:
(cd userland && $(MAKE) build)
(cd man && $(MAKE) install-staging)
(cd testscripts && $(MAKE) build)
includes tags depend:
(cd kern && $(MAKE) $@)
(cd userland && $(MAKE) $@)
clean:
(cd kern && $(MAKE) $@)
(cd userland && $(MAKE) $@)
rm -rf $(INSTALLTOP)
distclean: clean
rm -rf $(WORKDIR)
install: $(OSTREE)
(cd $(INSTALLTOP) && tar -cf - .) | (cd $(OSTREE) && tar -xvf -)
.PHONY: all rebuild fullrebuild tools build includes tags depend
.PHONY: clean distclean
# old BSD name, same as distclean
cleandir: distclean
.PHONY: cleandir