diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2006-03-13 19:04:00 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2006-03-13 19:04:00 +0000 |
commit | df10094870c28cc0c6c5577c9aa03b8ede9cb8a6 (patch) | |
tree | 49493696039b285aa751a5bc884fc70c9c85e878 /libbb | |
parent | c5b1d4d6b14f22b5e2f7ae42eb01bf2746b8001c (diff) | |
download | busybox-w32-df10094870c28cc0c6c5577c9aa03b8ede9cb8a6.tar.gz busybox-w32-df10094870c28cc0c6c5577c9aa03b8ede9cb8a6.tar.bz2 busybox-w32-df10094870c28cc0c6c5577c9aa03b8ede9cb8a6.zip |
- revert back to r14406
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/Makefile.in | 105 |
1 files changed, 49 insertions, 56 deletions
diff --git a/libbb/Makefile.in b/libbb/Makefile.in index 159957aa4..7b501531a 100644 --- a/libbb/Makefile.in +++ b/libbb/Makefile.in | |||
@@ -4,8 +4,10 @@ | |||
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 | srcdir:=$(top_srcdir)/libbb | 7 | ifndef $(LIBBB_DIR) |
8 | objdir:=$(top_builddir)/libbb | 8 | LIBBB_DIR:=$(top_builddir)/libbb |
9 | endif | ||
10 | srcdir=$(top_srcdir)/libbb | ||
9 | 11 | ||
10 | LIBBB-n:= | 12 | LIBBB-n:= |
11 | LIBBB-y:= \ | 13 | LIBBB-y:= \ |
@@ -49,72 +51,77 @@ LIBBB-y:=$(patsubst %,$(srcdir)/%,$(LIBBB-y)) | |||
49 | 51 | ||
50 | # 1:N objects | 52 | # 1:N objects |
51 | LIBBB_MSRC0:=$(srcdir)/messages.c | 53 | LIBBB_MSRC0:=$(srcdir)/messages.c |
52 | LIBBB_M0:=full_version \ | 54 | LIBBB_MOBJ0:=full_version.o \ |
53 | memory_exhausted invalid_date io_error \ | 55 | memory_exhausted.o invalid_date.o io_error.o \ |
54 | read_error write_error name_longer_than_foo unknown \ | 56 | read_error.o write_error.o name_longer_than_foo.o unknown.o \ |
55 | can_not_create_raw_socket perm_denied_are_you_root \ | 57 | can_not_create_raw_socket.o perm_denied_are_you_root.o \ |
56 | shadow_file passwd_file group_file gshadow_file nologin_file \ | 58 | shadow_file.o passwd_file.o group_file.o gshadow_file.o nologin_file.o \ |
57 | securetty_file motd_file \ | 59 | securetty_file.o motd_file.o \ |
58 | msg_standard_input msg_standard_output shell_file \ | 60 | msg_standard_input.o msg_standard_output.o shell_file.o \ |
59 | bb_dev_null bb_common_bufsiz1 | 61 | bb_dev_null.o bb_common_bufsiz1.o |
60 | LIBBB_MOBJ0:=$(patsubst %,$(objdir)/%$(om),$(LIBBB_M0)) | 62 | LIBBB_MOBJ0:=$(patsubst %,$(LIBBB_DIR)/%, $(LIBBB_MOBJ0)) |
61 | $(LIBBB_MOBJ0):$(LIBBB_MSRC0) | 63 | $(LIBBB_MOBJ0):$(LIBBB_MSRC0) |
64 | $(compile.c) -DL_$(notdir $*) | ||
62 | 65 | ||
63 | LIBBB_MSRC1:=$(srcdir)/xfuncs.c | 66 | LIBBB_MSRC1:=$(srcdir)/xfuncs.c |
64 | LIBBB_M1:=xmalloc xrealloc xcalloc xstrdup xstrndup \ | 67 | LIBBB_MOBJ1:=xmalloc.o xrealloc.o xcalloc.o xstrdup.o xstrndup.o \ |
65 | xfopen xopen xread xread_all xread_char \ | 68 | xfopen.o xopen.o xread.o xread_all.o xread_char.o \ |
66 | xferror xferror_stdout xfflush_stdout strlen | 69 | xferror.o xferror_stdout.o xfflush_stdout.o strlen.o |
67 | LIBBB_MOBJ1:=$(patsubst %,$(objdir)/%$(om),$(LIBBB_M1)) | 70 | LIBBB_MOBJ1:=$(patsubst %,$(LIBBB_DIR)/%, $(LIBBB_MOBJ1)) |
68 | $(LIBBB_MOBJ1):$(LIBBB_MSRC1) | 71 | $(LIBBB_MOBJ1):$(LIBBB_MSRC1) |
72 | $(compile.c) -DL_$(notdir $*) | ||
69 | 73 | ||
70 | LIBBB_MSRC2:=$(srcdir)/printf.c | 74 | LIBBB_MSRC2:=$(srcdir)/printf.c |
71 | LIBBB_M2:=bb_vfprintf bb_vprintf bb_fprintf bb_printf | 75 | LIBBB_MOBJ2:=bb_vfprintf.o bb_vprintf.o bb_fprintf.o bb_printf.o |
72 | LIBBB_MOBJ2:=$(patsubst %,$(objdir)/%$(om),$(LIBBB_M2)) | 76 | LIBBB_MOBJ2:=$(patsubst %,$(LIBBB_DIR)/%, $(LIBBB_MOBJ2)) |
73 | $(LIBBB_MOBJ2):$(LIBBB_MSRC2) | 77 | $(LIBBB_MOBJ2):$(LIBBB_MSRC2) |
78 | $(compile.c) -DL_$(notdir $*) | ||
74 | 79 | ||
75 | LIBBB_MSRC3:=$(srcdir)/xgetularg.c | 80 | LIBBB_MSRC3:=$(srcdir)/xgetularg.c |
76 | LIBBB_M3:=xgetularg_bnd_sfx xgetlarg_bnd_sfx getlarg10_sfx \ | 81 | LIBBB_MOBJ3:=xgetularg_bnd_sfx.o xgetlarg_bnd_sfx.o getlarg10_sfx.o \ |
77 | xgetularg_bnd xgetularg10_bnd xgetularg10 | 82 | xgetularg_bnd.o xgetularg10_bnd.o xgetularg10.o |
78 | LIBBB_MOBJ3:=$(patsubst %,$(objdir)/%$(om),$(LIBBB_M3)) | 83 | LIBBB_MOBJ3:=$(patsubst %,$(LIBBB_DIR)/%, $(LIBBB_MOBJ3)) |
79 | $(LIBBB_MOBJ3):$(LIBBB_MSRC3) | 84 | $(LIBBB_MOBJ3):$(LIBBB_MSRC3) |
85 | $(compile.c) -DL_$(notdir $*) | ||
80 | 86 | ||
81 | LIBBB_MSRC4:=$(srcdir)/safe_strtol.c | 87 | LIBBB_MSRC4:=$(srcdir)/safe_strtol.c |
82 | LIBBB_M4:=safe_strtoi safe_strtod safe_strtol safe_strtoul | 88 | LIBBB_MOBJ4:=safe_strtoi.o safe_strtod.o safe_strtol.o safe_strtoul.o |
83 | LIBBB_MOBJ4:=$(patsubst %,$(objdir)/%$(om),$(LIBBB_M4)) | 89 | LIBBB_MOBJ4:=$(patsubst %,$(LIBBB_DIR)/%, $(LIBBB_MOBJ4)) |
84 | $(LIBBB_MOBJ4):$(LIBBB_MSRC4) | 90 | $(LIBBB_MOBJ4):$(LIBBB_MSRC4) |
91 | $(compile.c) -DL_$(notdir $*) | ||
85 | 92 | ||
86 | LIBBB_MSRC5:=$(srcdir)/bb_pwd.c | 93 | LIBBB_MSRC5:=$(srcdir)/bb_pwd.c |
87 | LIBBB_M5:=bb_xgetpwnam bb_xgetgrnam bb_getgrgid bb_getpwuid \ | 94 | LIBBB_MOBJ5:=bb_xgetpwnam.o bb_xgetgrnam.o bb_getgrgid.o bb_getpwuid.o \ |
88 | bb_getug get_ug_id | 95 | bb_getug.o get_ug_id.o |
89 | LIBBB_MOBJ5:=$(patsubst %,$(objdir)/%$(om),$(LIBBB_M5)) | 96 | LIBBB_MOBJ5:=$(patsubst %,$(LIBBB_DIR)/%, $(LIBBB_MOBJ5)) |
90 | $(LIBBB_MOBJ5):$(LIBBB_MSRC5) | 97 | $(LIBBB_MOBJ5):$(LIBBB_MSRC5) |
98 | $(compile.c) -DL_$(notdir $*) | ||
91 | 99 | ||
92 | LIBBB_MSRC6:=$(srcdir)/llist.c | 100 | LIBBB_MSRC6:=$(srcdir)/llist.c |
93 | LIBBB_M6:=llist_add_to llist_add_to_end llist_free_one llist_free | 101 | LIBBB_MOBJ6:=llist_add_to.o llist_add_to_end.o llist_free_one.o llist_free.o |
94 | LIBBB_MOBJ6:=$(patsubst %,$(objdir)/%$(om),$(LIBBB_M6)) | 102 | LIBBB_MOBJ6:=$(patsubst %,$(LIBBB_DIR)/%, $(LIBBB_MOBJ6)) |
95 | $(LIBBB_MOBJ6):$(LIBBB_MSRC6) | 103 | $(LIBBB_MOBJ6):$(LIBBB_MSRC6) |
104 | $(compile.c) -DL_$(notdir $*) | ||
96 | 105 | ||
97 | 106 | ||
98 | # We need the names of the object files built from MSRC for the L_ defines | 107 | # We need the names of the object files built from MSRC for the L_ defines |
99 | LIBBB_ALL_MDEFS:=$(LIBBB_M0) $(LIBBB_M1) $(LIBBB_M2) $(LIBBB_M3) $(LIBBB_M4) $(LIBBB_M5) $(LIBBB_M6) | 108 | LIBBB_ALL_MOBJ:=$(LIBBB_MOBJ0) $(LIBBB_MOBJ1) $(LIBBB_MOBJ2) $(LIBBB_MOBJ3) $(LIBBB_MOBJ4) $(LIBBB_MOBJ5) $(LIBBB_MOBJ6) |
100 | |||
101 | # All multi objects | ||
102 | libbb_MOBJ$(os):=$(LIBBB_MOBJ0) $(LIBBB_MOBJ1) $(LIBBB_MOBJ2) $(LIBBB_MOBJ3) $(LIBBB_MOBJ4) $(LIBBB_MOBJ5) $(LIBBB_MOBJ6) | ||
103 | 109 | ||
104 | LIBBB_ALL_MSRC:=$(LIBBB_MSRC0) $(LIBBB_MSRC1) $(LIBBB_MSRC2) $(LIBBB_MSRC3) \ | 110 | LIBBB_ALL_MSRC:=$(LIBBB_MSRC0) $(LIBBB_MSRC1) $(LIBBB_MSRC2) $(LIBBB_MSRC3) \ |
105 | $(LIBBB_MSRC4) $(LIBBB_MSRC5) $(LIBBB_MSRC6) | 111 | $(LIBBB_MSRC4) $(LIBBB_MSRC5) $(LIBBB_MSRC6) |
106 | 112 | ||
107 | LIBBB-y:=$(sort $(LIBBB-y)) | 113 | LIBBB-y:=$(sort $(LIBBB-y) $(LIBBB_ALL_MSRC)) |
114 | |||
115 | LIBBB_AR:=$(LIBBB_DIR)/libbb.a | ||
116 | libraries-y+=$(LIBBB_AR) | ||
108 | 117 | ||
109 | needcrypt-y:= | 118 | needcrypt-y:= |
110 | ifneq ($(findstring $(srcdir)/pw_encrypt.c,$(LIBBB-y)),) | 119 | ifneq ($(findstring $(srcdir)/pw_encrypt.c,$(LIBBB-y)),) |
111 | needcrypt-y:=y | 120 | needcrypt-y:=y |
112 | endif | 121 | else |
113 | ifneq ($(findstring $(srcdir)/correct_password.c,$(LIBBB-y)),) | 122 | ifneq ($(findstring $(srcdir)/correct_password.c,$(LIBBB-y)),) |
114 | needcrypt-y:=y | 123 | needcrypt-y:=y |
115 | endif | 124 | endif |
116 | ifeq ($(CONFIG_FEATURE_FULL_LIBBUSYBOX),y) | ||
117 | needcrypt-y:=y | ||
118 | endif | 125 | endif |
119 | 126 | ||
120 | ifeq ($(needcrypt-y),y) | 127 | ifeq ($(needcrypt-y),y) |
@@ -122,32 +129,18 @@ ifeq ($(needcrypt-y),y) | |||
122 | endif | 129 | endif |
123 | 130 | ||
124 | # all 1:1 objects | 131 | # all 1:1 objects |
125 | libbb_OBJ$(os):=$(patsubst $(srcdir)/%.c,$(objdir)/%$(os),$(LIBBB-y)) | 132 | LIBBB_OBJS:=$(patsubst $(srcdir)/%.c,$(LIBBB_DIR)/%.o, $(LIBBB-y)) |
133 | $(LIBBB_DIR)/%.o: $(srcdir)/%.c | ||
134 | $(compile.c) | ||
126 | 135 | ||
127 | LIBBB_SRC-y:=$(sort $(LIBBB-y) $(LIBBB_ALL_MSRC)) | ||
128 | LIBBB_SRC-a:=$(wildcard $(srcdir)/*.c) | 136 | LIBBB_SRC-a:=$(wildcard $(srcdir)/*.c) |
129 | LIBRARY_SRC-y+=$(LIBBB_SRC-y) | 137 | LIBRARY_SRC-y+=$(LIBBB-y) |
130 | LIBRARY_SRC-a+=$(LIBBB_SRC-a) | 138 | LIBRARY_SRC-a+=$(LIBBB_SRC-a) |
131 | 139 | ||
132 | # all defines needed for 1:N objects | 140 | # all defines needed for 1:N objects |
133 | LIBBB_DEFINE-y:=$(patsubst %,-DL_%,$(LIBBB_ALL_MDEFS)) | 141 | LIBBB_DEFINE-y:=$(patsubst %,-DL_%,$(subst .o,,$(notdir $(LIBBB_ALL_MOBJ)))) |
134 | LIBRARY_DEFINE-y+=$(LIBBB_DEFINE-y) | 142 | LIBRARY_DEFINE-y+=$(LIBBB_DEFINE-y) |
135 | LIBRARY_DEFINE-a+=$(LIBBB_DEFINE-y) | 143 | LIBRARY_DEFINE-a+=$(LIBBB_DEFINE-y) |
136 | 144 | ||
137 | ifeq ($(om),.osm) | 145 | $(LIBBB_AR): $(LIBBB_OBJS) $(LIBBB_ALL_MOBJ) |
138 | # XXX FIXME: | 146 | $(do_ar) |
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 | |||
149 | $(libbb_OBJ.os): $(objdir)/%.os: $(srcdir)/%.c | ||
150 | $(libbb_OBJ.o): $(objdir)/%.o: $(srcdir)/%.c | ||
151 | $(objdir)/libbb.a: $(libbb_OBJ$(os)) $(libbb_MOBJ$(os)) | ||
152 | libraries-y:=$(libraries-y) $(objdir)/libbb.a | ||
153 | |||