1 # Makefile for ramdisk image
5 TOOL_PWD_MKDB?
= ${NETBSDSRCDIR}/usr.sbin
/pwd_mkdb
/pwd_mkdb
10 PROG_DRIVERS
=at_wini floppy pci
11 PROG_COMMANDS
=cdprobe loadramdisk mount fsck.mfs sysenv sh \
13 PROG_SERVERS
=mfs procfs
15 PROGRAMS
=$(PROG_DRIVERS
) $(PROG_COMMANDS
) $(PROG_SERVERS
) $(PROG_USRSBIN
)
16 EXTRA
=system.conf master.passwd rs.single
18 .if
${MKSMALL} != "yes"
30 CPPFLAGS
+= -I
${NETBSDSRCDIR}/servers
31 CLEANFILES
+= $(PROGRAMS
) $(SCRIPTS
) $(EXTRA
) image image.c t proto.gen
32 CLEANFILES
+= $(LIBRARIES
) pwd.db spwd.db passwd
34 image
: proto.gen mtab rc
$(EXTRA
) pwd.db spwd.db passwd
35 ${TOOL_MKFSMFS} image proto.gen ||
{ rm -f image
; false
; }
36 # if fsck.mfs -s image | grep -q CLEAN; \
38 # else echo "CLEAN sanity check of image failed." ; \
39 # echo "(Perhaps install current mkfs and fsck.)" ; \
40 # rm -f image; false; \
43 .for driver in
$(PROG_DRIVERS
)
44 $(driver
): ..
/$(driver
)/$(driver
)
47 ..
/$(driver
)/$(driver
):
48 $(MAKE
) -C ..
/$(driver
) $(driver
)
51 .for cmd in
$(PROG_COMMANDS
)
57 $(cmd
): ..
/..
/commands
/$(dir.
$(cmd
))/$(cmd
)
60 ..
/..
/commands
/$(dir.
$(cmd
))/$(cmd
):
61 $(MAKE
) -C ..
/..
/commands
/$(dir.
$(cmd
)) $(cmd
)
65 $(etc
): ..
/..
/etc
/$(etc
)
69 .for cmd in
$(PROG_USRSBIN
)
70 $(cmd
): ..
/..
/usr.sbin
/$(cmd
)/$(cmd
)
73 ..
/..
/usr.sbin
/$(cmd
)/$(cmd
):
74 $(MAKE
) -C ..
/..
/usr.sbin
/$(cmd
) $(cmd
)
77 .for server in
$(PROG_SERVERS
)
78 $(server
): ..
/..
/servers
/$(server
)/$(server
)
81 ..
/..
/servers
/$(server
)/$(server
):
82 $(MAKE
) -C ..
/..
/servers
/$(server
) $(server
)
85 pwd.db spwd.db passwd
: ..
/..
/etc
/master.passwd ..
/..
/usr.sbin
/pwd_mkdb
/pwd_mkdb
86 rm -f ..
/..
/etc
/master.passwd.orig ..
/..
/etc
/passwd.orig
87 rm -f ..
/..
/etc
/pwd.db.tmp ..
/..
/etc
/spwd.db.tmp
88 ${TOOL_PWD_MKDB} -V
0 -p
-d ..
/..
/ ..
/..
/etc
/master.passwd
89 ${INSTALL} ..
/..
/etc
/$@
$@
91 proto.gen
: $(PROGRAMS
) proto.sh
${PROTO} proto.common.etc proto.common.dynamic proto.sh
93 sh
-e proto.sh
${PROTO} >proto.gen
95 .
include <minix.service.mk
>