1 # Makefile for the kernel image.
4 GEN_FILES
= *.bak image kernel
*.iso
*.iso.gz cdfdimage rootimage src
6 # LSC detect where were built the objects files
8 .if
"${MAKEOBJDIR:S,${.CURDIR},,}" != ""
9 PROGROOT
:= ${MAKEOBJDIR
:S
,releasetools
,,}
12 # Specify the programs that are part of the system image.
13 KERNEL
= ${PROGROOT}/minix
/kernel
/kernel
15 # PROGRAMS are in the order they should be loaded by boot
16 PROGRAMS
+= ${PROGROOT}/minix
/servers
/ds
/ds
17 PROGRAMS
+= ${PROGROOT}/minix
/servers
/rs
/rs
18 PROGRAMS
+= ${PROGROOT}/minix
/servers
/pm
/pm
19 PROGRAMS
+= ${PROGROOT}/minix
/servers
/sched
/sched
20 PROGRAMS
+= ${PROGROOT}/minix
/servers
/vfs
/vfs
21 PROGRAMS
+= ${PROGROOT}/minix
/drivers
/storage
/memory
/memory
22 PROGRAMS
+= ${PROGROOT}/minix
/drivers
/tty
/tty
/tty
23 PROGRAMS
+= ${PROGROOT}/minix
/servers
/mib
/mib
24 PROGRAMS
+= ${PROGROOT}/minix
/servers
/vm
/vm
25 PROGRAMS
+= ${PROGROOT}/minix
/fs
/pfs
/pfs
26 PROGRAMS
+= ${PROGROOT}/minix
/fs
/mfs
/mfs
27 PROGRAMS
+= ${PROGROOT}/sbin
/init
/init
31 @echo
"Master Makefile to create new MINIX configuration." >&2
32 @echo
"Root privileges are required." >&2
35 @echo
" make includes # Install include files" >&2
36 @echo
" make depend # Generate dependency files" >&2
37 @echo
" make services # Compile and install all services" >&2
38 @echo
" make hdboot # Make image, and install to hard disk" >&2
39 @echo
" make clean # Remove all compiler results" >&2
41 @echo
"To create a fresh MINIX configuration, try:" >&2
42 @echo
" make clean install # new boot image" >&2
46 echo
${GEN_FILES} | tr
' ' '\n' >.gitignore
49 ${MAKE} -C
${NETBSDSRCDIR} includes
51 depend
: includes .gitignore
52 ${MAKE} -C
${NETBSDSRCDIR} depend
55 ${MAKE} -C
${NETBSDSRCDIR} do-lib
58 ${MAKE} -C
${NETBSDSRCDIR}/minix
/kernel
61 ${MAKE} -C
${NETBSDSRCDIR}/minix
/fs
all install
62 ${MAKE} -C
${NETBSDSRCDIR}/minix
/net
all install
63 ${MAKE} -C
${NETBSDSRCDIR}/minix
/servers
all install
66 ${MAKE} -C
${NETBSDSRCDIR}/sbin
all install
67 ${MAKE} -C
${NETBSDSRCDIR}/minix
/sbin
all install
70 ${MAKE} -C
${NETBSDSRCDIR}/minix
/drivers
all install
72 services
: kernel servers drivers sbin
75 @
rm -rf
${DESTDIR}/boot
/minix
/.temp
/
76 ${INSTALL_DIR} ${DESTDIR}/boot
/minix
/.temp
77 # mod_0 is used to make alphabetical order equal to the boot order
79 for i in
${PROGRAMS}; \
82 [ "$$n" -ge
10 ] && prefix="mod" ||
prefix="mod0"; \
83 newname
="${DESTDIR}/boot/minix/.temp/$${prefix}$${n}_`basename $$i`"; \
84 ${INSTALL_FILE} $$i $$newname; \
85 echo
${INSTALL_FILE} $$i $$newname; \
87 @
${INSTALL_FILE} ${KERNEL} ${DESTDIR}/boot
/minix
/.temp
/
88 @if
[ "${MKINSTALLBOOT:Uno}" != "no" ] ; then \
89 ${STRIP} -s
${DESTDIR}/boot
/minix
/.temp
/* ; \
90 gzip
${DESTDIR}/boot
/minix
/.temp
/mod
* ; \
91 ${HOST_SH} mkboot hdboot
${DESTDIR}; \
92 ${HOST_SH} ..
/minix
/commands
/update_bootcfg
/update_bootcfg.sh
;\
95 hdboot
: services .WAIT do-hdboot
98 ${MAKE} -C
${NETBSDSRCDIR}/lib
$@
99 ${MAKE} -C
${NETBSDSRCDIR}/minix
/kernel
$@
100 ${MAKE} -C
${NETBSDSRCDIR}/minix
/fs
$@
101 ${MAKE} -C
${NETBSDSRCDIR}/minix
/net
$@
102 ${MAKE} -C
${NETBSDSRCDIR}/minix
/servers
$@
103 ${MAKE} -C
${NETBSDSRCDIR}/minix
/drivers
$@
104 ${MAKE} -C
${NETBSDSRCDIR}/sbin
$@
105 ${MAKE} -C
${NETBSDSRCDIR}/minix
/sbin
$@
108 # LSC: For STRIP and HOST_SH
109 .
include <bsd.sys.mk
>