2010-05-27 00:49:57 +02:00
|
|
|
# Makefile for ramdisk image
|
|
|
|
|
2011-02-23 14:05:28 +01:00
|
|
|
.include <bsd.own.mk>
|
|
|
|
|
Upgrading build system to new NetBSD revision
The tested targets are the followgin ones:
* tools
* distribution
* sets
* release
The remaining NetBSD targets have not been disabled nor tested
*at all*. Try them at your own risk, they may reboot the earth.
For all compliant Makefiles, objects and generated files are put in
MAKEOBJDIR, which means you can now keep objects between two branch
switching. Same for DESTDIR, please refer to build.sh options.
Regarding new or modifications of Makefiles a few things:
* Read share/mk/bsd.README
* If you add a subdirectory, add a Makefile in it, and have it called
by the parent through the SUBDIR variable.
* Do not add arbitrary inclusion which crosses to another branch of
the hierarchy; If you can't do without it, put a comment on why.
If possible, do not use inclusion at all.
* Use as much as possible the infrastructure, it is here to make
life easier, do not fight it.
Sets and package are now used to track files.
We have one set called "minix", composed of one package called "minix-sys"
2012-09-12 09:37:05 +02:00
|
|
|
# Remove "drivers/ramdisk" component from path
|
|
|
|
PROGROOT:= ${.OBJDIR:S,drivers/ramdisk,,}
|
|
|
|
|
2012-05-01 16:43:09 +02:00
|
|
|
TOOL_PWD_MKDB?= ${NETBSDSRCDIR}/usr.sbin/pwd_mkdb/pwd_mkdb
|
|
|
|
install:
|
|
|
|
|
|
|
|
all:
|
|
|
|
|
2012-04-10 04:07:51 +02:00
|
|
|
PROG_DRIVERS=at_wini floppy pci
|
2012-11-01 19:40:56 +01:00
|
|
|
PROG_COMMANDS=cdprobe loadramdisk mount fsck.mfs sysenv sh \
|
2012-04-10 04:07:51 +02:00
|
|
|
service
|
|
|
|
PROG_SERVERS=mfs procfs
|
|
|
|
PROG_USRSBIN=pwd_mkdb
|
2012-10-26 15:22:39 +02:00
|
|
|
PROGRAMS=${PROG_DRIVERS} ${PROG_COMMANDS} ${PROG_SERVERS} ${PROG_USRSBIN}
|
2012-04-17 14:02:14 +02:00
|
|
|
EXTRA=system.conf master.passwd rs.single
|
Upgrading build system to new NetBSD revision
The tested targets are the followgin ones:
* tools
* distribution
* sets
* release
The remaining NetBSD targets have not been disabled nor tested
*at all*. Try them at your own risk, they may reboot the earth.
For all compliant Makefiles, objects and generated files are put in
MAKEOBJDIR, which means you can now keep objects between two branch
switching. Same for DESTDIR, please refer to build.sh options.
Regarding new or modifications of Makefiles a few things:
* Read share/mk/bsd.README
* If you add a subdirectory, add a Makefile in it, and have it called
by the parent through the SUBDIR variable.
* Do not add arbitrary inclusion which crosses to another branch of
the hierarchy; If you can't do without it, put a comment on why.
If possible, do not use inclusion at all.
* Use as much as possible the infrastructure, it is here to make
life easier, do not fight it.
Sets and package are now used to track files.
We have one set called "minix", composed of one package called "minix-sys"
2012-09-12 09:37:05 +02:00
|
|
|
PROTO_FILES=proto.common.etc proto.common.dynamic proto.sh proto.dev
|
2011-07-30 13:14:00 +02:00
|
|
|
|
2011-08-01 11:05:17 +02:00
|
|
|
.if ${MKSMALL} != "yes"
|
2012-04-10 04:07:51 +02:00
|
|
|
PROG_DRIVERS+= ahci
|
|
|
|
PROG_SERVERS+= ext2
|
2011-07-30 13:14:00 +02:00
|
|
|
PROTO= proto
|
|
|
|
.else
|
2011-08-01 11:05:17 +02:00
|
|
|
PROTO= proto.small
|
2010-09-02 17:44:36 +02:00
|
|
|
.endif
|
|
|
|
|
2012-04-10 04:07:51 +02:00
|
|
|
.if ${MKACPI} != "no"
|
|
|
|
PROG_DRIVERS+= acpi
|
|
|
|
.endif
|
2010-05-27 00:49:57 +02:00
|
|
|
|
2012-06-06 13:16:32 +02:00
|
|
|
CPPFLAGS+= -I${NETBSDSRCDIR}/servers
|
2012-10-26 15:22:39 +02:00
|
|
|
CLEANFILES += ${PROGRAMS} ${SCRIPTS} ${EXTRA} image image.c t proto.gen
|
|
|
|
CLEANFILES += ${LIBRARIES}
|
Upgrading build system to new NetBSD revision
The tested targets are the followgin ones:
* tools
* distribution
* sets
* release
The remaining NetBSD targets have not been disabled nor tested
*at all*. Try them at your own risk, they may reboot the earth.
For all compliant Makefiles, objects and generated files are put in
MAKEOBJDIR, which means you can now keep objects between two branch
switching. Same for DESTDIR, please refer to build.sh options.
Regarding new or modifications of Makefiles a few things:
* Read share/mk/bsd.README
* If you add a subdirectory, add a Makefile in it, and have it called
by the parent through the SUBDIR variable.
* Do not add arbitrary inclusion which crosses to another branch of
the hierarchy; If you can't do without it, put a comment on why.
If possible, do not use inclusion at all.
* Use as much as possible the infrastructure, it is here to make
life easier, do not fight it.
Sets and package are now used to track files.
We have one set called "minix", composed of one package called "minix-sys"
2012-09-12 09:37:05 +02:00
|
|
|
CLEANFILES += ${.OBJDIR}/etc/*
|
2010-05-27 00:49:57 +02:00
|
|
|
|
2012-10-26 15:22:39 +02:00
|
|
|
image: proto.gen ${EXTRA} mtab rc pwd.db spwd.db passwd
|
|
|
|
${_MKMSG_CREATE} "Generating ramdisk image"
|
2012-06-15 16:13:12 +02:00
|
|
|
${TOOL_MKFSMFS} image proto.gen || { rm -f image; false; }
|
|
|
|
# if fsck.mfs -s image | grep -q CLEAN; \
|
|
|
|
# then : ; \
|
|
|
|
# else echo "CLEAN sanity check of image failed." ; \
|
|
|
|
# echo "(Perhaps install current mkfs and fsck.)" ; \
|
|
|
|
# rm -f image; false; \
|
|
|
|
# fi
|
2010-05-27 00:49:57 +02:00
|
|
|
|
Upgrading build system to new NetBSD revision
The tested targets are the followgin ones:
* tools
* distribution
* sets
* release
The remaining NetBSD targets have not been disabled nor tested
*at all*. Try them at your own risk, they may reboot the earth.
For all compliant Makefiles, objects and generated files are put in
MAKEOBJDIR, which means you can now keep objects between two branch
switching. Same for DESTDIR, please refer to build.sh options.
Regarding new or modifications of Makefiles a few things:
* Read share/mk/bsd.README
* If you add a subdirectory, add a Makefile in it, and have it called
by the parent through the SUBDIR variable.
* Do not add arbitrary inclusion which crosses to another branch of
the hierarchy; If you can't do without it, put a comment on why.
If possible, do not use inclusion at all.
* Use as much as possible the infrastructure, it is here to make
life easier, do not fight it.
Sets and package are now used to track files.
We have one set called "minix", composed of one package called "minix-sys"
2012-09-12 09:37:05 +02:00
|
|
|
# LSC ramdisk rc file != /etc/rc
|
|
|
|
# mtab not empty!, force execution of the rule to ensure installation
|
|
|
|
# Conditionnally execute the command if the target file already exists
|
|
|
|
# I have to place .PHONY for the target to work as expected, but I cannot
|
|
|
|
# execute the command during an in-tree build (= make xxx)
|
|
|
|
.for file in rc mtab ${PROTO} ${PROTO_FILES}
|
2012-10-26 15:22:39 +02:00
|
|
|
${file}: ${.CURDIR}/${file} .PHONY
|
Upgrading build system to new NetBSD revision
The tested targets are the followgin ones:
* tools
* distribution
* sets
* release
The remaining NetBSD targets have not been disabled nor tested
*at all*. Try them at your own risk, they may reboot the earth.
For all compliant Makefiles, objects and generated files are put in
MAKEOBJDIR, which means you can now keep objects between two branch
switching. Same for DESTDIR, please refer to build.sh options.
Regarding new or modifications of Makefiles a few things:
* Read share/mk/bsd.README
* If you add a subdirectory, add a Makefile in it, and have it called
by the parent through the SUBDIR variable.
* Do not add arbitrary inclusion which crosses to another branch of
the hierarchy; If you can't do without it, put a comment on why.
If possible, do not use inclusion at all.
* Use as much as possible the infrastructure, it is here to make
life easier, do not fight it.
Sets and package are now used to track files.
We have one set called "minix", composed of one package called "minix-sys"
2012-09-12 09:37:05 +02:00
|
|
|
[ -e $@ ] || ${INSTALL} $> $@
|
|
|
|
.endfor
|
|
|
|
|
2012-10-26 15:22:39 +02:00
|
|
|
.for driver in ${PROG_DRIVERS}
|
|
|
|
${driver}: ${PROGROOT}/drivers/${driver}/${driver}
|
2012-05-01 16:43:09 +02:00
|
|
|
${INSTALL} $> $@
|
2010-05-27 00:49:57 +02:00
|
|
|
|
2012-10-26 15:22:39 +02:00
|
|
|
${PROGROOT}/drivers/${driver}/${driver}:
|
|
|
|
${MAKE} -C ${NETBSDSRCDIR}/drivers/${driver} ${driver}
|
2012-04-10 04:07:51 +02:00
|
|
|
.endfor
|
2010-05-27 00:49:57 +02:00
|
|
|
|
2012-10-26 15:22:39 +02:00
|
|
|
.for cmd in ${PROG_COMMANDS}
|
|
|
|
.if ${cmd} == sh
|
|
|
|
dir.${cmd}=ash
|
2012-04-10 04:07:51 +02:00
|
|
|
.else
|
2012-10-26 15:22:39 +02:00
|
|
|
dir.${cmd}=${cmd}
|
2012-04-10 04:07:51 +02:00
|
|
|
.endif
|
2012-10-26 15:22:39 +02:00
|
|
|
${cmd}: ${PROGROOT}/commands/${dir.${cmd}}/${cmd}
|
2012-05-01 16:43:09 +02:00
|
|
|
${INSTALL} $> $@
|
2010-05-27 00:49:57 +02:00
|
|
|
|
2012-10-26 15:22:39 +02:00
|
|
|
${PROGROOT}/commands/$(dir.${cmd})/${cmd}:
|
|
|
|
${MAKE} -C ${NETBSDSRCDIR}/commands/${dir.${cmd}} ${cmd}
|
2012-04-10 04:07:51 +02:00
|
|
|
.endfor
|
2010-05-27 00:49:57 +02:00
|
|
|
|
2012-10-26 15:22:39 +02:00
|
|
|
.for etc in ${EXTRA}
|
|
|
|
${etc}: ${NETBSDSRCDIR}/etc/${etc}
|
2012-05-01 16:43:09 +02:00
|
|
|
${INSTALL} $> $@
|
2012-04-10 04:07:51 +02:00
|
|
|
.endfor
|
2011-02-23 14:05:28 +01:00
|
|
|
|
2012-10-26 15:22:39 +02:00
|
|
|
.for cmd in ${PROG_USRSBIN}
|
|
|
|
${cmd}: ${PROGROOT}/usr.sbin/${cmd}/${cmd}
|
2012-05-01 16:43:09 +02:00
|
|
|
${INSTALL} $> $@
|
2011-02-23 14:05:28 +01:00
|
|
|
|
2012-10-26 15:22:39 +02:00
|
|
|
${PROGROOT}/usr.sbin/${cmd}/${cmd}:
|
|
|
|
${MAKE} -C ${NETBSDSRCDIR}/usr.sbin/${cmd} ${cmd}
|
2012-04-10 04:07:51 +02:00
|
|
|
.endfor
|
2010-08-04 07:18:03 +02:00
|
|
|
|
2012-10-26 15:22:39 +02:00
|
|
|
.for server in ${PROG_SERVERS}
|
|
|
|
${server}: ${PROGROOT}/servers/${server}/${server}
|
2012-05-01 16:43:09 +02:00
|
|
|
${INSTALL} $> $@
|
2010-08-04 07:18:03 +02:00
|
|
|
|
2012-10-26 15:22:39 +02:00
|
|
|
${PROGROOT}/servers/${server}/${server}:
|
|
|
|
${MAKE} -C ${NETBSDSRCDIR}/servers/${server} ${server}
|
2012-04-10 04:07:51 +02:00
|
|
|
.endfor
|
2010-05-27 00:49:57 +02:00
|
|
|
|
Upgrading build system to new NetBSD revision
The tested targets are the followgin ones:
* tools
* distribution
* sets
* release
The remaining NetBSD targets have not been disabled nor tested
*at all*. Try them at your own risk, they may reboot the earth.
For all compliant Makefiles, objects and generated files are put in
MAKEOBJDIR, which means you can now keep objects between two branch
switching. Same for DESTDIR, please refer to build.sh options.
Regarding new or modifications of Makefiles a few things:
* Read share/mk/bsd.README
* If you add a subdirectory, add a Makefile in it, and have it called
by the parent through the SUBDIR variable.
* Do not add arbitrary inclusion which crosses to another branch of
the hierarchy; If you can't do without it, put a comment on why.
If possible, do not use inclusion at all.
* Use as much as possible the infrastructure, it is here to make
life easier, do not fight it.
Sets and package are now used to track files.
We have one set called "minix", composed of one package called "minix-sys"
2012-09-12 09:37:05 +02:00
|
|
|
etc/master.passwd: ${NETBSDSRCDIR}/etc/master.passwd
|
|
|
|
rm -rf ${.OBJDIR}/etc/
|
|
|
|
mkdir -p ${.OBJDIR}/etc
|
|
|
|
${INSTALL} $> $@
|
|
|
|
${TOOL_PWD_MKDB} -V 0 -p -d . etc/master.passwd
|
|
|
|
|
2012-10-26 15:22:39 +02:00
|
|
|
# LSC We use @F because some version of make still output a full path for @,
|
|
|
|
# even when the target is just a file name
|
Upgrading build system to new NetBSD revision
The tested targets are the followgin ones:
* tools
* distribution
* sets
* release
The remaining NetBSD targets have not been disabled nor tested
*at all*. Try them at your own risk, they may reboot the earth.
For all compliant Makefiles, objects and generated files are put in
MAKEOBJDIR, which means you can now keep objects between two branch
switching. Same for DESTDIR, please refer to build.sh options.
Regarding new or modifications of Makefiles a few things:
* Read share/mk/bsd.README
* If you add a subdirectory, add a Makefile in it, and have it called
by the parent through the SUBDIR variable.
* Do not add arbitrary inclusion which crosses to another branch of
the hierarchy; If you can't do without it, put a comment on why.
If possible, do not use inclusion at all.
* Use as much as possible the infrastructure, it is here to make
life easier, do not fight it.
Sets and package are now used to track files.
We have one set called "minix", composed of one package called "minix-sys"
2012-09-12 09:37:05 +02:00
|
|
|
pwd.db spwd.db passwd: etc/master.passwd
|
2012-10-26 15:22:39 +02:00
|
|
|
${INSTALL} etc/${@F} ${@F}
|
2010-07-01 08:14:06 +02:00
|
|
|
|
Upgrading build system to new NetBSD revision
The tested targets are the followgin ones:
* tools
* distribution
* sets
* release
The remaining NetBSD targets have not been disabled nor tested
*at all*. Try them at your own risk, they may reboot the earth.
For all compliant Makefiles, objects and generated files are put in
MAKEOBJDIR, which means you can now keep objects between two branch
switching. Same for DESTDIR, please refer to build.sh options.
Regarding new or modifications of Makefiles a few things:
* Read share/mk/bsd.README
* If you add a subdirectory, add a Makefile in it, and have it called
by the parent through the SUBDIR variable.
* Do not add arbitrary inclusion which crosses to another branch of
the hierarchy; If you can't do without it, put a comment on why.
If possible, do not use inclusion at all.
* Use as much as possible the infrastructure, it is here to make
life easier, do not fight it.
Sets and package are now used to track files.
We have one set called "minix", composed of one package called "minix-sys"
2012-09-12 09:37:05 +02:00
|
|
|
proto.gen: ${PROTO} ${PROTO_FILES} ${PROGRAMS}
|
2012-10-26 15:22:39 +02:00
|
|
|
${STRIP} ${PROGRAMS}
|
|
|
|
${HOST_SH} -e proto.sh ${PROTO} >${.OBJDIR}/${.TARGET}
|
2010-05-27 00:49:57 +02:00
|
|
|
|
2011-07-09 15:04:42 +02:00
|
|
|
.include <minix.service.mk>
|