minix/releasetools/Makefile

109 lines
3.4 KiB
Makefile
Raw Normal View History

2005-04-21 16:53:53 +02:00
# Makefile for the kernel image.
Build NetBSD libc library in world in ELF mode. 3 sets of libraries are built now: . ack: all libraries that ack can compile (/usr/lib/i386/) . clang+elf: all libraries with minix headers (/usr/lib/) . clang+elf: all libraries with netbsd headers (/usr/netbsd/) Once everything can be compiled with netbsd libraries and headers, the /usr/netbsd hierarchy will be obsolete and its libraries compiled with netbsd headers will be installed in /usr/lib, and its headers in /usr/include. (i.e. minix libc and current minix headers set will be gone.) To use the NetBSD libc system (libraries + headers) before it is the default libc, see: http://wiki.minix3.org/en/DevelopersGuide/UsingNetBSDCode This wiki page also documents the maintenance of the patch files of minix-specific changes to imported NetBSD code. Changes in this commit: . libsys: Add NBSD compilation and create a safe NBSD-based libc. . Port rest of libraries (except libddekit) to new header system. . Enable compilation of libddekit with new headers. . Enable kernel compilation with new headers. . Enable drivers compilation with new headers. . Port legacy commands to new headers and libc. . Port servers to new headers. . Add <sys/sigcontext.h> in compat library. . Remove dependency file in tree. . Enable compilation of common/lib/libc/atomic in libsys . Do not generate RCSID strings in libc. . Temporarily disable zoneinfo as they are incompatible with NetBSD format . obj-nbsd for .gitignore . Procfs: use only integer arithmetic. (Antoine Leca) . Increase ramdisk size to create NBSD-based images. . Remove INCSYMLINKS handling hack. . Add nbsd_include/sys/exec_elf.h . Enable ELF compilation with NBSD libc. . Add 'make nbsdsrc' in tools to download reference NetBSD sources. . Automate minix-port.patch creation. . Avoid using fstavfs() as it is *extremely* slow and unneeded. . Set err() as PRIVATE to avoid name clash with libc. . [NBSD] servers/vm: remove compilation warnings. . u32 is not a long in NBSD headers. . UPDATING info on netbsd hierarchy . commands fixes for netbsd libc
2011-04-27 15:00:52 +02:00
.include <bsd.own.mk>
GEN_FILES= *.bak image kernel *.iso *.iso.gz cdfdimage rootimage src
2005-04-21 16:53:53 +02:00
# LSC detect where were built the objects files
PROGROOT:= ..
.if "${MAKEOBJDIR:S,${.CURDIR},,}" != ""
PROGROOT:= ${MAKEOBJDIR:S,releasetools,,}
.endif
# Specify the programs that are part of the system image.
KERNEL= ${PROGROOT}/minix/kernel/kernel
2014-08-20 16:21:09 +02:00
# PROGRAMS are in the order they should be loaded by boot
PROGRAMS+= ${PROGROOT}/minix/servers/ds/ds
PROGRAMS+= ${PROGROOT}/minix/servers/rs/rs
PROGRAMS+= ${PROGROOT}/minix/servers/pm/pm
PROGRAMS+= ${PROGROOT}/minix/servers/sched/sched
PROGRAMS+= ${PROGROOT}/minix/servers/vfs/vfs
PROGRAMS+= ${PROGROOT}/minix/drivers/storage/memory/memory
PROGRAMS+= ${PROGROOT}/minix/drivers/tty/tty/tty
PROGRAMS+= ${PROGROOT}/minix/fs/mfs/mfs
PROGRAMS+= ${PROGROOT}/minix/servers/vm/vm
PROGRAMS+= ${PROGROOT}/minix/fs/pfs/pfs
PROGRAMS+= ${PROGROOT}/sbin/init/init
2014-08-20 16:21:09 +02:00
all usage help:
2005-04-21 16:53:53 +02:00
@echo " " >&2
2014-08-20 16:21:09 +02:00
@echo "Master Makefile to create new MINIX configuration." >&2
2005-05-02 16:30:04 +02:00
@echo "Root privileges are required." >&2
@echo " " >&2
2005-04-21 16:53:53 +02:00
@echo "Usage:" >&2
@echo " make includes # Install include files" >&2
@echo " make depend # Generate dependency files" >&2
@echo " make services # Compile and install all services" >&2
2005-04-21 16:53:53 +02:00
@echo " make hdboot # Make image, and install to hard disk" >&2
2014-08-20 16:21:09 +02:00
@echo " make clean # Remove all compiler results" >&2
2005-04-21 16:53:53 +02:00
@echo " " >&2
@echo "To create a fresh MINIX configuration, try:" >&2
@echo " make clean install # new boot image" >&2
2005-04-21 16:53:53 +02:00
@echo " " >&2
2014-08-20 16:21:09 +02:00
.gitignore: Makefile
echo ${GEN_FILES} | tr ' ' '\n' >.gitignore
2006-03-13 09:47:05 +01:00
includes:
2014-08-20 16:21:09 +02:00
${MAKE} -C ${NETBSDSRCDIR} includes
depend: includes .gitignore
2014-08-20 16:21:09 +02:00
${MAKE} -C ${NETBSDSRCDIR} depend
libraries: includes
${MAKE} -C ${NETBSDSRCDIR} do-lib
2005-06-24 18:25:12 +02:00
kernel: libraries
2014-08-20 16:21:09 +02:00
${MAKE} -C ${NETBSDSRCDIR}/minix/kernel
servers: libraries
2014-08-20 16:21:09 +02:00
${MAKE} -C ${NETBSDSRCDIR}/minix/fs all install
${MAKE} -C ${NETBSDSRCDIR}/minix/net all install
${MAKE} -C ${NETBSDSRCDIR}/minix/servers all install
2010-08-26 21:54:49 +02:00
sbin: libraries
2014-08-20 16:21:09 +02:00
${MAKE} -C ${NETBSDSRCDIR}/sbin all install
${MAKE} -C ${NETBSDSRCDIR}/minix/sbin all install
2014-08-20 16:21:09 +02:00
drivers: libraries
${MAKE} -C ${NETBSDSRCDIR}/minix/drivers all install
2010-08-26 21:54:49 +02:00
services: kernel servers drivers sbin
2010-08-26 21:54:49 +02:00
do-hdboot:
@rm -rf ${DESTDIR}/boot/minix/.temp/
2012-06-26 11:31:30 +02:00
${INSTALL_DIR} ${DESTDIR}/boot/minix/.temp
# mod_0 is used to make alphabetical order equal to the boot order
@n=0; \
for i in ${PROGRAMS}; \
do \
n=`expr $$n + 1`; \
[ "$$n" -ge 10 ] && prefix="mod" || prefix="mod0"; \
newname="${DESTDIR}/boot/minix/.temp/$${prefix}$${n}_`basename $$i`"; \
${INSTALL_FILE} $$i $$newname; \
echo ${INSTALL_FILE} $$i $$newname; \
done
@${INSTALL_FILE} ${KERNEL} ${DESTDIR}/boot/minix/.temp/
@if [ "${MKINSTALLBOOT:Uno}" != "no" ] ; then \
${STRIP} -s ${DESTDIR}/boot/minix/.temp/* ; \
gzip ${DESTDIR}/boot/minix/.temp/mod* ; \
${HOST_SH} mkboot hdboot ${DESTDIR}; \
${HOST_SH} ../minix/commands/update_bootcfg/update_bootcfg.sh;\
2012-06-15 16:13:12 +02:00
fi
2005-04-21 16:53:53 +02:00
2014-08-20 16:21:09 +02:00
hdboot: services .WAIT do-hdboot
2005-04-21 16:53:53 +02:00
clean:
2014-08-20 16:21:09 +02:00
${MAKE} -C ${NETBSDSRCDIR}/lib $@
${MAKE} -C ${NETBSDSRCDIR}/minix/kernel $@
${MAKE} -C ${NETBSDSRCDIR}/minix/fs $@
${MAKE} -C ${NETBSDSRCDIR}/minix/net $@
${MAKE} -C ${NETBSDSRCDIR}/minix/servers $@
${MAKE} -C ${NETBSDSRCDIR}/minix/drivers $@
${MAKE} -C ${NETBSDSRCDIR}/sbin $@
${MAKE} -C ${NETBSDSRCDIR}/minix/sbin $@
rm -rf ${GEN_FILES}
# LSC: For STRIP and HOST_SH
.include <bsd.sys.mk>