Patch from vodz:
[oweals/busybox.git] / init / Makefile.in
index 8cc95264d6091c1fa20e8f7e64253a16a1a28b03..1b13f693b2bfc2ee035193705d2a1d112ba91a3d 100644 (file)
@@ -1,6 +1,6 @@
 # Makefile for busybox
 #
-# Copyright (C) 1999-2002 Erik Andersen <andersee@debian.org>
+# Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org>
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -25,10 +25,34 @@ endif
 INIT-y:=
 INIT-$(CONFIG_HALT)                    += halt.o
 INIT-$(CONFIG_INIT)                    += init.o
+INIT-$(CONFIG_MESG)                    += mesg.o
+INIT-$(CONFIG_MINIT)                   += minit.o
+INIT-$(CONFIG_MSVC)                    += msvc.o
+INIT-$(CONFIG_PIDFILEHACK)             += pidfilehack.o
 INIT-$(CONFIG_POWEROFF)                        += poweroff.o
 INIT-$(CONFIG_REBOOT)                  += reboot.o
-INIT-$(CONFIG_START_STOP_DAEMON)       += start_stop_daemon.o
-INIT-$(CONFIG_RUN_PARTS)               += run_parts.o
+
+ifeq ($(CONFIG_HALT), y)
+CONFIG_INIT_SHARED=y
+else
+ifeq ($(CONFIG_INIT), y)
+CONFIG_INIT_SHARED=y
+else
+ifeq ($(CONFIG_POWEROFF), y)
+CONFIG_INIT_SHARED=y
+else
+ifeq ($(CONFIG_REBOOT), y)
+CONFIG_INIT_SHARED=y
+else
+CONFIG_INIT_SHARED=n
+endif
+endif
+endif
+endif
+
+ifeq ($(CONFIG_INIT_SHARED), y)
+INIT-$(CONFIG_INIT_SHARED)        += init_shared.o
+endif
 
 libraries-y+=$(INIT_DIR)$(INIT_AR)