VM: munmap used by VM for itself is no longer used
[minix.git] / Makefile
blob2876be152f32407233be6b7cb773812944e845bb
1 # Master Makefile to compile everything in /usr/src except the system.
3 .include <bsd.own.mk>
5 MAKE?=make
7 usage:
8 @echo ""
9 @echo "Master Makefile for MINIX commands and utilities."
10 @echo "Root privileges are required for some actions."
11 @echo ""
12 @echo "Usage:"
13 @echo " make world # Compile everything (libraries & commands)"
14 @echo " make includes # Install include files from src/"
15 @echo " make libraries # Compile and install libraries"
16 @echo " make commands # Compile all, commands, but don't install"
17 @echo " make install # Compile and install commands"
18 @echo " make clean # Remove all compiler results"
19 @echo ""
20 @echo "Run 'make' in releasetools/ to create a new MINIX configuration."
21 @echo ""
23 # world has to be able to make a new system, even if there
24 # is no complete old system. it has to install commands, for which
25 # it has to install libraries, for which it has to install includes,
26 # for which it has to install /etc (for users and ownerships).
27 # etcfiles also creates a directory hierarchy in its
28 # 'make install' target.
31 # etcfiles has to be done first.
33 distribution: etcfiles includes mkfiles libraries do-libgcc .WAIT dep-all install etcforce
35 do-libgcc: .PHONY .MAKE
36 ${MAKEDIRTARGET} external/gpl3/gcc/lib/libgcc/libgcc all
37 ${MAKEDIRTARGET} external/gpl3/gcc/lib/libgcc/libgcc install
39 world: mkfiles etcfiles includes libraries dep-all install etcforce
41 # subdirs where userland utilities and other executables live
42 CMDSDIRS=commands bin sbin usr.bin usr.sbin libexec external
44 # subdirs where system stuff lives
45 SYSDIRS=sys kernel servers drivers
47 # combination
48 CMDSYSDIRS=$(CMDSDIRS) $(SYSDIRS)
50 etcfiles: .PHONY .MAKE
51 ${MAKEDIRTARGET} etc install
53 etcforce: .PHONY .MAKE
54 ${MAKEDIRTARGET} etc installforce
56 mkfiles: .PHONY .MAKE
57 ${MAKEDIRTARGET} share/mk install
59 includes: .PHONY .MAKE
60 ${MAKEDIRTARGET} include includes
61 ${INSTALL_DIR} ${DESTDIR}/usr/include/g++
62 ${MAKEDIRTARGET} lib includes
63 ${MAKEDIRTARGET} sys includes
64 ${MAKEDIRTARGET} external includes
66 .for dir in lib lib/csu lib/libc
67 do-${dir:S/\//-/g}: .PHONY .MAKE
68 ${MAKEDIRTARGET} ${dir} dependall
69 ${MAKEDIRTARGET} ${dir} install
70 .endfor
72 # libraries are built by building and installing csu, then libc, then
73 # the rest
74 libraries: includes .PHONY .MAKE do-lib-csu .WAIT do-lib-libc .WAIT do-lib
76 commands: includes libraries .PHONY .MAKE
77 .for dir in $(CMDSDIRS)
78 ${MAKEDIRTARGET} ${dir} dependall
79 .endfor
81 dep-all: .PHONY .MAKE
82 .for dir in $(CMDSYSDIRS)
83 ${MAKEDIRTARGET} ${dir} dependall
84 .endfor
86 install: .PHONY .MAKE
87 .for dir in $(CMDSYSDIRS)
88 ${MAKEDIRTARGET} ${dir} install
89 .endfor
90 ${MAKEDIRTARGET} man install
91 ${MAKEDIRTARGET} man makedb
92 ${MAKEDIRTARGET} share install
93 ${MAKEDIRTARGET} releasetools install
95 clean: mkfiles .PHONY .MAKE
96 .for dir in $(CMDSDIRS)
97 ${MAKEDIRTARGET} ${dir} clean
98 .endfor
99 ${MAKEDIRTARGET} sys clean
100 ${MAKEDIRTARGET} releasetools clean
101 ${MAKEDIRTARGET} lib clean
102 ${MAKEDIRTARGET} test clean
104 cleandepend: mkfiles .PHONY .MAKE
105 .for dir in $(CMDSYSDIRS)
106 ${MAKEDIRTARGET} ${dir} cleandepend
107 .endfor
108 ${MAKEDIRTARGET} lib cleandepend
110 # Shorthands
111 all: .PHONY .MAKE dep-all
112 ${MAKEDIRTARGET} releasetools all
114 # Obsolete targets
115 elf-libraries: .PHONY
116 echo "That target is just libraries now."
117 false
119 gnu-includes: .PHONY
120 echo "That target is obsolete."
121 echo "Current MINIX GCC packages don't require it any more."
122 false