aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile28
1 files changed, 27 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 285f3ab66..d5587ae4f 100644
--- a/Makefile
+++ b/Makefile
@@ -42,6 +42,17 @@ DOSTATIC = false
42# Do not enable this for production builds... 42# Do not enable this for production builds...
43DODEBUG = false 43DODEBUG = false
44 44
45# Setting this to `true' will cause busybox to directly use the system's
46# password and group functions. Assuming you use GNU libc, when this is
47# `true', you will need to install the /etc/nsswitch.conf configuration file
48# and the required libnss_* libraries. This generally makes your embedded
49# system quite a bit larger... If you leave this off, busybox will directly
50# use the /etc/password, /etc/group files (and your system will be smaller, and
51# I will get fewer emails asking about how glibc NSS works). Enabling this adds
52# just 1.4k to the binary size (which is a _lot_ less then glibc NSS costs),
53# Most people will want to leave this set to false.
54USE_SYSTEM_PWD_GRP = false
55
45# This enables compiling with dmalloc ( http://dmalloc.com/ ) 56# This enables compiling with dmalloc ( http://dmalloc.com/ )
46# which is an excellent public domain mem leak and malloc problem 57# which is an excellent public domain mem leak and malloc problem
47# detector. To enable dmalloc, before running busybox you will 58# detector. To enable dmalloc, before running busybox you will
@@ -158,10 +169,20 @@ ifdef BB_INIT_SCRIPT
158 CFLAGS += -DINIT_SCRIPT='"$(BB_INIT_SCRIPT)"' 169 CFLAGS += -DINIT_SCRIPT='"$(BB_INIT_SCRIPT)"'
159endif 170endif
160 171
172ifneq ($(USE_SYSTEM_PWD_GRP),true)
173 PWD_LIB = pwd_grp/libpwd.a
174 LIBRARIES += $(PWD_LIB)
175else
176 CFLAGS += -DUSE_SYSTEM_PWD_GRP
177endif
178
179
161# Put user-supplied flags at the end, where they 180# Put user-supplied flags at the end, where they
162# have a chance of winning. 181# have a chance of winning.
163CFLAGS += $(CFLAGS_EXTRA) 182CFLAGS += $(CFLAGS_EXTRA)
164 183
184.EXPORT_ALL_VARIABLES:
185
165all: busybox busybox.links doc 186all: busybox busybox.links doc
166 187
167doc: olddoc 188doc: olddoc
@@ -220,15 +241,19 @@ docs/busybox/busyboxdocumentation.html: docs/busybox.sgml
220 241
221 242
222 243
223busybox: $(OBJECTS) 244busybox: $(PWD_LIB) $(OBJECTS)
224 $(CC) $(LDFLAGS) -o $@ $^ $(LIBRARIES) 245 $(CC) $(LDFLAGS) -o $@ $^ $(LIBRARIES)
225 $(STRIP) 246 $(STRIP)
226 247
248$(PWD_LIB):
249 $(MAKE) -eC pwd_grp
250
227busybox.links: Config.h applets.h 251busybox.links: Config.h applets.h
228 - $(BB_SRC_DIR)/busybox.mkll $(CONFIG_H) $(BB_SRC_DIR)/applets.h >$@ 252 - $(BB_SRC_DIR)/busybox.mkll $(CONFIG_H) $(BB_SRC_DIR)/applets.h >$@
229 253
230nfsmount.o cmdedit.o: %.o: %.h 254nfsmount.o cmdedit.o: %.o: %.h
231$(OBJECTS): %.o: %.c Config.h busybox.h applets.h Makefile 255$(OBJECTS): %.o: %.c Config.h busybox.h applets.h Makefile
256 $(CC) $(CFLAGS) -c $*.c -o $*.o
232 257
233utility.o: loop.h 258utility.o: loop.h
234 259
@@ -240,6 +265,7 @@ test tests:
240 265
241clean: 266clean:
242 - cd tests && $(MAKE) clean 267 - cd tests && $(MAKE) clean
268 - cd pwd_grp && $(MAKE) clean
243 - rm -f docs/BusyBox.txt docs/BusyBox.1 docs/BusyBox.html \ 269 - rm -f docs/BusyBox.txt docs/BusyBox.1 docs/BusyBox.html \
244 docs/busybox.lineo.com/BusyBox.html 270 docs/busybox.lineo.com/BusyBox.html
245 - rm -f docs/busybox.txt docs/busybox.dvi docs/busybox.ps \ 271 - rm -f docs/busybox.txt docs/busybox.dvi docs/busybox.ps \