2005-04-21 16:53:53 +02:00
|
|
|
# Master Makefile to compile everything in /usr/src except the system.
|
|
|
|
|
2010-12-10 23:20:12 +01:00
|
|
|
.include <bsd.own.mk>
|
|
|
|
|
2012-05-01 16:55:13 +02:00
|
|
|
MAKE?=make
|
2005-04-21 16:53:53 +02:00
|
|
|
|
|
|
|
usage:
|
2005-10-21 20:31:45 +02:00
|
|
|
@echo ""
|
|
|
|
@echo "Master Makefile for MINIX commands and utilities."
|
|
|
|
@echo "Root privileges are required for some actions."
|
|
|
|
@echo ""
|
|
|
|
@echo "Usage:"
|
2010-03-08 12:04:59 +01:00
|
|
|
@echo " make world # Compile everything (libraries & commands)"
|
|
|
|
@echo " make includes # Install include files from src/"
|
2012-02-11 19:31:25 +01:00
|
|
|
@echo " make libraries # Compile and install libraries"
|
2010-03-08 12:04:59 +01:00
|
|
|
@echo " make commands # Compile all, commands, but don't install"
|
|
|
|
@echo " make install # Compile and install commands"
|
|
|
|
@echo " make clean # Remove all compiler results"
|
2005-10-21 20:31:45 +02:00
|
|
|
@echo ""
|
2012-06-08 15:09:54 +02:00
|
|
|
@echo "Run 'make' in releasetools/ to create a new MINIX configuration."
|
2005-10-21 20:31:45 +02:00
|
|
|
@echo ""
|
2005-04-21 16:53:53 +02:00
|
|
|
|
|
|
|
# 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.
|
2005-09-16 15:10:56 +02:00
|
|
|
#
|
2012-06-06 16:46:00 +02:00
|
|
|
|
2005-09-16 15:10:56 +02:00
|
|
|
# etcfiles has to be done first.
|
2012-06-06 16:46:00 +02:00
|
|
|
|
|
|
|
distribution: etcfiles includes mkfiles libraries do-libgcc .WAIT dep-all install etcforce
|
|
|
|
|
|
|
|
do-libgcc: .PHONY .MAKE
|
|
|
|
${MAKEDIRTARGET} external/gpl3/gcc/lib/libgcc/libgcc all
|
|
|
|
${MAKEDIRTARGET} external/gpl3/gcc/lib/libgcc/libgcc install
|
|
|
|
|
2012-02-11 19:31:25 +01:00
|
|
|
world: mkfiles etcfiles includes libraries dep-all install etcforce
|
2010-09-15 16:18:39 +02:00
|
|
|
|
2012-03-31 18:09:06 +02:00
|
|
|
# subdirs where userland utilities and other executables live
|
|
|
|
CMDSDIRS=commands bin sbin usr.bin usr.sbin libexec external
|
|
|
|
|
|
|
|
# subdirs where system stuff lives
|
|
|
|
SYSDIRS=sys kernel servers drivers
|
|
|
|
|
|
|
|
# combination
|
|
|
|
CMDSYSDIRS=$(CMDSDIRS) $(SYSDIRS)
|
|
|
|
|
|
|
|
etcfiles: .PHONY .MAKE
|
|
|
|
${MAKEDIRTARGET} etc install
|
|
|
|
|
|
|
|
etcforce: .PHONY .MAKE
|
|
|
|
${MAKEDIRTARGET} etc installforce
|
|
|
|
|
|
|
|
mkfiles: .PHONY .MAKE
|
|
|
|
${MAKEDIRTARGET} share/mk install
|
|
|
|
|
|
|
|
includes: .PHONY .MAKE
|
|
|
|
${MAKEDIRTARGET} include includes
|
2012-06-06 16:10:32 +02:00
|
|
|
${INSTALL_DIR} ${DESTDIR}/usr/include/g++
|
2012-03-31 18:09:06 +02:00
|
|
|
${MAKEDIRTARGET} lib includes
|
|
|
|
${MAKEDIRTARGET} sys includes
|
2012-05-01 01:56:44 +02:00
|
|
|
${MAKEDIRTARGET} external includes
|
2012-03-31 18:09:06 +02:00
|
|
|
|
|
|
|
.for dir in lib lib/csu lib/libc
|
|
|
|
do-${dir:S/\//-/g}: .PHONY .MAKE
|
|
|
|
${MAKEDIRTARGET} ${dir} dependall
|
|
|
|
${MAKEDIRTARGET} ${dir} install
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
# libraries are built by building and installing csu, then libc, then
|
|
|
|
# the rest
|
|
|
|
libraries: includes .PHONY .MAKE do-lib-csu .WAIT do-lib-libc .WAIT do-lib
|
|
|
|
|
|
|
|
commands: includes libraries .PHONY .MAKE
|
|
|
|
.for dir in $(CMDSDIRS)
|
|
|
|
${MAKEDIRTARGET} ${dir} dependall
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
dep-all: .PHONY .MAKE
|
|
|
|
.for dir in $(CMDSYSDIRS)
|
|
|
|
${MAKEDIRTARGET} ${dir} dependall
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
install: .PHONY .MAKE
|
|
|
|
.for dir in $(CMDSYSDIRS)
|
|
|
|
${MAKEDIRTARGET} ${dir} install
|
|
|
|
.endfor
|
|
|
|
${MAKEDIRTARGET} man install
|
|
|
|
${MAKEDIRTARGET} man makedb
|
|
|
|
${MAKEDIRTARGET} share install
|
2012-06-08 15:09:54 +02:00
|
|
|
${MAKEDIRTARGET} releasetools install
|
2012-03-31 18:09:06 +02:00
|
|
|
|
|
|
|
clean: mkfiles .PHONY .MAKE
|
|
|
|
.for dir in $(CMDSDIRS)
|
|
|
|
${MAKEDIRTARGET} ${dir} clean
|
|
|
|
.endfor
|
|
|
|
${MAKEDIRTARGET} sys clean
|
2012-06-08 15:09:54 +02:00
|
|
|
${MAKEDIRTARGET} releasetools clean
|
2012-03-31 18:09:06 +02:00
|
|
|
${MAKEDIRTARGET} lib clean
|
|
|
|
${MAKEDIRTARGET} test clean
|
|
|
|
|
|
|
|
cleandepend: mkfiles .PHONY .MAKE
|
|
|
|
.for dir in $(CMDSYSDIRS)
|
|
|
|
${MAKEDIRTARGET} ${dir} cleandepend
|
|
|
|
.endfor
|
|
|
|
${MAKEDIRTARGET} lib cleandepend
|
|
|
|
|
|
|
|
# Shorthands
|
|
|
|
all: .PHONY .MAKE dep-all
|
2012-06-08 15:09:54 +02:00
|
|
|
${MAKEDIRTARGET} releasetools all
|
2012-03-31 18:09:06 +02:00
|
|
|
|
|
|
|
# Obsolete targets
|
|
|
|
elf-libraries: .PHONY
|
2012-02-11 19:31:25 +01:00
|
|
|
echo "That target is just libraries now."
|
|
|
|
false
|
2012-03-31 18:09:06 +02:00
|
|
|
|
|
|
|
gnu-includes: .PHONY
|
|
|
|
echo "That target is obsolete."
|
|
|
|
echo "Current MINIX GCC packages don't require it any more."
|
|
|
|
false
|
|
|
|
|