minix/drivers/ramdisk/Makefile

95 lines
2.2 KiB
Makefile
Raw Normal View History

# Makefile for ramdisk image
.include <bsd.own.mk>
PROG_DRIVERS=at_wini floppy pci
PROG_COMMANDS=cdprobe dev2name loadramdisk mount fsck.mfs sysenv sh \
service
PROG_SERVERS=mfs procfs
PROG_USRSBIN=pwd_mkdb
PROGRAMS=$(PROG_DRIVERS) $(PROG_COMMANDS) $(PROG_SERVERS) $(PROG_USRSBIN)
EXTRA=system.conf master.passwd pwd.db spwd.db rs.single
2011-08-01 11:05:17 +02:00
.if ${MKSMALL} != "yes"
PROG_DRIVERS+= ahci
PROG_SERVERS+= ext2
PROTO= proto
.else
2011-08-01 11:05:17 +02:00
PROTO= proto.small
.endif
.if ${MKACPI} != "no"
PROG_DRIVERS+= acpi
.endif
2010-07-06 11:19:04 +02:00
CPPFLAGS+= -I${MINIXSRCDIR}/servers -I${MINIXSRCDIR}
CLEANFILES += $(PROGRAMS) $(SCRIPTS) $(EXTRA) image image.c t proto.gen
CLEANFILES += $(LIBRARIES)
2010-06-01 17:11:43 +02:00
install: all
realall: image
image: proto.gen mtab rc $(EXTRA) passwd
mkfs.mfs 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
.for driver in $(PROG_DRIVERS)
$(driver): ../$(driver)/$(driver)
install $> $@
../$(driver)/$(driver):
$(MAKE) -C ../$(driver) $(driver)
.endfor
.for cmd in $(PROG_COMMANDS)
.if $(cmd) == sh
dir.$(cmd)=ash
.else
dir.$(cmd)=$(cmd)
.endif
$(cmd): ../../commands/$(dir.$(cmd))/$(cmd)
install $> $@
../../commands/$(dir.$(cmd))/$(cmd):
$(MAKE) -C ../../commands/$(dir.$(cmd)) $(cmd)
.endfor
.for etc in $(EXTRA)
$(etc): ../../etc/$(etc)
install $> $@
.endfor
.for cmd in $(PROG_USRSBIN)
$(cmd): ../../usr.sbin/$(cmd)/$(cmd)
install $> $@
../../usr.sbin/$(cmd)/$(cmd):
$(MAKE) -C ../../usr.sbin/$(cmd) $(cmd)
.endfor
.for server in $(PROG_SERVERS)
$(server): ../../servers/$(server)/$(server)
install $> $@
../../servers/$(server)/$(server):
$(MAKE) -C ../../servers/$(server) $(server)
.endfor
2011-11-22 16:20:05 +01:00
passwd: ../../etc/master.passwd ../../usr.sbin/pwd_mkdb/pwd_mkdb
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 ../../etc/$@ $@
proto.gen: $(PROGRAMS) proto.sh ${PROTO} proto.common.etc proto.common.dynamic proto.sh
strip $(PROGRAMS)
sh -e proto.sh ${PROTO} >proto.gen
2011-07-09 15:04:42 +02:00
.include <minix.service.mk>