summaryrefslogtreecommitdiffstats
path: root/urunlevel/runlevel/Makefile.in
blob: 787dd18b5130287acf5e858804fdf79f87b9773a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# Makefile for busybox
#
# Copyright (C) 1999-2004 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
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#

RUNLEVEL_AR:=runlevel.a
ifndef $(RUNLEVEL_DIR)
RUNLEVEL_DIR:=$(top_builddir)/runlevel/
endif
srcdir=$(top_srcdir)/runlevel

RUNLEVEL-y:=
RUNLEVEL-$(CONFIG_BOOT_NAMED)	+= boot_named.o
RUNLEVEL-$(CONFIG_BOOT_PORTMAP)	+= boot_portmap.o
RUNLEVEL-$(CONFIG_BOOT_SYSLOG)	+= boot_syslog.o
RUNLEVEL-$(CONFIG_BOOT_TIME)	+= boot_time.o
RUNLEVEL-$(CONFIG_INSTALL_INITD)	+= install_initd.o
RUNLEVEL-$(CONFIG_KILLPROC)	+= killproc.o
RUNLEVEL-$(CONFIG_LOCAL_FS)	+= local_fs.o
RUNLEVEL-$(CONFIG_LOG_FAILURE_MSG)	+= log_failure_msg.o
RUNLEVEL-$(CONFIG_LOG_SUCCESS_MSG)	+= log_success_msg.o
RUNLEVEL-$(CONFIG_LOG_WARNING_MSG)	+= log_warning_msg.o
RUNLEVEL-$(CONFIG_NETWORK)	+= network.o
RUNLEVEL-$(CONFIG_PIDOFPROC)	+= pidofproc.o
RUNLEVEL-$(CONFIG_RC)	+= rc.o
RUNLEVEL-$(CONFIG_REMOTE_FS)	+= remote_fs.o
RUNLEVEL-$(CONFIG_REMOVE_INITD)	+= remove_initd.o
RUNLEVEL-$(CONFIG_START_DAEMON)	+= start_daemon.o
RUNLEVEL-$(CONFIG_UDHCPC_SCRIPT)	+= udhcpc_script.o


#ifeq ($(CONFIG_HALT), y)
CONFIG_RUNLEVEL_SHARED=y
#else
#ifeq ($(CONFIG_INIT), y)
#CONFIG_RUNLEVEL_SHARED=y
#else
#ifeq ($(CONFIG_POWEROFF), y)
#CONFIG_RUNLEVEL_SHARED=y
#else
#ifeq ($(CONFIG_REBOOT), y)
#CONFIG_RUNLEVEL_SHARED=y
#else
#CONFIG_RUNLEVEL_SHARED=n
#endif
#endif
#endif
#endif

ifeq ($(CONFIG_RUNLEVEL_SHARED), y)
RUNLEVEL-$(CONFIG_RUNLEVEL_SHARED)        += lib_init_d.o
endif

libraries-y+=$(RUNLEVEL_DIR)$(RUNLEVEL_AR)

$(RUNLEVEL_DIR)$(RUNLEVEL_AR): $(patsubst %,$(RUNLEVEL_DIR)%, $(RUNLEVEL-y))
	$(AR) -ro $@ $(patsubst %,$(RUNLEVEL_DIR)%, $(RUNLEVEL-y))

$(RUNLEVEL_DIR)%.o: $(srcdir)/%.c
	$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<