aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-02-02 01:41:53 +0000
committerMike Frysinger <vapier@gentoo.org>2006-02-02 01:41:53 +0000
commitb38673fb9fee63303cc6b7d4923ea0dd7cf7310a (patch)
treed6b2fba68832d7f0e061614dda4372119f58156f /Makefile
parent1f04c9d29c8a79cc71a7dd01e18e14c0fe8a8726 (diff)
downloadbusybox-w32-b38673fb9fee63303cc6b7d4923ea0dd7cf7310a.tar.gz
busybox-w32-b38673fb9fee63303cc6b7d4923ea0dd7cf7310a.tar.bz2
busybox-w32-b38673fb9fee63303cc6b7d4923ea0dd7cf7310a.zip
make the build system puuuuuuuuuuurty
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile63
1 files changed, 33 insertions, 30 deletions
diff --git a/Makefile b/Makefile
index 80d560861..9faef9791 100644
--- a/Makefile
+++ b/Makefile
@@ -76,7 +76,7 @@ $(if $(wildcard $(KBUILD_OUTPUT)),, \
76.PHONY: $(MAKECMDGOALS) 76.PHONY: $(MAKECMDGOALS)
77 77
78$(filter-out _all,$(MAKECMDGOALS)) _all: $(KBUILD_OUTPUT)/Rules.mak $(KBUILD_OUTPUT)/Makefile all_tree 78$(filter-out _all,$(MAKECMDGOALS)) _all: $(KBUILD_OUTPUT)/Rules.mak $(KBUILD_OUTPUT)/Makefile all_tree
79 $(MAKE) -C $(KBUILD_OUTPUT) \ 79 $(Q)$(MAKE) -C $(KBUILD_OUTPUT) \
80 top_srcdir=$(top_srcdir) \ 80 top_srcdir=$(top_srcdir) \
81 top_builddir=$(top_builddir) \ 81 top_builddir=$(top_builddir) \
82 KBUILD_SRC=$(top_srcdir) \ 82 KBUILD_SRC=$(top_srcdir) \
@@ -159,13 +159,13 @@ all: menuconfig
159# --------------------------------------------------------------------------- 159# ---------------------------------------------------------------------------
160 160
161scripts/config/conf: scripts/config/Makefile 161scripts/config/conf: scripts/config/Makefile
162 $(MAKE) -C scripts/config conf 162 $(Q)$(MAKE) -C scripts/config conf
163 -@if [ ! -f .config ] ; then \ 163 -@if [ ! -f .config ] ; then \
164 cp $(CONFIG_DEFCONFIG) .config; \ 164 cp $(CONFIG_DEFCONFIG) .config; \
165 fi 165 fi
166 166
167scripts/config/mconf: scripts/config/Makefile 167scripts/config/mconf: scripts/config/Makefile
168 $(MAKE) -C scripts/config ncurses conf mconf 168 $(Q)$(MAKE) -C scripts/config ncurses conf mconf
169 -@if [ ! -f .config ] ; then \ 169 -@if [ ! -f .config ] ; then \
170 cp $(CONFIG_DEFCONFIG) .config; \ 170 cp $(CONFIG_DEFCONFIG) .config; \
171 fi 171 fi
@@ -280,8 +280,7 @@ $(LIBBUSYBOX_SONAME):
280ifndef MAJOR_VERSION 280ifndef MAJOR_VERSION
281 $(error MAJOR_VERSION needed for $@ is not defined) 281 $(error MAJOR_VERSION needed for $@ is not defined)
282endif 282endif
283 $(CC) $(CFLAGS) $(LIB_CFLAGS) $(EXTRA_CFLAGS) $(LDFLAGS) \ 283 $(do_link) $(LIB_CFLAGS) $(LIB_LDFLAGS) \
284 $(LIB_LDFLAGS) \
285 -Wl,-soname=$(LD_LIBBUSYBOX).$(MAJOR_VERSION) \ 284 -Wl,-soname=$(LD_LIBBUSYBOX).$(MAJOR_VERSION) \
286 -Wl,-z,combreloc $(LIB_LDFLAGS) \ 285 -Wl,-z,combreloc $(LIB_LDFLAGS) \
287 -o $(@) \ 286 -o $(@) \
@@ -290,21 +289,21 @@ endif
290 -Wl,--no-whole-archive -Wl,--end-group 289 -Wl,--no-whole-archive -Wl,--end-group
291 $(RM_F) $(DO_INSTALL_LIBS) 290 $(RM_F) $(DO_INSTALL_LIBS)
292 for i in $(DO_INSTALL_LIBS); do $(LN_S) -v $(@) $$i ; done 291 for i in $(DO_INSTALL_LIBS); do $(LN_S) -v $(@) $$i ; done
293 $(STRIPCMD) $@ 292 $(do_strip)
294 293
295endif # ifeq ($(strip $(CONFIG_BUILD_LIBBUSYBOX)),y) 294endif # ifeq ($(strip $(CONFIG_BUILD_LIBBUSYBOX)),y)
296 295
297busybox: .depend $(LIBBUSYBOX_SONAME) $(BUSYBOX_SRC) $(libraries-y) 296busybox: .depend $(LIBBUSYBOX_SONAME) $(BUSYBOX_SRC) $(libraries-y)
298 $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(PROG_CFLAGS) $(LDFLAGS) \ 297 $(do_link) $(PROG_CFLAGS) \
299 -o $@ -Wl,--start-group \ 298 -o $@ -Wl,--start-group \
300 $(APPLETS_DEFINE) $(APPLET_SRC) \ 299 $(APPLETS_DEFINE) $(APPLET_SRC) \
301 $(BUSYBOX_DEFINE) $(BUSYBOX_SRC) $(libraries-y) \ 300 $(BUSYBOX_DEFINE) $(BUSYBOX_SRC) $(libraries-y) \
302 $(LDBUSYBOX) $(LIBRARIES) \ 301 $(LDBUSYBOX) $(LIBRARIES) \
303 -Wl,--end-group 302 -Wl,--end-group
304 $(STRIPCMD) $@ 303 $(do_strip)
305 304
306busybox.links: $(top_srcdir)/applets/busybox.mkll include/bb_config.h $(top_srcdir)/include/applets.h 305busybox.links: $(top_srcdir)/applets/busybox.mkll include/bb_config.h $(top_srcdir)/include/applets.h
307 - $(SHELL) $^ >$@ 306 $(Q)-$(SHELL) $^ >$@
308 307
309install: $(top_srcdir)/applets/install.sh busybox busybox.links 308install: $(top_srcdir)/applets/install.sh busybox busybox.links
310 DO_INSTALL_LIBS="$(strip $(LIBBUSYBOX_SONAME) $(DO_INSTALL_LIBS))" \ 309 DO_INSTALL_LIBS="$(strip $(LIBBUSYBOX_SONAME) $(DO_INSTALL_LIBS))" \
@@ -354,33 +353,34 @@ sizes:
354doc: docs/busybox.pod docs/BusyBox.txt docs/BusyBox.1 docs/BusyBox.html 353doc: docs/busybox.pod docs/BusyBox.txt docs/BusyBox.1 docs/BusyBox.html
355 354
356docs/busybox.pod : $(top_srcdir)/docs/busybox_header.pod $(top_srcdir)/include/usage.h $(top_srcdir)/docs/busybox_footer.pod 355docs/busybox.pod : $(top_srcdir)/docs/busybox_header.pod $(top_srcdir)/include/usage.h $(top_srcdir)/docs/busybox_footer.pod
357 -mkdir -p docs 356 $(disp_doc)
358 - ( cat $(top_srcdir)/docs/busybox_header.pod; \ 357 $(Q)-mkdir -p docs
358 $(Q)-( cat $(top_srcdir)/docs/busybox_header.pod; \
359 $(top_srcdir)/docs/autodocifier.pl $(top_srcdir)/include/usage.h; \ 359 $(top_srcdir)/docs/autodocifier.pl $(top_srcdir)/include/usage.h; \
360 cat $(top_srcdir)/docs/busybox_footer.pod ) > docs/busybox.pod 360 cat $(top_srcdir)/docs/busybox_footer.pod ) > docs/busybox.pod
361 361
362docs/BusyBox.txt: docs/busybox.pod 362docs/BusyBox.txt: docs/busybox.pod
363 $(SECHO) 363 $(disp_doc)
364 $(SECHO) BusyBox Documentation 364 $(Q)-mkdir -p docs
365 $(SECHO) 365 $(Q)-pod2text $< > $@
366 -mkdir -p docs
367 -pod2text $< > $@
368 366
369docs/BusyBox.1: docs/busybox.pod 367docs/BusyBox.1: docs/busybox.pod
370 - mkdir -p docs 368 $(disp_doc)
371 - pod2man --center=BusyBox --release="version $(VERSION)" \ 369 $(Q)-mkdir -p docs
370 $(Q)-pod2man --center=BusyBox --release="version $(VERSION)" \
372 $< > $@ 371 $< > $@
373 372
374docs/BusyBox.html: docs/busybox.net/BusyBox.html 373docs/BusyBox.html: docs/busybox.net/BusyBox.html
375 - mkdir -p docs 374 $(disp_doc)
376 -@ $(RM_F) docs/BusyBox.html 375 $(Q)-mkdir -p docs
377 -@ cp docs/busybox.net/BusyBox.html docs/BusyBox.html 376 $(Q)-$(RM_F) docs/BusyBox.html
377 $(Q)-cp docs/busybox.net/BusyBox.html docs/BusyBox.html
378 378
379docs/busybox.net/BusyBox.html: docs/busybox.pod 379docs/busybox.net/BusyBox.html: docs/busybox.pod
380 -@ mkdir -p docs/busybox.net 380 $(Q)-mkdir -p docs/busybox.net
381 - pod2html --noindex $< > \ 381 $(Q)-pod2html --noindex $< > \
382 docs/busybox.net/BusyBox.html 382 docs/busybox.net/BusyBox.html
383 -@ $(RM_F) pod2htm* 383 $(Q)-$(RM_F) pod2htm*
384 384
385# The nifty new buildsystem stuff 385# The nifty new buildsystem stuff
386scripts/bb_mkdep: $(top_srcdir)/scripts/bb_mkdep.c 386scripts/bb_mkdep: $(top_srcdir)/scripts/bb_mkdep.c
@@ -392,16 +392,18 @@ ifeq ($(strip $(CONFIG_BBCONFIG)),y)
392DEP_INCLUDES += include/bbconfigopts.h 392DEP_INCLUDES += include/bbconfigopts.h
393 393
394include/bbconfigopts.h: .config 394include/bbconfigopts.h: .config
395 $(top_srcdir)/scripts/config/mkconfigs > $@ 395 $(disp_gen)
396 $(Q)$(top_srcdir)/scripts/config/mkconfigs > $@
396endif 397endif
397 398
398depend dep: .depend 399depend dep: .depend
399.depend: scripts/bb_mkdep $(DEP_INCLUDES) 400.depend: scripts/bb_mkdep $(DEP_INCLUDES)
400 @$(RM_F) .depend 401 $(disp_gen)
401 @mkdir -p include/config 402 $(Q)$(RM_F) .depend
402 scripts/bb_mkdep -c include/config.h -c include/bb_config.h \ 403 $(Q)mkdir -p include/config
404 $(Q)scripts/bb_mkdep -c include/config.h -c include/bb_config.h \
403 -I $(top_srcdir)/include $(top_srcdir) > $@.tmp 405 -I $(top_srcdir)/include $(top_srcdir) > $@.tmp
404 mv $@.tmp $@ 406 $(Q)mv $@.tmp $@
405 407
406include/config.h: .config 408include/config.h: .config
407 @if [ ! -x $(top_builddir)/scripts/config/conf ] ; then \ 409 @if [ ! -x $(top_builddir)/scripts/config/conf ] ; then \
@@ -423,7 +425,8 @@ include/bb_config.h: include/config.h
423#define USAGE_HAVE_DOT_CONFIG(a) 425#define USAGE_HAVE_DOT_CONFIG(a)
424#endif 426#endif
425include/_usage.h: .config 427include/_usage.h: .config
426 awk '/CONFIG|BB_APPLET/{gsub("#[[:space:]]*|=y|.*CONFIG_|.*BB_APPLET_","");if(!/=/){print("#if ENABLE_"$$1"\n#define USAGE_"$$1"(a) a\n#else\n#define USAGE_"$$1"(a)\n#endif");}}' $(<) > $(@) 428 $(disp_gen)
429 $(Q)awk '/CONFIG|BB_APPLET/{gsub("#[[:space:]]*|=y|.*CONFIG_|.*BB_APPLET_","");if(!/=/){print("#if ENABLE_"$$1"\n#define USAGE_"$$1"(a) a\n#else\n#define USAGE_"$$1"(a)\n#endif");}}' $(<) > $(@)
427 430
428clean: 431clean:
429 - $(MAKE) -C scripts/config $@ 432 - $(MAKE) -C scripts/config $@