2010-05-27 00:49:57 +02:00
|
|
|
# Makefile for ramdisk image
|
|
|
|
|
2011-02-23 14:05:28 +01:00
|
|
|
.include <bsd.own.mk>
|
|
|
|
|
2011-07-30 13:14:00 +02:00
|
|
|
PROGRAMS= at_wini bios_wini cdprobe dev2name floppy loadramdisk mount \
|
2011-12-22 01:29:27 +01:00
|
|
|
pci procfs sh service sysenv mfs fsck.mfs
|
2011-02-23 14:05:28 +01:00
|
|
|
SCRIPTS=newroot
|
2010-09-02 17:44:36 +02:00
|
|
|
|
2011-08-01 11:05:17 +02:00
|
|
|
.if ${MKSMALL} != "yes"
|
2011-07-30 13:14:00 +02:00
|
|
|
PROGRAMS+= ahci ext2
|
|
|
|
.endif
|
|
|
|
|
2011-10-24 01:53:30 +02:00
|
|
|
.if ${MKACPI} != "no"
|
2011-07-30 13:14:00 +02:00
|
|
|
PROGRAMS+= acpi
|
|
|
|
.endif
|
|
|
|
|
2011-08-01 11:05:17 +02:00
|
|
|
.if ${MKSMALL} != "yes"
|
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
|
|
|
|
|
2011-06-28 17:49:45 +02:00
|
|
|
.if ${OBJECT_FMT} == "a.out"
|
2011-02-23 14:05:28 +01:00
|
|
|
STRIPFLAG+= -s
|
|
|
|
.endif
|
|
|
|
|
2011-11-22 18:17:25 +01:00
|
|
|
EXTRA=system.conf master.passwd passwd pwd.db spwd.db rs.single
|
2010-05-27 00:49:57 +02:00
|
|
|
|
2010-07-06 11:19:04 +02:00
|
|
|
CPPFLAGS+= -I${MINIXSRCDIR}/servers -I${MINIXSRCDIR}
|
2011-02-23 14:05:28 +01:00
|
|
|
CLEANFILES += $(PROGRAMS) $(SCRIPTS) $(EXTRA) bintoc image image.c t proto.gen
|
2010-05-27 00:49:57 +02:00
|
|
|
|
2010-06-01 17:11:43 +02:00
|
|
|
install: all
|
|
|
|
|
2011-07-19 15:26:25 +02:00
|
|
|
realall: image.c
|
2010-05-27 00:49:57 +02:00
|
|
|
|
|
|
|
image.c: bintoc image
|
|
|
|
./bintoc -o $@ image
|
|
|
|
|
|
|
|
# Note for cross compilation: this executable has to be compiled for the
|
|
|
|
# host system
|
|
|
|
bintoc: bintoc.c
|
|
|
|
$(CC) -o $@ bintoc.c
|
|
|
|
|
2010-09-02 17:44:36 +02:00
|
|
|
image: proto.gen mtab rc $(EXTRA)
|
2010-08-05 14:35:00 +02:00
|
|
|
mkfs.mfs image proto.gen || { rm -f image; false; }
|
2011-12-22 01:29:27 +01:00
|
|
|
if fsck.mfs -s image | grep -q CLEAN; \
|
|
|
|
then : ; \
|
|
|
|
else echo "CLEAN sanity check of image failed." ; \
|
|
|
|
echo "(Perhaps install current mkfs and fsck.)" ; \
|
2011-12-23 15:02:35 +01:00
|
|
|
rm -f image; false; \
|
2011-12-22 01:29:27 +01:00
|
|
|
fi
|
2010-05-27 00:49:57 +02:00
|
|
|
|
2010-08-11 13:16:44 +02:00
|
|
|
ahci: ../ahci/ahci
|
2011-02-23 14:05:28 +01:00
|
|
|
install ${STRIPFLAG} ../$@/$@ $@
|
2010-08-11 13:16:44 +02:00
|
|
|
|
|
|
|
../ahci/ahci:
|
|
|
|
$(MAKE) -C ../ahci
|
|
|
|
|
2010-05-27 00:49:57 +02:00
|
|
|
at_wini: ../at_wini/at_wini
|
2011-02-23 14:05:28 +01:00
|
|
|
install ${STRIPFLAG} ../$@/$@ $@
|
2010-05-27 00:49:57 +02:00
|
|
|
|
|
|
|
../at_wini/at_wini:
|
2010-06-22 14:03:09 +02:00
|
|
|
$(MAKE) -C ../at_wini
|
2010-05-27 00:49:57 +02:00
|
|
|
|
|
|
|
bios_wini: ../bios_wini/bios_wini
|
2011-02-23 14:05:28 +01:00
|
|
|
install ${STRIPFLAG} ../$@/$@ $@
|
2010-05-27 00:49:57 +02:00
|
|
|
|
|
|
|
../bios_wini/bios_wini:
|
2010-06-22 14:03:09 +02:00
|
|
|
$(MAKE) -C ../bios_wini
|
2010-05-27 00:49:57 +02:00
|
|
|
|
|
|
|
floppy: ../floppy/floppy
|
2011-02-23 14:05:28 +01:00
|
|
|
install ${STRIPFLAG} ../$@/$@ $@
|
2010-05-27 00:49:57 +02:00
|
|
|
|
|
|
|
../floppy/floppy:
|
2010-06-22 14:03:09 +02:00
|
|
|
$(MAKE) -C ../floppy
|
2010-05-27 00:49:57 +02:00
|
|
|
|
2010-09-02 17:44:36 +02:00
|
|
|
acpi: ../acpi/acpi
|
2011-02-23 14:05:28 +01:00
|
|
|
install ${STRIPFLAG} ../$@/$@ $@
|
2010-09-02 17:44:36 +02:00
|
|
|
|
|
|
|
../acpi/acpi:
|
|
|
|
$(MAKE) -C ../acpi
|
|
|
|
|
2010-05-27 00:49:57 +02:00
|
|
|
pci: ../pci/pci
|
2011-02-23 14:05:28 +01:00
|
|
|
install ${STRIPFLAG} ../$@/$@ $@
|
2010-05-27 00:49:57 +02:00
|
|
|
|
|
|
|
../pci/pci:
|
2010-06-22 14:03:09 +02:00
|
|
|
$(MAKE) -C ../pci
|
2010-05-27 00:49:57 +02:00
|
|
|
|
|
|
|
cdprobe: ../../commands/cdprobe/cdprobe
|
2011-02-23 14:05:28 +01:00
|
|
|
install ${STRIPFLAG} ../../commands/$@/$@ $@
|
2010-05-27 00:49:57 +02:00
|
|
|
|
|
|
|
../../commands/cdprobe:
|
2010-06-22 14:03:09 +02:00
|
|
|
$(MAKE) -C ../../commands/cdprobe
|
2010-05-27 00:49:57 +02:00
|
|
|
|
|
|
|
dev2name: ../../commands/dev2name/dev2name
|
2011-02-23 14:05:28 +01:00
|
|
|
install ${STRIPFLAG} ../../commands/$@/$@ $@
|
2010-05-27 00:49:57 +02:00
|
|
|
|
|
|
|
../../commands/dev2name/dev2name:
|
2010-06-22 14:03:09 +02:00
|
|
|
$(MAKE) -C ../../commands/dev2name
|
2010-05-27 00:49:57 +02:00
|
|
|
|
|
|
|
loadramdisk: ../../commands/loadramdisk/loadramdisk
|
2011-02-23 14:05:28 +01:00
|
|
|
install ${STRIPFLAG} ../../commands/$@/$@ $@
|
2010-05-27 00:49:57 +02:00
|
|
|
|
|
|
|
../../commands/loadramdisk/loadramdisk:
|
2010-06-22 14:03:09 +02:00
|
|
|
$(MAKE) -C ../../commands/loadramdisk
|
2010-05-27 00:49:57 +02:00
|
|
|
|
2010-08-02 16:15:48 +02:00
|
|
|
mount: ../../commands/mount/mount
|
2011-02-23 14:05:28 +01:00
|
|
|
install ${STRIPFLAG} ../../commands/$@/$@ $@
|
2010-08-02 16:15:48 +02:00
|
|
|
|
|
|
|
../../commands/mount/mount:
|
|
|
|
$(MAKE) -C ../../commands/mount
|
|
|
|
|
2011-12-22 01:29:27 +01:00
|
|
|
fsck.mfs: ../../commands/fsck.mfs/fsck.mfs
|
|
|
|
install ${STRIPFLAG} ../../commands/$@/$@ $@
|
|
|
|
|
|
|
|
../../commands/fsck.mfs/fsck.mfs:
|
|
|
|
$(MAKE) -C ../../commands/fsck.mfs
|
|
|
|
|
2010-08-02 16:49:35 +02:00
|
|
|
newroot: ../../commands/newroot/newroot.sh
|
2011-02-23 14:05:28 +01:00
|
|
|
install ${STRIPFLAG} ../../commands/$@/$@.sh $@
|
2010-05-27 00:49:57 +02:00
|
|
|
|
|
|
|
../../commands/newroot/newroot:
|
2010-06-22 14:03:09 +02:00
|
|
|
$(MAKE) -C ../../commands/newroot
|
2010-05-27 00:49:57 +02:00
|
|
|
|
|
|
|
sysenv: ../../commands/sysenv/sysenv
|
2011-02-23 14:05:28 +01:00
|
|
|
install ${STRIPFLAG} ../../commands/$@/$@ $@
|
2010-05-27 00:49:57 +02:00
|
|
|
|
2011-04-27 15:00:52 +02:00
|
|
|
../../commands/sysenv/sysenv:
|
2010-06-22 14:03:09 +02:00
|
|
|
$(MAKE) -C ../../commands/sysenv
|
2010-05-27 00:49:57 +02:00
|
|
|
|
|
|
|
sh: ../../commands/ash/sh
|
2011-02-23 14:05:28 +01:00
|
|
|
install ${STRIPFLAG} ../../commands/ash/$@ $@
|
2010-05-27 00:49:57 +02:00
|
|
|
|
|
|
|
../../commands/ash/sh:
|
2010-06-22 14:03:09 +02:00
|
|
|
$(MAKE) -C ../../commands/ash sh
|
2010-05-27 00:49:57 +02:00
|
|
|
|
|
|
|
service: ../../commands/service/service
|
2011-02-23 14:05:28 +01:00
|
|
|
install ${STRIPFLAG} ../../commands/service/$@ $@
|
2010-05-27 00:49:57 +02:00
|
|
|
|
2011-04-27 15:00:52 +02:00
|
|
|
../../commands/service/service:
|
2010-06-22 14:03:09 +02:00
|
|
|
$(MAKE) -C ../../commands/service
|
2010-05-27 00:49:57 +02:00
|
|
|
|
|
|
|
mfs: ../../servers/mfs/mfs
|
2011-02-23 14:05:28 +01:00
|
|
|
install ${STRIPFLAG} ../../servers/mfs/$@ $@
|
2010-05-27 00:49:57 +02:00
|
|
|
|
|
|
|
../../servers/mfs/mfs:
|
2010-06-22 14:03:09 +02:00
|
|
|
$(MAKE) -C ../../servers/mfs
|
2010-05-27 00:49:57 +02:00
|
|
|
|
2011-02-23 14:05:28 +01:00
|
|
|
procfs: ../../servers/procfs/procfs
|
|
|
|
install ${STRIPFLAG} ../../servers/procfs/$@ $@
|
|
|
|
|
|
|
|
../../servers/procfs/procfs:
|
|
|
|
$(MAKE) -C ../../servers/procfs
|
|
|
|
|
2010-08-04 07:18:03 +02:00
|
|
|
ext2: ../../servers/ext2/ext2
|
2011-02-23 14:05:28 +01:00
|
|
|
install ${STRIPFLAG} ../../servers/ext2/$@ $@
|
2010-08-04 07:18:03 +02:00
|
|
|
|
|
|
|
../../servers/ext2/ext2:
|
|
|
|
$(MAKE) -C ../../servers/ext2
|
|
|
|
|
2010-05-27 00:49:57 +02:00
|
|
|
system.conf: ../../etc/system.conf
|
2011-02-23 14:05:28 +01:00
|
|
|
install ${STRIPFLAG} ../../etc/$@ $@
|
2010-05-27 00:49:57 +02:00
|
|
|
|
2011-11-22 16:20:05 +01:00
|
|
|
passwd: ../../etc/master.passwd ../../usr.sbin/pwd_mkdb/pwd_mkdb
|
2011-09-30 12:18:10 +02:00
|
|
|
rm -f ../../etc/master.passwd.orig ../../etc/passwd.orig
|
|
|
|
rm -f ../../etc/pwd.db.tmp ../../etc/spwd.db.tmp
|
|
|
|
../../usr.sbin/pwd_mkdb/pwd_mkdb -V 0 -p -d ../../ ../../etc/master.passwd
|
|
|
|
install ${STRIPFLAG} ../../etc/$@ $@
|
|
|
|
|
2011-11-22 16:20:05 +01:00
|
|
|
../../usr.sbin/pwd_mkdb/pwd_mkdb:
|
|
|
|
$(MAKE) -C ../../usr.sbin/pwd_mkdb
|
|
|
|
|
2011-09-30 12:18:10 +02:00
|
|
|
master.passwd: ../../etc/master.passwd
|
|
|
|
install ${STRIPFLAG} ../../etc/$@ $@
|
|
|
|
|
|
|
|
pwd.db: passwd
|
2011-02-23 14:05:28 +01:00
|
|
|
install ${STRIPFLAG} ../../etc/$@ $@
|
2010-05-27 00:49:57 +02:00
|
|
|
|
2011-11-22 18:17:25 +01:00
|
|
|
spwd.db: passwd
|
|
|
|
install ${STRIPFLAG} ../../etc/$@ $@
|
|
|
|
|
2010-07-01 08:14:06 +02:00
|
|
|
rs.single: ../../etc/rs.single
|
2011-02-23 14:05:28 +01:00
|
|
|
install ${STRIPFLAG} ../../etc/$@ $@
|
2010-07-01 08:14:06 +02:00
|
|
|
|
2011-07-30 13:14:00 +02:00
|
|
|
proto.gen: $(PROGRAMS) $(SCRIPTS) proto.sh ${PROTO}
|
2011-10-24 01:53:30 +02:00
|
|
|
for p in $(PROGRAMS); do file $$p | grep -q ELF && strip -s $$p; done
|
2011-07-30 13:14:00 +02:00
|
|
|
sh -e proto.sh ${PROTO} >proto.gen
|
2010-05-27 00:49:57 +02:00
|
|
|
|
2011-07-09 15:04:42 +02:00
|
|
|
.include <minix.service.mk>
|