diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 28 |
1 files changed, 27 insertions, 1 deletions
@@ -42,6 +42,17 @@ DOSTATIC = false | |||
42 | # Do not enable this for production builds... | 42 | # Do not enable this for production builds... |
43 | DODEBUG = false | 43 | DODEBUG = 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. | ||
54 | USE_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)"' |
159 | endif | 170 | endif |
160 | 171 | ||
172 | ifneq ($(USE_SYSTEM_PWD_GRP),true) | ||
173 | PWD_LIB = pwd_grp/libpwd.a | ||
174 | LIBRARIES += $(PWD_LIB) | ||
175 | else | ||
176 | CFLAGS += -DUSE_SYSTEM_PWD_GRP | ||
177 | endif | ||
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. |
163 | CFLAGS += $(CFLAGS_EXTRA) | 182 | CFLAGS += $(CFLAGS_EXTRA) |
164 | 183 | ||
184 | .EXPORT_ALL_VARIABLES: | ||
185 | |||
165 | all: busybox busybox.links doc | 186 | all: busybox busybox.links doc |
166 | 187 | ||
167 | doc: olddoc | 188 | doc: olddoc |
@@ -220,15 +241,19 @@ docs/busybox/busyboxdocumentation.html: docs/busybox.sgml | |||
220 | 241 | ||
221 | 242 | ||
222 | 243 | ||
223 | busybox: $(OBJECTS) | 244 | busybox: $(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 | |||
227 | busybox.links: Config.h applets.h | 251 | busybox.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 | ||
230 | nfsmount.o cmdedit.o: %.o: %.h | 254 | nfsmount.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 | ||
233 | utility.o: loop.h | 258 | utility.o: loop.h |
234 | 259 | ||
@@ -240,6 +265,7 @@ test tests: | |||
240 | 265 | ||
241 | clean: | 266 | clean: |
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 \ |