diff options
author | aldot <aldot@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-03-01 22:54:48 +0000 |
---|---|---|
committer | aldot <aldot@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-03-01 22:54:48 +0000 |
commit | 3e42de836e4e08c6226383f84de0f734f96c8697 (patch) | |
tree | 233c051da862595b6e473e832051708e2d9803cb /libbb | |
parent | b7c6f4ee19e3b2a465d2ef8c1ec3e51e6572e7ff (diff) | |
download | busybox-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.in | 102 |
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 | ||
7 | ifndef $(LIBBB_DIR) | ||
8 | LIBBB_DIR:=$(top_builddir)/libbb | ||
9 | endif | ||
10 | srcdir=$(top_srcdir)/libbb | 7 | srcdir=$(top_srcdir)/libbb |
8 | objdir=$(top_builddir)/libbb | ||
11 | 9 | ||
12 | LIBBB-n:= | 10 | LIBBB-n:= |
13 | LIBBB-y:= \ | 11 | LIBBB-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 | |||
47 | LIBBB-$(CONFIG_LOGIN)+= correct_password.c | 45 | LIBBB-$(CONFIG_LOGIN)+= correct_password.c |
48 | 46 | ||
49 | 47 | ||
50 | LIBBB-y:=$(patsubst %,$(srcdir)/%,$(LIBBB-y)) | 48 | LIBBB-y:=$(patsubst %,$(srcdir)/%,$(LIBBB-y) $(LIBBB-m)) |
51 | 49 | ||
52 | # 1:N objects | 50 | # 1:N objects |
53 | LIBBB_MSRC0:=$(srcdir)/messages.c | 51 | LIBBB_MSRC0:=$(srcdir)/messages.c |
54 | LIBBB_MOBJ0:=full_version.o \ | 52 | LIBBB_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 |
62 | LIBBB_MOBJ0:=$(patsubst %,$(LIBBB_DIR)/%, $(LIBBB_MOBJ0)) | 60 | LIBBB_MOBJ0:=$(patsubst %,$(objdir)/%$(om),$(LIBBB_M0)) |
63 | $(LIBBB_MOBJ0):$(LIBBB_MSRC0) | 61 | $(LIBBB_MOBJ0):$(LIBBB_MSRC0) |
64 | $(compile.c) -DL_$(notdir $*) | ||
65 | 62 | ||
66 | LIBBB_MSRC1:=$(srcdir)/xfuncs.c | 63 | LIBBB_MSRC1:=$(srcdir)/xfuncs.c |
67 | LIBBB_MOBJ1:=xmalloc.o xrealloc.o xcalloc.o xstrdup.o xstrndup.o \ | 64 | LIBBB_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 |
70 | LIBBB_MOBJ1:=$(patsubst %,$(LIBBB_DIR)/%, $(LIBBB_MOBJ1)) | 67 | LIBBB_MOBJ1:=$(patsubst %,$(objdir)/%$(om),$(LIBBB_M1)) |
71 | $(LIBBB_MOBJ1):$(LIBBB_MSRC1) | 68 | $(LIBBB_MOBJ1):$(LIBBB_MSRC1) |
72 | $(compile.c) -DL_$(notdir $*) | ||
73 | 69 | ||
74 | LIBBB_MSRC2:=$(srcdir)/printf.c | 70 | LIBBB_MSRC2:=$(srcdir)/printf.c |
75 | LIBBB_MOBJ2:=bb_vfprintf.o bb_vprintf.o bb_fprintf.o bb_printf.o | 71 | LIBBB_M2:=bb_vfprintf bb_vprintf bb_fprintf bb_printf |
76 | LIBBB_MOBJ2:=$(patsubst %,$(LIBBB_DIR)/%, $(LIBBB_MOBJ2)) | 72 | LIBBB_MOBJ2:=$(patsubst %,$(objdir)/%$(om),$(LIBBB_M2)) |
77 | $(LIBBB_MOBJ2):$(LIBBB_MSRC2) | 73 | $(LIBBB_MOBJ2):$(LIBBB_MSRC2) |
78 | $(compile.c) -DL_$(notdir $*) | ||
79 | 74 | ||
80 | LIBBB_MSRC3:=$(srcdir)/xgetularg.c | 75 | LIBBB_MSRC3:=$(srcdir)/xgetularg.c |
81 | LIBBB_MOBJ3:=xgetularg_bnd_sfx.o xgetlarg_bnd_sfx.o getlarg10_sfx.o \ | 76 | LIBBB_M3:=xgetularg_bnd_sfx xgetlarg_bnd_sfx getlarg10_sfx \ |
82 | xgetularg_bnd.o xgetularg10_bnd.o xgetularg10.o | 77 | xgetularg_bnd xgetularg10_bnd xgetularg10 |
83 | LIBBB_MOBJ3:=$(patsubst %,$(LIBBB_DIR)/%, $(LIBBB_MOBJ3)) | 78 | LIBBB_MOBJ3:=$(patsubst %,$(objdir)/%$(om),$(LIBBB_M3)) |
84 | $(LIBBB_MOBJ3):$(LIBBB_MSRC3) | 79 | $(LIBBB_MOBJ3):$(LIBBB_MSRC3) |
85 | $(compile.c) -DL_$(notdir $*) | ||
86 | 80 | ||
87 | LIBBB_MSRC4:=$(srcdir)/safe_strtol.c | 81 | LIBBB_MSRC4:=$(srcdir)/safe_strtol.c |
88 | LIBBB_MOBJ4:=safe_strtoi.o safe_strtod.o safe_strtol.o safe_strtoul.o | 82 | LIBBB_M4:=safe_strtoi safe_strtod safe_strtol safe_strtoul |
89 | LIBBB_MOBJ4:=$(patsubst %,$(LIBBB_DIR)/%, $(LIBBB_MOBJ4)) | 83 | LIBBB_MOBJ4:=$(patsubst %,$(objdir)/%$(om),$(LIBBB_M4)) |
90 | $(LIBBB_MOBJ4):$(LIBBB_MSRC4) | 84 | $(LIBBB_MOBJ4):$(LIBBB_MSRC4) |
91 | $(compile.c) -DL_$(notdir $*) | ||
92 | 85 | ||
93 | LIBBB_MSRC5:=$(srcdir)/bb_pwd.c | 86 | LIBBB_MSRC5:=$(srcdir)/bb_pwd.c |
94 | LIBBB_MOBJ5:=bb_xgetpwnam.o bb_xgetgrnam.o bb_getgrgid.o bb_getpwuid.o \ | 87 | LIBBB_M5:=bb_xgetpwnam bb_xgetgrnam bb_getgrgid bb_getpwuid \ |
95 | bb_getug.o get_ug_id.o | 88 | bb_getug get_ug_id |
96 | LIBBB_MOBJ5:=$(patsubst %,$(LIBBB_DIR)/%, $(LIBBB_MOBJ5)) | 89 | LIBBB_MOBJ5:=$(patsubst %,$(objdir)/%$(om),$(LIBBB_M5)) |
97 | $(LIBBB_MOBJ5):$(LIBBB_MSRC5) | 90 | $(LIBBB_MOBJ5):$(LIBBB_MSRC5) |
98 | $(compile.c) -DL_$(notdir $*) | ||
99 | 91 | ||
100 | LIBBB_MSRC6:=$(srcdir)/llist.c | 92 | LIBBB_MSRC6:=$(srcdir)/llist.c |
101 | LIBBB_MOBJ6:=llist_add_to.o llist_add_to_end.o llist_free_one.o llist_free.o | 93 | LIBBB_M6:=llist_add_to llist_add_to_end llist_free_one llist_free |
102 | LIBBB_MOBJ6:=$(patsubst %,$(LIBBB_DIR)/%, $(LIBBB_MOBJ6)) | 94 | LIBBB_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 |
108 | LIBBB_ALL_MOBJ:=$(LIBBB_MOBJ0) $(LIBBB_MOBJ1) $(LIBBB_MOBJ2) $(LIBBB_MOBJ3) $(LIBBB_MOBJ4) $(LIBBB_MOBJ5) $(LIBBB_MOBJ6) | 99 | LIBBB_ALL_MDEFS:=$(LIBBB_M0) $(LIBBB_M1) $(LIBBB_M2) $(LIBBB_M3) $(LIBBB_M4) $(LIBBB_M5) $(LIBBB_M6) |
100 | |||
101 | # All multi objects | ||
102 | libbb_MOBJ$(os):=$(LIBBB_MOBJ0) $(LIBBB_MOBJ1) $(LIBBB_MOBJ2) $(LIBBB_MOBJ3) $(LIBBB_MOBJ4) $(LIBBB_MOBJ5) $(LIBBB_MOBJ6) | ||
109 | 103 | ||
110 | LIBBB_ALL_MSRC:=$(LIBBB_MSRC0) $(LIBBB_MSRC1) $(LIBBB_MSRC2) $(LIBBB_MSRC3) \ | 104 | LIBBB_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 | ||
113 | LIBBB-y:=$(sort $(LIBBB-y) $(LIBBB_ALL_MSRC)) | 107 | LIBBB-y:=$(sort $(LIBBB-y)) |
114 | |||
115 | LIBBB_AR:=$(LIBBB_DIR)/libbb.a | ||
116 | libraries-y+=$(LIBBB_AR) | ||
117 | 108 | ||
118 | needcrypt-y:= | 109 | needcrypt-y:= |
119 | ifneq ($(findstring $(srcdir)/pw_encrypt.c,$(LIBBB-y)),) | 110 | ifneq ($(findstring $(srcdir)/pw_encrypt.c,$(LIBBB-y)),) |
120 | needcrypt-y:=y | 111 | needcrypt-y:=y |
121 | else | 112 | endif |
122 | ifneq ($(findstring $(srcdir)/correct_password.c,$(LIBBB-y)),) | 113 | ifneq ($(findstring $(srcdir)/correct_password.c,$(LIBBB-y)),) |
123 | needcrypt-y:=y | 114 | needcrypt-y:=y |
124 | endif | 115 | endif |
116 | ifeq ($(CONFIG_FEATURE_FULL_LIBBUSYBOX),y) | ||
117 | needcrypt-y:=y | ||
125 | endif | 118 | endif |
126 | 119 | ||
127 | ifeq ($(needcrypt-y),y) | 120 | ifeq ($(needcrypt-y),y) |
@@ -129,18 +122,27 @@ ifeq ($(needcrypt-y),y) | |||
129 | endif | 122 | endif |
130 | 123 | ||
131 | # all 1:1 objects | 124 | # all 1:1 objects |
132 | LIBBB_OBJS:=$(patsubst $(srcdir)/%.c,$(LIBBB_DIR)/%.o, $(LIBBB-y)) | 125 | libbb_OBJ$(os):=$(patsubst $(srcdir)/%.c,$(objdir)/%$(os),$(LIBBB-y)) |
133 | $(LIBBB_DIR)/%.o: $(srcdir)/%.c | ||
134 | $(compile.c) | ||
135 | 126 | ||
127 | LIBBB_SRC-y:=$(sort $(LIBBB-y) $(LIBBB_ALL_MSRC)) | ||
136 | LIBBB_SRC-a:=$(wildcard $(srcdir)/*.c) | 128 | LIBBB_SRC-a:=$(wildcard $(srcdir)/*.c) |
137 | LIBRARY_SRC-y+=$(LIBBB-y) | 129 | LIBRARY_SRC-y+=$(LIBBB_SRC-y) |
138 | LIBRARY_SRC-a+=$(LIBBB_SRC-a) | 130 | LIBRARY_SRC-a+=$(LIBBB_SRC-a) |
139 | 131 | ||
140 | # all defines needed for 1:N objects | 132 | # all defines needed for 1:N objects |
141 | LIBBB_DEFINE-y:=$(patsubst %,-DL_%,$(subst .o,,$(notdir $(LIBBB_ALL_MOBJ)))) | 133 | LIBBB_DEFINE-y:=$(patsubst %,-DL_%,$(LIBBB_ALL_MDEFS)) |
142 | LIBRARY_DEFINE-y+=$(LIBBB_DEFINE-y) | 134 | LIBRARY_DEFINE-y+=$(LIBBB_DEFINE-y) |
143 | LIBRARY_DEFINE-a+=$(LIBBB_DEFINE-y) | 135 | LIBRARY_DEFINE-a+=$(LIBBB_DEFINE-y) |
144 | 136 | ||
145 | $(LIBBB_AR): $(LIBBB_OBJS) $(LIBBB_ALL_MOBJ) | 137 | ifeq ($(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) | ||
147 | endif | ||
148 | |||