aboutsummaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authoraldot <aldot@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-03-01 22:54:48 +0000
committeraldot <aldot@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-03-01 22:54:48 +0000
commit3e42de836e4e08c6226383f84de0f734f96c8697 (patch)
tree233c051da862595b6e473e832051708e2d9803cb /libbb
parentb7c6f4ee19e3b2a465d2ef8c1ec3e51e6572e7ff (diff)
downloadbusybox-w32-3e42de836e4e08c6226383f84de0f734f96c8697.tar.gz
busybox-w32-3e42de836e4e08c6226383f84de0f734f96c8697.tar.bz2
busybox-w32-3e42de836e4e08c6226383f84de0f734f96c8697.zip
- fixes parallel builds (make -j)
- use less resources for the buildsystem itself git-svn-id: svn://busybox.net/trunk/busybox@14407 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'libbb')
-rw-r--r--libbb/Makefile.in102
1 files changed, 52 insertions, 50 deletions
diff --git a/libbb/Makefile.in b/libbb/Makefile.in
index 51a162e3d..3828a42db 100644
--- a/libbb/Makefile.in
+++ b/libbb/Makefile.in
@@ -4,10 +4,8 @@
4# 4#
5# Licensed under the GPL v2, see the file LICENSE in this tarball. 5# Licensed under the GPL v2, see the file LICENSE in this tarball.
6 6
7ifndef $(LIBBB_DIR)
8LIBBB_DIR:=$(top_builddir)/libbb
9endif
10srcdir=$(top_srcdir)/libbb 7srcdir=$(top_srcdir)/libbb
8objdir=$(top_builddir)/libbb
11 9
12LIBBB-n:= 10LIBBB-n:=
13LIBBB-y:= \ 11LIBBB-y:= \
@@ -20,7 +18,7 @@ LIBBB-y:= \
20 herror_msg.c herror_msg_and_die.c \ 18 herror_msg.c herror_msg_and_die.c \
21 human_readable.c inet_common.c inode_hash.c isdirectory.c \ 19 human_readable.c inet_common.c inode_hash.c isdirectory.c \
22 kernel_version.c last_char_is.c login.c loop.c \ 20 kernel_version.c last_char_is.c login.c loop.c \
23 make_directory.c md5.c mode_string.c mtab.c mtab_file.c \ 21 make_directory.c md5.c mode_string.c mtab_file.c \
24 obscure.c parse_mode.c parse_number.c perror_msg.c \ 22 obscure.c parse_mode.c parse_number.c perror_msg.c \
25 perror_msg_and_die.c print_file.c get_console.c \ 23 perror_msg_and_die.c print_file.c get_console.c \
26 process_escape_sequence.c procps.c qmodule.c \ 24 process_escape_sequence.c procps.c qmodule.c \
@@ -47,81 +45,76 @@ LIBBB-$(CONFIG_SU)+= correct_password.c
47LIBBB-$(CONFIG_LOGIN)+= correct_password.c 45LIBBB-$(CONFIG_LOGIN)+= correct_password.c
48 46
49 47
50LIBBB-y:=$(patsubst %,$(srcdir)/%,$(LIBBB-y)) 48LIBBB-y:=$(patsubst %,$(srcdir)/%,$(LIBBB-y) $(LIBBB-m))
51 49
52# 1:N objects 50# 1:N objects
53LIBBB_MSRC0:=$(srcdir)/messages.c 51LIBBB_MSRC0:=$(srcdir)/messages.c
54LIBBB_MOBJ0:=full_version.o \ 52LIBBB_M0:=full_version \
55 memory_exhausted.o invalid_date.o io_error.o \ 53 memory_exhausted invalid_date io_error \
56 read_error.o write_error.o name_longer_than_foo.o unknown.o \ 54 read_error write_error name_longer_than_foo unknown \
57 can_not_create_raw_socket.o perm_denied_are_you_root.o \ 55 can_not_create_raw_socket perm_denied_are_you_root \
58 shadow_file.o passwd_file.o group_file.o gshadow_file.o nologin_file.o \ 56 shadow_file passwd_file group_file gshadow_file nologin_file \
59 securetty_file.o motd_file.o \ 57 securetty_file motd_file \
60 msg_standard_input.o msg_standard_output.o shell_file.o \ 58 msg_standard_input msg_standard_output shell_file \
61 bb_dev_null.o bb_common_bufsiz1.o 59 bb_dev_null bb_common_bufsiz1
62LIBBB_MOBJ0:=$(patsubst %,$(LIBBB_DIR)/%, $(LIBBB_MOBJ0)) 60LIBBB_MOBJ0:=$(patsubst %,$(objdir)/%$(om),$(LIBBB_M0))
63$(LIBBB_MOBJ0):$(LIBBB_MSRC0) 61$(LIBBB_MOBJ0):$(LIBBB_MSRC0)
64 $(compile.c) -DL_$(notdir $*)
65 62
66LIBBB_MSRC1:=$(srcdir)/xfuncs.c 63LIBBB_MSRC1:=$(srcdir)/xfuncs.c
67LIBBB_MOBJ1:=xmalloc.o xrealloc.o xcalloc.o xstrdup.o xstrndup.o \ 64LIBBB_M1:=xmalloc xrealloc xcalloc xstrdup xstrndup \
68 xfopen.o xopen.o xread.o xread_all.o xread_char.o \ 65 xfopen xopen xread xread_all xread_char \
69 xferror.o xferror_stdout.o xfflush_stdout.o strlen.o 66 xferror xferror_stdout xfflush_stdout strlen
70LIBBB_MOBJ1:=$(patsubst %,$(LIBBB_DIR)/%, $(LIBBB_MOBJ1)) 67LIBBB_MOBJ1:=$(patsubst %,$(objdir)/%$(om),$(LIBBB_M1))
71$(LIBBB_MOBJ1):$(LIBBB_MSRC1) 68$(LIBBB_MOBJ1):$(LIBBB_MSRC1)
72 $(compile.c) -DL_$(notdir $*)
73 69
74LIBBB_MSRC2:=$(srcdir)/printf.c 70LIBBB_MSRC2:=$(srcdir)/printf.c
75LIBBB_MOBJ2:=bb_vfprintf.o bb_vprintf.o bb_fprintf.o bb_printf.o 71LIBBB_M2:=bb_vfprintf bb_vprintf bb_fprintf bb_printf
76LIBBB_MOBJ2:=$(patsubst %,$(LIBBB_DIR)/%, $(LIBBB_MOBJ2)) 72LIBBB_MOBJ2:=$(patsubst %,$(objdir)/%$(om),$(LIBBB_M2))
77$(LIBBB_MOBJ2):$(LIBBB_MSRC2) 73$(LIBBB_MOBJ2):$(LIBBB_MSRC2)
78 $(compile.c) -DL_$(notdir $*)
79 74
80LIBBB_MSRC3:=$(srcdir)/xgetularg.c 75LIBBB_MSRC3:=$(srcdir)/xgetularg.c
81LIBBB_MOBJ3:=xgetularg_bnd_sfx.o xgetlarg_bnd_sfx.o getlarg10_sfx.o \ 76LIBBB_M3:=xgetularg_bnd_sfx xgetlarg_bnd_sfx getlarg10_sfx \
82 xgetularg_bnd.o xgetularg10_bnd.o xgetularg10.o 77 xgetularg_bnd xgetularg10_bnd xgetularg10
83LIBBB_MOBJ3:=$(patsubst %,$(LIBBB_DIR)/%, $(LIBBB_MOBJ3)) 78LIBBB_MOBJ3:=$(patsubst %,$(objdir)/%$(om),$(LIBBB_M3))
84$(LIBBB_MOBJ3):$(LIBBB_MSRC3) 79$(LIBBB_MOBJ3):$(LIBBB_MSRC3)
85 $(compile.c) -DL_$(notdir $*)
86 80
87LIBBB_MSRC4:=$(srcdir)/safe_strtol.c 81LIBBB_MSRC4:=$(srcdir)/safe_strtol.c
88LIBBB_MOBJ4:=safe_strtoi.o safe_strtod.o safe_strtol.o safe_strtoul.o 82LIBBB_M4:=safe_strtoi safe_strtod safe_strtol safe_strtoul
89LIBBB_MOBJ4:=$(patsubst %,$(LIBBB_DIR)/%, $(LIBBB_MOBJ4)) 83LIBBB_MOBJ4:=$(patsubst %,$(objdir)/%$(om),$(LIBBB_M4))
90$(LIBBB_MOBJ4):$(LIBBB_MSRC4) 84$(LIBBB_MOBJ4):$(LIBBB_MSRC4)
91 $(compile.c) -DL_$(notdir $*)
92 85
93LIBBB_MSRC5:=$(srcdir)/bb_pwd.c 86LIBBB_MSRC5:=$(srcdir)/bb_pwd.c
94LIBBB_MOBJ5:=bb_xgetpwnam.o bb_xgetgrnam.o bb_getgrgid.o bb_getpwuid.o \ 87LIBBB_M5:=bb_xgetpwnam bb_xgetgrnam bb_getgrgid bb_getpwuid \
95 bb_getug.o get_ug_id.o 88 bb_getug get_ug_id
96LIBBB_MOBJ5:=$(patsubst %,$(LIBBB_DIR)/%, $(LIBBB_MOBJ5)) 89LIBBB_MOBJ5:=$(patsubst %,$(objdir)/%$(om),$(LIBBB_M5))
97$(LIBBB_MOBJ5):$(LIBBB_MSRC5) 90$(LIBBB_MOBJ5):$(LIBBB_MSRC5)
98 $(compile.c) -DL_$(notdir $*)
99 91
100LIBBB_MSRC6:=$(srcdir)/llist.c 92LIBBB_MSRC6:=$(srcdir)/llist.c
101LIBBB_MOBJ6:=llist_add_to.o llist_add_to_end.o llist_free_one.o llist_free.o 93LIBBB_M6:=llist_add_to llist_add_to_end llist_free_one llist_free
102LIBBB_MOBJ6:=$(patsubst %,$(LIBBB_DIR)/%, $(LIBBB_MOBJ6)) 94LIBBB_MOBJ6:=$(patsubst %,$(objdir)/%$(om),$(LIBBB_M6))
103$(LIBBB_MOBJ6):$(LIBBB_MSRC6) 95$(LIBBB_MOBJ6):$(LIBBB_MSRC6)
104 $(compile.c) -DL_$(notdir $*)
105 96
106 97
107# We need the names of the object files built from MSRC for the L_ defines 98# We need the names of the object files built from MSRC for the L_ defines
108LIBBB_ALL_MOBJ:=$(LIBBB_MOBJ0) $(LIBBB_MOBJ1) $(LIBBB_MOBJ2) $(LIBBB_MOBJ3) $(LIBBB_MOBJ4) $(LIBBB_MOBJ5) $(LIBBB_MOBJ6) 99LIBBB_ALL_MDEFS:=$(LIBBB_M0) $(LIBBB_M1) $(LIBBB_M2) $(LIBBB_M3) $(LIBBB_M4) $(LIBBB_M5) $(LIBBB_M6)
100
101# All multi objects
102libbb_MOBJ$(os):=$(LIBBB_MOBJ0) $(LIBBB_MOBJ1) $(LIBBB_MOBJ2) $(LIBBB_MOBJ3) $(LIBBB_MOBJ4) $(LIBBB_MOBJ5) $(LIBBB_MOBJ6)
109 103
110LIBBB_ALL_MSRC:=$(LIBBB_MSRC0) $(LIBBB_MSRC1) $(LIBBB_MSRC2) $(LIBBB_MSRC3) \ 104LIBBB_ALL_MSRC:=$(LIBBB_MSRC0) $(LIBBB_MSRC1) $(LIBBB_MSRC2) $(LIBBB_MSRC3) \
111 $(LIBBB_MSRC4) $(LIBBB_MSRC5) $(LIBBB_MSRC6) 105 $(LIBBB_MSRC4) $(LIBBB_MSRC5) $(LIBBB_MSRC6)
112 106
113LIBBB-y:=$(sort $(LIBBB-y) $(LIBBB_ALL_MSRC)) 107LIBBB-y:=$(sort $(LIBBB-y))
114
115LIBBB_AR:=$(LIBBB_DIR)/libbb.a
116libraries-y+=$(LIBBB_AR)
117 108
118needcrypt-y:= 109needcrypt-y:=
119ifneq ($(findstring $(srcdir)/pw_encrypt.c,$(LIBBB-y)),) 110ifneq ($(findstring $(srcdir)/pw_encrypt.c,$(LIBBB-y)),)
120needcrypt-y:=y 111needcrypt-y:=y
121else 112endif
122ifneq ($(findstring $(srcdir)/correct_password.c,$(LIBBB-y)),) 113ifneq ($(findstring $(srcdir)/correct_password.c,$(LIBBB-y)),)
123needcrypt-y:=y 114needcrypt-y:=y
124endif 115endif
116ifeq ($(CONFIG_FEATURE_FULL_LIBBUSYBOX),y)
117needcrypt-y:=y
125endif 118endif
126 119
127ifeq ($(needcrypt-y),y) 120ifeq ($(needcrypt-y),y)
@@ -129,18 +122,27 @@ ifeq ($(needcrypt-y),y)
129endif 122endif
130 123
131# all 1:1 objects 124# all 1:1 objects
132LIBBB_OBJS:=$(patsubst $(srcdir)/%.c,$(LIBBB_DIR)/%.o, $(LIBBB-y)) 125libbb_OBJ$(os):=$(patsubst $(srcdir)/%.c,$(objdir)/%$(os),$(LIBBB-y))
133$(LIBBB_DIR)/%.o: $(srcdir)/%.c
134 $(compile.c)
135 126
127LIBBB_SRC-y:=$(sort $(LIBBB-y) $(LIBBB_ALL_MSRC))
136LIBBB_SRC-a:=$(wildcard $(srcdir)/*.c) 128LIBBB_SRC-a:=$(wildcard $(srcdir)/*.c)
137LIBRARY_SRC-y+=$(LIBBB-y) 129LIBRARY_SRC-y+=$(LIBBB_SRC-y)
138LIBRARY_SRC-a+=$(LIBBB_SRC-a) 130LIBRARY_SRC-a+=$(LIBBB_SRC-a)
139 131
140# all defines needed for 1:N objects 132# all defines needed for 1:N objects
141LIBBB_DEFINE-y:=$(patsubst %,-DL_%,$(subst .o,,$(notdir $(LIBBB_ALL_MOBJ)))) 133LIBBB_DEFINE-y:=$(patsubst %,-DL_%,$(LIBBB_ALL_MDEFS))
142LIBRARY_DEFINE-y+=$(LIBBB_DEFINE-y) 134LIBRARY_DEFINE-y+=$(LIBBB_DEFINE-y)
143LIBRARY_DEFINE-a+=$(LIBBB_DEFINE-y) 135LIBRARY_DEFINE-a+=$(LIBBB_DEFINE-y)
144 136
145$(LIBBB_AR): $(LIBBB_OBJS) $(LIBBB_ALL_MOBJ) 137ifeq ($(om),.osm)
146 $(do_ar) 138# XXX FIXME:
139# also create a pattern for the non-shared case
140$(LIBBB_MOBJ0:.osm=.om): $(LIBBB_MSRC0)
141$(LIBBB_MOBJ1:.osm=.om): $(LIBBB_MSRC1)
142$(LIBBB_MOBJ2:.osm=.om): $(LIBBB_MSRC2)
143$(LIBBB_MOBJ3:.osm=.om): $(LIBBB_MSRC3)
144$(LIBBB_MOBJ4:.osm=.om): $(LIBBB_MSRC4)
145$(LIBBB_MOBJ5:.osm=.om): $(LIBBB_MSRC5)
146$(LIBBB_MOBJ6:.osm=.om): $(LIBBB_MSRC6)
147endif
148