1 # Master Makefile to compile everything in /usr/src except the system.
9 @echo
"Master Makefile for MINIX commands and utilities."
10 @echo
"Root privileges are required for some actions."
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"
20 @echo
"Run 'make' in releasetools/ to create a new MINIX configuration."
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
48 CMDSYSDIRS
=$(CMDSDIRS
) $(SYSDIRS
)
50 etcfiles
: .PHONY .MAKE
51 ${MAKEDIRTARGET} etc
install
53 etcforce
: .PHONY .MAKE
54 ${MAKEDIRTARGET} etc installforce
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
72 # libraries are built by building and installing csu, then libc, then
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
82 .for
dir in
$(CMDSYSDIRS
)
83 ${MAKEDIRTARGET} ${dir} dependall
87 .for
dir in
$(CMDSYSDIRS
)
88 ${MAKEDIRTARGET} ${dir} install
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
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
108 ${MAKEDIRTARGET} lib cleandepend
111 all: .PHONY .MAKE dep-all
112 ${MAKEDIRTARGET} releasetools
all
115 elf-libraries
: .PHONY
116 echo
"That target is just libraries now."
120 echo
"That target is obsolete."
121 echo
"Current MINIX GCC packages don't require it any more."