OBJECTS=$(shell ./busybox.sh)
CFLAGS+= -DBB_VER='"$(VERSION)"'
CFLAGS+= -DBB_BT='"$(BUILDTIME)"'
+ifdef BB_INIT_RC_EXIT_CMD
+ CFLAGS += -DBB_INIT_CMD_IF_RC_SCRIPT_EXITS=${BB_INIT_RC_EXIT_CMD}
+endif
all: busybox busybox.links
busybox.links:
- ./busybox.mkll | sort >$@
-
+
clean:
- rm -f $(PROG) busybox.links *~ *.o core
- rm -rf busybox_install
distclean: clean
- rm -f $(PROG)
-force:
-
$(OBJECTS): busybox.def.h internal.h Makefile
install: busybox busybox.links
./install.sh $(PREFIX)
-whichversion:
- @echo $(VERSION)
-
-
dist: release
release: distclean
(cd .. ; rm -rf busybox-$(VERSION) ; cp -a busybox busybox-$(VERSION); rm -rf busybox-$(VERSION)/CVS busybox-$(VERSION)/.cvsignore ; tar -cvzf busybox-$(VERSION).tar.gz busybox-$(VERSION))
+
while ((m = getmntent (mountTable)) != 0) {
char *blockDevice = m->mnt_fsname;
#if ! defined BB_MTAB
- if (strcmp (blockDevice, "/dev/root") == 0)
- blockDevice = (getfsfile ("/"))->fs_spec;
+ if (strcmp (blockDevice, "/dev/root") == 0) {
+ struct fstab* fstabItem;
+ fstabItem = getfsfile ("/");
+ if (fstabItem != NULL) {
+ blockDevice = fstabItem->fs_spec;
+ }
+ }
#endif
/* Don't umount /proc when doing umount -a */
if (strcmp (blockDevice, "proc") == 0)
while ((m = getmntent (mountTable)) != 0) {
char *blockDevice = m->mnt_fsname;
#if ! defined BB_MTAB
- if (strcmp (blockDevice, "/dev/root") == 0)
- blockDevice = (getfsfile ("/"))->fs_spec;
+ if (strcmp (blockDevice, "/dev/root") == 0) {
+ struct fstab* fstabItem;
+ fstabItem = getfsfile ("/");
+ if (fstabItem != NULL) {
+ blockDevice = fstabItem->fs_spec;
+ }
+ }
#endif
/* Don't umount /proc when doing umount -a */
if (strcmp (blockDevice, "proc") == 0)