-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
131 lines (112 loc) · 3.73 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
# Master Makefile to compile everything in /usr/src except the system.
.include <bsd.own.mk>
MAKE=make
usage:
@echo ""
@echo "Master Makefile for MINIX commands and utilities."
@echo "Root privileges are required for some actions."
@echo ""
@echo "Usage:"
@echo " make world # Compile everything (libraries & commands)"
@echo " make includes # Install include files from src/"
@echo " make libraries # Compile and install libraries (ack)"
.ifdef MINIX_GENERATE_ELF
@echo " make elf-libraries # Compile and install gcc/clang elf libs"
.endif
@echo " make commands # Compile all, commands, but don't install"
@echo " make install # Compile and install commands"
@echo " make depend # Generate required .depend files"
@echo " make gnu-includes # Install include files for GCC"
.ifndef MINIX_GENERATE_ELF
@echo " make gnu-libraries # Compile and install libraries for GCC"
@echo " make clang-libraries # Compile and install libraries for GCC with clang"
.endif
@echo " make clean # Remove all compiler results"
@echo ""
@echo "Run 'make' in tools/ to create a new MINIX configuration."
@echo ""
# world has to be able to make a new system, even if there
# is no complete old system. it has to install commands, for which
# it has to install libraries, for which it has to install includes,
# for which it has to install /etc (for users and ownerships).
# etcfiles also creates a directory hierarchy in its
# 'make install' target.
#
# etcfiles has to be done first.
.ifdef MINIX_GENERATE_ELF
world: mkfiles includes depend libraries elf-libraries install etcforce
.else
.if ${COMPILER_TYPE} == "ack"
world: mkfiles includes depend libraries install etcforce
.elif ${COMPILER_TYPE} == "gnu"
.if ${OBJECT_FMT} == "a.out"
world: mkfiles includes depend gnu-libraries install etcforce
.elif ${OBJECT_FMT} == "ELF"
world: mkfiles elf-includes depend elf-libraries install etcforce
.endif
.endif
.endif
mkfiles:
make -C share/mk install
includes:
$(MAKE) -C nbsd_include includes
$(MAKE) -C include includes
$(MAKE) -C lib includes
libraries: includes
$(MAKE) -C lib build_ack
MKHEADERS411=/usr/gnu/libexec/gcc/i386-pc-minix/4.1.1/install-tools/mkheaders
MKHEADERS443=/usr/gnu/libexec/gcc/i686-pc-minix/4.4.3/install-tools/mkheaders
MKHEADERS443_PKGSRC=/usr/pkg/gcc44/libexec/gcc/i686-pc-minix/4.4.3/install-tools/mkheaders
gnu-includes: includes
SHELL=/bin/sh; if [ -f $(MKHEADERS411) ] ; then sh -e $(MKHEADERS411) ; fi
SHELL=/bin/sh; if [ -f $(MKHEADERS443) ] ; then sh -e $(MKHEADERS443) ; fi
SHELL=/bin/sh; if [ -f $(MKHEADERS443_PKGSRC) ] ; then sh -e $(MKHEADERS443_PKGSRC) ; fi
.ifndef MINIX_GENERATE_ELF
gnu-libraries: includes #gnu-includes
$(MAKE) -C lib build_gnu
clang-libraries: includes
$(MAKE) -C lib build_clang
.endif
.ifdef MINIX_GENERATE_ELF
elf-libraries:
$(MAKE) -C lib build_elf_base
.else
elf-libraries: elf-includes
$(MAKE) -C lib build_elf
.endif
commands: includes libraries
$(MAKE) -C commands all
depend:
$(MAKE) CC=cc -C boot depend
$(MAKE) -C commands depend
$(MAKE) -C kernel depend
$(MAKE) -C servers depend
$(MAKE) -C drivers depend
etcfiles:
$(MAKE) -C etc install
etcforce:
$(MAKE) -C etc installforce
all:
$(MAKE) CC=cc -C boot all
$(MAKE) -C commands all
$(MAKE) -C tools all
install:
$(MAKE) CC=cc -C boot install
$(MAKE) -C man install makedb
$(MAKE) -C commands install
$(MAKE) -C share install
$(MAKE) -C tools install
clean:
$(MAKE) -C boot clean
$(MAKE) -C commands clean
$(MAKE) -C tools clean
$(MAKE) -C lib clean_gnu
$(MAKE) -C lib clean_ack
$(MAKE) -C lib clean_elf_base
$(MAKE) -C lib clean_elf
$(MAKE) -C lib clean_clang
$(MAKE) -C test clean
cleandepend:
$(MAKE) -C boot cleandepend
$(MAKE) -C commands cleandepend
$(MAKE) -C tools cleandepend