diff options
| author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2006-03-09 09:03:37 +0000 |
|---|---|---|
| committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2006-03-09 09:03:37 +0000 |
| commit | 07a79e75f502ebd41e5341aacc5de303d3ffaea0 (patch) | |
| tree | 4b95f98bab0b298c5df171772b629d03400ef507 | |
| parent | 874af85d5eb08b65476f406f6a1e7edc127ac210 (diff) | |
| download | busybox-w32-07a79e75f502ebd41e5341aacc5de303d3ffaea0.tar.gz busybox-w32-07a79e75f502ebd41e5341aacc5de303d3ffaea0.tar.bz2 busybox-w32-07a79e75f502ebd41e5341aacc5de303d3ffaea0.zip | |
- backout using features which are not available with the previous stable
version of make (3.71.1).
| -rw-r--r-- | Makefile | 122 | ||||
| -rw-r--r-- | Rules.mak | 56 | ||||
| -rw-r--r-- | applets/Makefile.in | 8 | ||||
| -rw-r--r-- | archival/Makefile.in | 8 | ||||
| -rw-r--r-- | archival/libunarchive/Makefile.in | 8 | ||||
| -rw-r--r-- | console-tools/Makefile.in | 8 | ||||
| -rw-r--r-- | coreutils/Makefile.in | 8 | ||||
| -rw-r--r-- | coreutils/libcoreutils/Makefile.in | 9 | ||||
| -rw-r--r-- | debianutils/Makefile.in | 8 | ||||
| -rw-r--r-- | e2fsprogs/Makefile.in | 45 | ||||
| -rw-r--r-- | editors/Makefile.in | 8 | ||||
| -rw-r--r-- | findutils/Makefile.in | 8 | ||||
| -rw-r--r-- | init/Makefile.in | 8 | ||||
| -rw-r--r-- | libbb/Makefile.in | 9 | ||||
| -rw-r--r-- | libpwdgrp/Makefile.in | 8 | ||||
| -rw-r--r-- | loginutils/Makefile.in | 8 | ||||
| -rw-r--r-- | miscutils/Makefile.in | 8 | ||||
| -rw-r--r-- | modutils/Makefile.in | 8 | ||||
| -rw-r--r-- | networking/Makefile.in | 8 | ||||
| -rw-r--r-- | networking/libiproute/Makefile.in | 9 | ||||
| -rw-r--r-- | networking/udhcp/Makefile.in | 8 | ||||
| -rw-r--r-- | procps/Makefile.in | 8 | ||||
| -rw-r--r-- | shell/Makefile.in | 8 | ||||
| -rw-r--r-- | sysklogd/Makefile.in | 8 | ||||
| -rw-r--r-- | util-linux/Makefile.in | 8 |
25 files changed, 236 insertions, 166 deletions
| @@ -13,15 +13,16 @@ noconfig_targets := menuconfig config oldconfig randconfig \ | |||
| 13 | clean distclean \ | 13 | clean distclean \ |
| 14 | release tags | 14 | release tags |
| 15 | 15 | ||
| 16 | # make-3.79.1 didn't support MAKEFILE_LIST | ||
| 17 | # for building out-of-tree, users of make-3.79 still have to pass top_srcdir= | ||
| 18 | # to make: make -f /srcs/busybox/Makefile top_srcdir=/srcs/busybox | ||
| 19 | ifndef MAKEFILE_LIST | ||
| 20 | MAKEFILE_LIST=. | ||
| 21 | endif | ||
| 22 | # the toplevel sourcedir | 16 | # the toplevel sourcedir |
| 23 | ifndef top_srcdir | 17 | ifndef top_srcdir |
| 18 | # make-3.79.1 didn't support MAKEFILE_LIST | ||
| 19 | # for building out-of-tree, users of make-3.79.1 still have to pass top_srcdir= | ||
| 20 | # to make: make -f /srcs/busybox/Makefile top_srcdir=/srcs/busybox | ||
| 21 | ifdef MAKEFILE_LIST | ||
| 24 | top_srcdir:=$(shell cd $(dir $(firstword $(MAKEFILE_LIST))) && pwd) | 22 | top_srcdir:=$(shell cd $(dir $(firstword $(MAKEFILE_LIST))) && pwd) |
| 23 | else | ||
| 24 | top_srcdir:=$(CURDIR) | ||
| 25 | endif | ||
| 25 | endif | 26 | endif |
| 26 | # toplevel directory of the object-tree | 27 | # toplevel directory of the object-tree |
| 27 | ifndef top_builddir | 28 | ifndef top_builddir |
| @@ -63,44 +64,22 @@ else | |||
| 63 | PACKAGE_OUTPUTDIR := $(top_builddir) | 64 | PACKAGE_OUTPUTDIR := $(top_builddir) |
| 64 | endif | 65 | endif |
| 65 | 66 | ||
| 66 | ####################################################################### | ||
| 67 | # Try to workaround bugs in make | ||
| 68 | |||
| 69 | # make-3.79.1 didn't understand order-only prerequisites ('|'). | ||
| 70 | # Just treat them as normal prerequisites. Note that this will lead to | ||
| 71 | # spurious rebuilds. | ||
| 72 | ifeq ($(MAKE_VERSION),3.79.1) | ||
| 73 | |: ; | ||
| 74 | endif | ||
| 75 | |||
| 76 | # Workaround for bugs in make-3.80 | ||
| 77 | # eval is broken if it is in a conditional | ||
| 78 | |||
| 79 | #$ cat 3.80-eval-in-cond.mak | ||
| 80 | #all:: ; @echo it | ||
| 81 | #define Y | ||
| 82 | # all:: ; @echo worked | ||
| 83 | #endef | ||
| 84 | #ifdef BAR | ||
| 85 | #$(eval $(Y)) | ||
| 86 | #endif | ||
| 87 | #$ make -f 3.80-eval-in-cond.mak | ||
| 88 | #it | ||
| 89 | #$ make -f 3.80-eval-in-cond.mak BAR=set | ||
| 90 | #3.80-eval-in-cond.mak:5: *** missing `endif'. Stop. | ||
| 91 | |||
| 92 | # This was fixed in December 2003. | ||
| 93 | define check_gcc | 67 | define check_gcc |
| 94 | $(eval $(1)+=$(if $(2),$(if $(shell $(CC) $(2) -S -o /dev/null -xc /dev/null > /dev/null 2>&1 && echo y),$(2),$(if $(3),$(3))),$(if $(3),$(3)))) | 68 | $(if $(2),$(if $(shell $(CC) $(2) -S -o /dev/null -xc /dev/null > /dev/null 2>&1 && echo y),$(2),$(if $(3),$(3))),$(if $(3),$(3))) |
| 95 | endef | 69 | endef |
| 96 | 70 | ||
| 97 | define check_ld | 71 | define check_ld |
| 98 | $(eval $(1)+=$(if $(2),$(if $(shell $(LD) $(2) -o /dev/null -b binary /dev/null > /dev/null 2>&1 && echo y),$(shell echo \-Wl,$(2)),$(if $(3),$(3))),$(if $(3),$(3)))) | 72 | $(if $(2),$(if $(shell $(LD) $(2) -o /dev/null -b binary /dev/null > /dev/null 2>&1 && echo y),$(shell echo \-Wl,$(2)),$(if $(3),$(3))),$(if $(3),$(3))) |
| 99 | endef | 73 | endef |
| 100 | 74 | ||
| 101 | ####################################################################### | 75 | ####################################################################### |
| 76 | # make-3.79.1 doesn't support order-only prerequisites.. | ||
| 77 | ifeq ($(MAKE_VERSION),3.79.1) | ||
| 78 | |: $(^) ; | ||
| 79 | endif | ||
| 80 | ####################################################################### | ||
| 81 | |||
| 102 | 82 | ||
| 103 | -include $(top_srcdir)/Rules.mak | ||
| 104 | 83 | ||
| 105 | # Handle building out of tree | 84 | # Handle building out of tree |
| 106 | ifneq ($(top_builddir),$(top_srcdir)) | 85 | ifneq ($(top_builddir),$(top_srcdir)) |
| @@ -179,6 +158,8 @@ help: | |||
| 179 | @echo ' 2 also print when make enters a directory' | 158 | @echo ' 2 also print when make enters a directory' |
| 180 | @echo ' 3 also verbosely print shell invocations' | 159 | @echo ' 3 also verbosely print shell invocations' |
| 181 | 160 | ||
| 161 | -include $(top_srcdir)/Rules.mak | ||
| 162 | |||
| 182 | ifneq ($(strip $(HAVE_DOT_CONFIG)),y) | 163 | ifneq ($(strip $(HAVE_DOT_CONFIG)),y) |
| 183 | # Default target if none was requested explicitly | 164 | # Default target if none was requested explicitly |
| 184 | all: defconfig menuconfig ; | 165 | all: defconfig menuconfig ; |
| @@ -252,33 +233,8 @@ ifeq ($(strip $(HAVE_DOT_CONFIG)),y) | |||
| 252 | 233 | ||
| 253 | endif # ifeq ($(strip $(HAVE_DOT_CONFIG)),y) | 234 | endif # ifeq ($(strip $(HAVE_DOT_CONFIG)),y) |
| 254 | 235 | ||
| 255 | # convert $(DIRS) to upper case. Use sed instead of tr since we're already | ||
| 256 | # depending on it. | ||
| 257 | DIRS_UPPER:=$(shell echo $(DIRS) | $(SED) 'h;y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/') | ||
| 258 | |||
| 259 | # First populate the variables ..._OBJ-y et al | ||
| 260 | $(foreach d,$(DIRS_UPPER),$(eval $(notdir $(d))-y:=)) | ||
| 261 | |||
| 262 | include $(patsubst %,%/Makefile.in,$(SRC_DIRS)) | 236 | include $(patsubst %,%/Makefile.in,$(SRC_DIRS)) |
| 263 | 237 | ||
| 264 | # Then we need the dependencies for ..._OBJ | ||
| 265 | define dir_pattern.o | ||
| 266 | ifeq ($(os),.os) | ||
| 267 | $(if $($(1)_OBJ.os),$($(1)_OBJ.os:.os=.o): $(top_builddir)/$(2)/%.o: $(top_srcdir)/$(2)/%.c) | ||
| 268 | endif | ||
| 269 | $(if $($(1)_OBJ$(os)),$($(1)_OBJ$(os)): $(top_builddir)/$(2)/%$(os): $(top_srcdir)/$(2)/%.c) | ||
| 270 | $(if $($(1)_OBJ),$($(1)_OBJ): $(top_builddir)/$(2)/%.o: $(top_srcdir)/$(2)/%.c) | ||
| 271 | endef | ||
| 272 | |||
| 273 | # The actual directory patterns for .o* | ||
| 274 | $(foreach d,$(DIRS),$(eval $(call dir_pattern.o,$(subst /,_,$(d)),$(d)))) | ||
| 275 | |||
| 276 | define file_lists | ||
| 277 | $($(1)$(2)) $($(1)$(2).o) $($(1)$(2).os) | ||
| 278 | endef | ||
| 279 | bin-obj-y:=$(subst .os,.o,$(foreach d,$(DIRS),$(call file_lists,$(subst /,_,$(d)),_OBJ))) | ||
| 280 | bin-mobj-y:=$(subst .osm,.om,$(foreach d,$(DIRS),$(call file_lists,$(subst /,_,$(d)),_MOBJ))) | ||
| 281 | |||
| 282 | ifeq ($(strip $(HAVE_DOT_CONFIG)),y) | 238 | ifeq ($(strip $(HAVE_DOT_CONFIG)),y) |
| 283 | # Finally pull in the dependencies (headers and other includes) of the | 239 | # Finally pull in the dependencies (headers and other includes) of the |
| 284 | # individual object files | 240 | # individual object files |
| @@ -294,9 +250,7 @@ all: busybox busybox.links doc ; | |||
| 294 | # IMA compiles all sources at once (aka IPO aka IPA etc.) | 250 | # IMA compiles all sources at once (aka IPO aka IPA etc.) |
| 295 | 251 | ||
| 296 | ifeq ($(strip $(CONFIG_BUILD_AT_ONCE)),y) | 252 | ifeq ($(strip $(CONFIG_BUILD_AT_ONCE)),y) |
| 297 | # We are not building .o | 253 | libraries-y:= |
| 298 | bin-obj-y:= | ||
| 299 | bin-mobj-y:= | ||
| 300 | # Which parts of the internal libs are requested? | 254 | # Which parts of the internal libs are requested? |
| 301 | # Per default we only want what was actually selected. | 255 | # Per default we only want what was actually selected. |
| 302 | # -a denotes all while -y denotes the selected ones. | 256 | # -a denotes all while -y denotes the selected ones. |
| @@ -312,30 +266,17 @@ APPLETS_DEFINE:=$(APPLETS_DEFINE-y) | |||
| 312 | else # CONFIG_BUILD_AT_ONCE | 266 | else # CONFIG_BUILD_AT_ONCE |
| 313 | # no --combine, build archives out of the individual .o | 267 | # no --combine, build archives out of the individual .o |
| 314 | # This was the old way the binary was built. | 268 | # This was the old way the binary was built. |
| 315 | libbusybox-obj:=$(archival_libunarchive_OBJ$(os)) \ | 269 | libbusybox-obj:=archival/libunarchive/libunarchive.a \ |
| 316 | $(networking_libiproute_OBJ$(os)) \ | 270 | networking/libiproute/libiproute.a \ |
| 317 | $(libpwdgrp_MOBJ$(os)) \ | 271 | libpwdgrp/libpwdgrp.a coreutils/libcoreutils/libcoreutils.a \ |
| 318 | $(coreutils_libcoreutils_OBJ$(os)) \ | 272 | libbb/libbb.a |
| 319 | $(libbb_OBJ$(os)) $(libbb_MOBJ$(os)) | 273 | libbusybox-obj:=$(patsubst %,$(top_builddir)/%,$(libbusybox-obj)) |
| 320 | |||
| 321 | ifeq ($(strip $(CONFIG_FEATURE_SHARED_BUSYBOX)),y) | 274 | ifeq ($(strip $(CONFIG_FEATURE_SHARED_BUSYBOX)),y) |
| 322 | # linking against libbusybox, so don't build the .o already contained in the .so | 275 | # linking against libbusybox, so don't build the .a already contained in the .so |
| 323 | bin-obj-y:=$(filter-out $(libbusybox-obj) $(libbusybox-obj:.os=.o),$(bin-obj-y)) | 276 | libraries-y:=$(filter-out $(libbusybox-obj),$(libraries-y)) |
| 324 | bin-mobj-y:=$(filter-out $(libbusybox-obj) $(libbusybox-obj:.osm=.om),$(bin-mobj-y)) | ||
| 325 | endif # CONFIG_FEATURE_SHARED_BUSYBOX | 277 | endif # CONFIG_FEATURE_SHARED_BUSYBOX |
| 326 | endif # CONFIG_BUILD_AT_ONCE | ||
| 327 | |||
| 328 | # build an .a to keep .hash et al small | ||
| 329 | ifneq ($(bin-obj-y)$(bin-mobj-y),) | ||
| 330 | applets.a:=$(bin-obj-y) $(bin-mobj-y) | ||
| 331 | endif | ||
| 332 | ifdef applets.a | ||
| 333 | applets.a: $(applets.a) | ||
| 334 | $(Q)-rm -f $(@) | ||
| 335 | $(do_ar) | ||
| 336 | 278 | ||
| 337 | bin-obj.a=applets.a | 279 | endif # CONFIG_BUILD_AT_ONCE |
| 338 | endif | ||
| 339 | 280 | ||
| 340 | ifeq ($(strip $(CONFIG_BUILD_LIBBUSYBOX)),y) | 281 | ifeq ($(strip $(CONFIG_BUILD_LIBBUSYBOX)),y) |
| 341 | LD_LIBBUSYBOX:=libbusybox.so | 282 | LD_LIBBUSYBOX:=libbusybox.so |
| @@ -355,6 +296,8 @@ endif # !CONFIG_FEATURE_SHARED_BUSYBOX | |||
| 355 | $(LIBBUSYBOX_SONAME): $(LIBRARY_SRC) | 296 | $(LIBBUSYBOX_SONAME): $(LIBRARY_SRC) |
| 356 | else # CONFIG_BUILD_AT_ONCE | 297 | else # CONFIG_BUILD_AT_ONCE |
| 357 | $(LIBBUSYBOX_SONAME): $(libbusybox-obj) | 298 | $(LIBBUSYBOX_SONAME): $(libbusybox-obj) |
| 299 | AR_INTRO:=-Wl,--whole-archive | ||
| 300 | AR_EXTRO:=-Wl,--no-whole-archive | ||
| 358 | endif # CONFIG_BUILD_AT_ONCE | 301 | endif # CONFIG_BUILD_AT_ONCE |
| 359 | 302 | ||
| 360 | 303 | ||
| @@ -367,12 +310,12 @@ $(LIBBUSYBOX_SONAME): | |||
| 367 | ifndef MAJOR_VERSION | 310 | ifndef MAJOR_VERSION |
| 368 | $(error MAJOR_VERSION needed for $@ is not defined) | 311 | $(error MAJOR_VERSION needed for $@ is not defined) |
| 369 | endif | 312 | endif |
| 370 | $(do_link) $(LIB_CFLAGS) $(LIB_LDFLAGS) $(CFLAGS_COMBINE) \ | 313 | $(do_link) $(LIB_CFLAGS) $(CFLAGS_COMBINE) \ |
| 371 | -Wl,-soname=$(LD_LIBBUSYBOX).$(MAJOR_VERSION) \ | 314 | -Wl,-soname=$(LD_LIBBUSYBOX).$(MAJOR_VERSION) \ |
| 372 | -Wl,-z,combreloc $(LIB_LDFLAGS) \ | 315 | -Wl,-z,combreloc $(LIB_LDFLAGS) \ |
| 373 | -o $(@) \ | 316 | -o $(@) \ |
| 374 | -Wl,--start-group \ | 317 | -Wl,--start-group \ |
| 375 | $(LIBRARY_DEFINE) $(^) \ | 318 | $(LIBRARY_DEFINE) $(AR_INTRO) $(^) $(AR_EXTRO) \ |
| 376 | -Wl,--end-group | 319 | -Wl,--end-group |
| 377 | @rm -f $(DO_INSTALL_LIBS) | 320 | @rm -f $(DO_INSTALL_LIBS) |
| 378 | @for i in $(DO_INSTALL_LIBS); do ln -s $(@) $$i ; done | 321 | @for i in $(DO_INSTALL_LIBS); do ln -s $(@) $$i ; done |
| @@ -380,14 +323,14 @@ endif | |||
| 380 | 323 | ||
| 381 | endif # ifeq ($(strip $(CONFIG_BUILD_LIBBUSYBOX)),y) | 324 | endif # ifeq ($(strip $(CONFIG_BUILD_LIBBUSYBOX)),y) |
| 382 | 325 | ||
| 383 | busybox_unstripped: $(top_builddir)/.depend $(LIBBUSYBOX_SONAME) $(BUSYBOX_SRC) $(APPLET_SRC) $(bin-obj.a) | 326 | busybox_unstripped: $(top_builddir)/.depend $(LIBBUSYBOX_SONAME) $(BUSYBOX_SRC) $(APPLET_SRC) $(libraries-y) |
| 384 | $(do_link) $(PROG_CFLAGS) $(PROG_LDFLAGS) $(CFLAGS_COMBINE) \ | 327 | $(do_link) $(PROG_CFLAGS) $(PROG_LDFLAGS) $(CFLAGS_COMBINE) \ |
| 385 | $(foreach f,$(^:.o=.c),$(CFLAGS-$(notdir $(patsubst %/$,%,$(dir $(f))))-$(notdir $(f)))) \ | 328 | $(foreach f,$(^:.o=.c),$(CFLAGS-$(notdir $(patsubst %/$,%,$(dir $(f))))-$(notdir $(f)))) \ |
| 386 | $(CFLAGS-$(@)) \ | 329 | $(CFLAGS-$(@)) \ |
| 387 | -o $@ -Wl,--start-group \ | 330 | -o $@ -Wl,--start-group \ |
| 388 | $(APPLETS_DEFINE) $(APPLET_SRC) \ | 331 | $(APPLETS_DEFINE) $(APPLET_SRC) \ |
| 389 | $(BUSYBOX_DEFINE) $(BUSYBOX_SRC) \ | 332 | $(BUSYBOX_DEFINE) $(BUSYBOX_SRC) \ |
| 390 | $(bin-obj.a) \ | 333 | $(libraries-y) \ |
| 391 | $(LDBUSYBOX) $(LIBRARIES) \ | 334 | $(LDBUSYBOX) $(LIBRARIES) \ |
| 392 | -Wl,--end-group | 335 | -Wl,--end-group |
| 393 | 336 | ||
| @@ -538,3 +481,4 @@ tags: | |||
| 538 | defconfig allyesconfig allnoconfig allbareconfig \ | 481 | defconfig allyesconfig allnoconfig allbareconfig \ |
| 539 | clean distclean \ | 482 | clean distclean \ |
| 540 | release tags | 483 | release tags |
| 484 | |||
| @@ -71,6 +71,16 @@ HOSTCFLAGS= -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer | |||
| 71 | # Ensure consistent sort order, 'gcc -print-search-dirs' behavior, etc. | 71 | # Ensure consistent sort order, 'gcc -print-search-dirs' behavior, etc. |
| 72 | LC_ALL:= C | 72 | LC_ALL:= C |
| 73 | 73 | ||
| 74 | # initialize flags here | ||
| 75 | CFLAGS:= | ||
| 76 | CFLAGS_COMBINE:= | ||
| 77 | CFLAGS_PIC:= | ||
| 78 | LD_FLAGS:= | ||
| 79 | LIB_LDFLAGS:= | ||
| 80 | PROG_LDFLAGS:= | ||
| 81 | PROG_CFLAGS:= | ||
| 82 | OPTIMIZATIONS:= | ||
| 83 | |||
| 74 | # If you want to add some simple compiler switches (like -march=i686), | 84 | # If you want to add some simple compiler switches (like -march=i686), |
| 75 | # especially from the command line, use this instead of CFLAGS directly. | 85 | # especially from the command line, use this instead of CFLAGS directly. |
| 76 | # For optimization overrides, it's better still to set OPTIMIZATIONS. | 86 | # For optimization overrides, it's better still to set OPTIMIZATIONS. |
| @@ -94,7 +104,7 @@ CFLAGS_EXTRA=$(subst ",, $(strip $(EXTRA_CFLAGS_OPTIONS))) | |||
| 94 | WARNINGS=-Wall -Wstrict-prototypes -Wshadow | 104 | WARNINGS=-Wall -Wstrict-prototypes -Wshadow |
| 95 | CFLAGS+=-I$(top_builddir)/include -I$(top_srcdir)/include | 105 | CFLAGS+=-I$(top_builddir)/include -I$(top_srcdir)/include |
| 96 | 106 | ||
| 97 | ARFLAGS=cruP | 107 | ARFLAGS=cru |
| 98 | 108 | ||
| 99 | 109 | ||
| 100 | 110 | ||
| @@ -149,8 +159,8 @@ __TARGET_ARCH:=$(shell $(CC) -dumpmachine | sed -e s'/-.*//' \ | |||
| 149 | ) | 159 | ) |
| 150 | endif | 160 | endif |
| 151 | 161 | ||
| 152 | $(call check_gcc,CFLAGS,-funsigned-char,) | 162 | CFLAGS+=$(call check_gcc,CFLAGS,-funsigned-char,) |
| 153 | $(call check_gcc,CFLAGS,-mmax-stack-frame=256,) | 163 | CFLAGS+=$(call check_gcc,CFLAGS,-mmax-stack-frame=256,) |
| 154 | 164 | ||
| 155 | #-------------------------------------------------------- | 165 | #-------------------------------------------------------- |
| 156 | # Arch specific compiler optimization stuff should go here. | 166 | # Arch specific compiler optimization stuff should go here. |
| @@ -158,51 +168,51 @@ $(call check_gcc,CFLAGS,-mmax-stack-frame=256,) | |||
| 158 | # for OPTIMIZATIONS... | 168 | # for OPTIMIZATIONS... |
| 159 | 169 | ||
| 160 | # use '-Os' optimization if available, else use -O2 | 170 | # use '-Os' optimization if available, else use -O2 |
| 161 | $(call check_gcc,OPTIMIZATIONS,-Os,-O2) | 171 | OPTIMIZATIONS+=$(call check_gcc,OPTIMIZATIONS,-Os,-O2) |
| 162 | 172 | ||
| 163 | # gcc 2.95 exits with 0 for "unrecognized option" | 173 | # gcc 2.95 exits with 0 for "unrecognized option" |
| 164 | $(if $(call is_eq,$(CONFIG_BUILD_AT_ONCE),y),\ | 174 | CFLAGS_COMBINE+=$(if $(call is_eq,$(CONFIG_BUILD_AT_ONCE),y),\ |
| 165 | $(if $(call cc_ge,3,0),\ | 175 | $(if $(call cc_ge,3,0),\ |
| 166 | $(call check_gcc,CFLAGS_COMBINE,--combine,))) | 176 | $(call check_gcc,CFLAGS_COMBINE,--combine,))) |
| 167 | 177 | ||
| 168 | $(if $(call is_eq,$(CONFIG_BUILD_AT_ONCE),y),\ | 178 | OPTIMIZATIONS+=$(if $(call is_eq,$(CONFIG_BUILD_AT_ONCE),y),\ |
| 169 | $(call check_gcc,OPTIMIZATIONS,-funit-at-a-time,)) | 179 | $(call check_gcc,OPTIMIZATIONS,-funit-at-a-time,)) |
| 170 | 180 | ||
| 171 | # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25795 | 181 | # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25795 |
| 172 | #$(if $(call is_eq,$(CONFIG_BUILD_AT_ONCE),y),\ | 182 | #PROG_CFLAGS+=$(if $(call is_eq,$(CONFIG_BUILD_AT_ONCE),y),\ |
| 173 | # $(call check_gcc,PROG_CFLAGS,-fwhole-program,)) | 183 | # $(call check_gcc,PROG_CFLAGS,-fwhole-program,)) |
| 174 | 184 | ||
| 175 | $(call check_ld,LIB_LDFLAGS,--enable-new-dtags,) | 185 | LIB_LDFLAGS+=$(call check_ld,LIB_LDFLAGS,--enable-new-dtags,) |
| 176 | #$(call check_ld,LIB_LDFLAGS,--reduce-memory-overheads,) | 186 | #LIB_LDFLAGS+=$(call check_ld,LIB_LDFLAGS,--reduce-memory-overheads,) |
| 177 | #$(call check_ld,LIB_LDFLAGS,--as-needed,) | 187 | #LIB_LDFLAGS+=$(call check_ld,LIB_LDFLAGS,--as-needed,) |
| 178 | #$(call check_ld,LIB_LDFLAGS,--warn-shared-textrel,) | 188 | #LIB_LDFLAGS+=$(call check_ld,LIB_LDFLAGS,--warn-shared-textrel,) |
| 179 | 189 | ||
| 180 | $(call check_ld,PROG_LDFLAGS,--gc-sections,) | 190 | PROG_LDFLAGS+=$(call check_ld,PROG_LDFLAGS,--gc-sections,) |
| 181 | 191 | ||
| 182 | # Some nice architecture specific optimizations | 192 | # Some nice architecture specific optimizations |
| 183 | ifeq ($(__TARGET_ARCH),arm) | 193 | ifeq ($(__TARGET_ARCH),arm) |
| 184 | OPTIMIZATIONS+=-fstrict-aliasing | 194 | OPTIMIZATIONS+=-fstrict-aliasing |
| 185 | endif # arm | 195 | endif # arm |
| 186 | 196 | ||
| 187 | $(if $(call is_eq,$(__TARGET_ARCH),i386),\ | 197 | OPTIMIZATIONS+=$(if $(call is_eq,$(__TARGET_ARCH),i386),\ |
| 188 | $(call check_gcc,OPTIMIZATIONS,-march=i386,)) | 198 | $(call check_gcc,OPTIMIZATIONS,-march=i386,)) |
| 189 | 199 | ||
| 190 | # gcc-4.0 and older seem to benefit from these | 200 | # gcc-4.0 and older seem to benefit from these |
| 191 | $(if $(call cc_le,4,0),\ | 201 | OPTIMIZATIONS+=$(if $(call cc_le,4,0),\ |
| 192 | $(call check_gcc,OPTIMIZATIONS,-mpreferred-stack-boundary=2,)\ | 202 | $(call check_gcc,OPTIMIZATIONS,-mpreferred-stack-boundary=2,)\ |
| 193 | $(call check_gcc,OPTIMIZATIONS,-falign-functions=1 -falign-jumps=1 -falign-loops=1,\ | 203 | $(call check_gcc,OPTIMIZATIONS,-falign-functions=1 -falign-jumps=1 -falign-loops=1,\ |
| 194 | -malign-functions=0 -malign-jumps=0 -malign-loops=0)) | 204 | -malign-functions=0 -malign-jumps=0 -malign-loops=0)) |
| 195 | 205 | ||
| 196 | # gcc-4.1 and beyond seem to benefit from these | 206 | # gcc-4.1 and beyond seem to benefit from these |
| 197 | # turn off flags which hurt -Os | 207 | # turn off flags which hurt -Os |
| 198 | $(if $(call cc_ge,4,1),\ | 208 | OPTIMIZATIONS+=$(if $(call cc_ge,4,1),\ |
| 199 | $(call check_gcc,OPTIMIZATIONS,-fno-tree-loop-optimize,)\ | 209 | $(call check_gcc,OPTIMIZATIONS,-fno-tree-loop-optimize,)\ |
| 200 | $(call check_gcc,OPTIMIZATIONS,-fno-tree-dominator-opts,)\ | 210 | $(call check_gcc,OPTIMIZATIONS,-fno-tree-dominator-opts,)\ |
| 201 | $(call check_gcc,OPTIMIZATIONS,-fno-strength-reduce,)\ | 211 | $(call check_gcc,OPTIMIZATIONS,-fno-strength-reduce,)\ |
| 202 | \ | 212 | \ |
| 203 | $(call check_gcc,OPTIMIZATIONS,-fno-branch-count-reg,)) | 213 | $(call check_gcc,OPTIMIZATIONS,-fno-branch-count-reg,)) |
| 204 | 214 | ||
| 205 | $(call check_gcc,OPTIMIZATIONS,-fomit-frame-pointer,) | 215 | OPTIMIZATIONS+=$(call check_gcc,OPTIMIZATIONS,-fomit-frame-pointer,) |
| 206 | 216 | ||
| 207 | # | 217 | # |
| 208 | #-------------------------------------------------------- | 218 | #-------------------------------------------------------- |
| @@ -227,9 +237,7 @@ else | |||
| 227 | endif | 237 | endif |
| 228 | endif | 238 | endif |
| 229 | 239 | ||
| 230 | $(if $(call is_eq,$(CONFIG_DEBUG),y),\ | 240 | LDFLAGS+=$(if $(call is_eq,$(CONFIG_DEBUG),y),$(call check_ld,LDFLAGS,--warn-common,)$(call check_ld,LDFLAGS,--sort-common,)) |
| 231 | $(call check_ld,LDFLAGS,--warn-common,),\ | ||
| 232 | $(call check_ld,LDFLAGS,--warn-common,)$(call check_ld,LDFLAGS,--sort-common,)) | ||
| 233 | ifeq ($(CONFIG_DEBUG),y) | 241 | ifeq ($(CONFIG_DEBUG),y) |
| 234 | CFLAGS +=$(WARNINGS) -g -D_GNU_SOURCE | 242 | CFLAGS +=$(WARNINGS) -g -D_GNU_SOURCE |
| 235 | STRIPCMD:=/bin/true -Not_stripping_since_we_are_debugging | 243 | STRIPCMD:=/bin/true -Not_stripping_since_we_are_debugging |
| @@ -237,14 +245,15 @@ else | |||
| 237 | CFLAGS+=$(WARNINGS) $(OPTIMIZATIONS) -D_GNU_SOURCE -DNDEBUG | 245 | CFLAGS+=$(WARNINGS) $(OPTIMIZATIONS) -D_GNU_SOURCE -DNDEBUG |
| 238 | STRIPCMD:=$(STRIP) -s --remove-section=.note --remove-section=.comment | 246 | STRIPCMD:=$(STRIP) -s --remove-section=.note --remove-section=.comment |
| 239 | endif | 247 | endif |
| 240 | $(if $(call is_eq,$(CONFIG_STATIC),y),\ | 248 | PROG_CFLAGS+=$(if $(call is_eq,$(CONFIG_STATIC),y),\ |
| 241 | $(call check_gcc,PROG_CFLAGS,-static,)) | 249 | $(call check_gcc,PROG_CFLAGS,-static,)) |
| 242 | 250 | ||
| 243 | $(call check_gcc,CFLAGS_SHARED,-shared,) | 251 | CFLAGS_SHARED+=$(call check_gcc,CFLAGS_SHARED,-shared,) |
| 244 | LIB_CFLAGS+=$(CFLAGS_SHARED) | 252 | LIB_CFLAGS+=$(CFLAGS_SHARED) |
| 245 | 253 | ||
| 246 | $(if $(call is_eq,$(CONFIG_BUILD_LIBBUSYBOX),y),\ | 254 | CFLAGS_PIC+=$(if $(call is_eq,$(CONFIG_BUILD_LIBBUSYBOX),y),\ |
| 247 | $(call check_gcc,CFLAGS_PIC,-fPIC,)) | 255 | $(call check_gcc,CFLAGS_PIC,-fPIC,)) |
| 256 | LIB_CFLAGS+=$(CFLAGS_PIC) | ||
| 248 | 257 | ||
| 249 | ifeq ($(CONFIG_SELINUX),y) | 258 | ifeq ($(CONFIG_SELINUX),y) |
| 250 | LIBRARIES += -lselinux | 259 | LIBRARIES += -lselinux |
| @@ -379,12 +388,11 @@ ifdef rules-mak-rules | |||
| 379 | .SUFFIXES: .c .S .o .os .om .osm .oS .so .a .s .i .E | 388 | .SUFFIXES: .c .S .o .os .om .osm .oS .so .a .s .i .E |
| 380 | 389 | ||
| 381 | # generic rules | 390 | # generic rules |
| 382 | %.o: %.c ; $(compile.c) | ||
| 383 | %.os: %.c ; $(compile.c) $(CFLAGS_PIC) | ||
| 384 | %.o: ; $(compile.c) | 391 | %.o: ; $(compile.c) |
| 385 | %.os: ; $(compile.c) $(CFLAGS_PIC) | 392 | %.os: ; $(compile.c) $(CFLAGS_PIC) |
| 386 | %.om: ; $(compile.m) | 393 | %.om: ; $(compile.m) |
| 387 | %.osm: ; $(compile.m) $(CFLAGS_PIC) | 394 | %.osm: ; $(compile.m) $(CFLAGS_PIC) |
| 395 | %.a: ; $(do_ar) | ||
| 388 | 396 | ||
| 389 | endif # rules-mak-rules | 397 | endif # rules-mak-rules |
| 390 | 398 | ||
diff --git a/applets/Makefile.in b/applets/Makefile.in index 64aefc017..391b4658c 100644 --- a/applets/Makefile.in +++ b/applets/Makefile.in | |||
| @@ -4,8 +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 | srcdir=$(top_srcdir)/applets | 7 | srcdir:=$(top_srcdir)/applets |
| 8 | objdir=$(top_builddir)/applets | 8 | objdir:=$(top_builddir)/applets |
| 9 | 9 | ||
| 10 | APPLETS_SRC:= $(patsubst %,$(srcdir)/%,applets.c busybox.c version.c) | 10 | APPLETS_SRC:= $(patsubst %,$(srcdir)/%,applets.c busybox.c version.c) |
| 11 | 11 | ||
| @@ -14,3 +14,7 @@ APPLET_SRC-a+=$(APPLETS_SRC) | |||
| 14 | 14 | ||
| 15 | applets_OBJ:=$(patsubst $(srcdir)/%.c,$(objdir)/%.o,$(APPLETS_SRC)) | 15 | applets_OBJ:=$(patsubst $(srcdir)/%.c,$(objdir)/%.o,$(APPLETS_SRC)) |
| 16 | 16 | ||
| 17 | $(applets_OBJ): $(objdir)/%.o: $(srcdir)/%.c | ||
| 18 | $(objdir)/applets.a: $(applets_OBJ) | ||
| 19 | libraries-y:=$(libraries-y) $(objdir)/applets.a | ||
| 20 | |||
diff --git a/archival/Makefile.in b/archival/Makefile.in index 6a2979e67..8a7b3bd4a 100644 --- a/archival/Makefile.in +++ b/archival/Makefile.in | |||
| @@ -4,8 +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 | srcdir=$(top_srcdir)/archival | 7 | srcdir:=$(top_srcdir)/archival |
| 8 | objdir=$(top_builddir)/archival | 8 | objdir:=$(top_builddir)/archival |
| 9 | 9 | ||
| 10 | ARCHIVAL-$(CONFIG_AR) += ar.o | 10 | ARCHIVAL-$(CONFIG_AR) += ar.o |
| 11 | ARCHIVAL-$(CONFIG_BUNZIP2) += bunzip2.o | 11 | ARCHIVAL-$(CONFIG_BUNZIP2) += bunzip2.o |
| @@ -28,3 +28,7 @@ APPLET_SRC-a+=$(ARCHIVAL_SRC-a) | |||
| 28 | 28 | ||
| 29 | archival_OBJ:= $(patsubst %,$(objdir)/%,$(ARCHIVAL-y)) | 29 | archival_OBJ:= $(patsubst %,$(objdir)/%,$(ARCHIVAL-y)) |
| 30 | 30 | ||
| 31 | $(archival_OBJ): $(objdir)/%.o: $(srcdir)/%.c | ||
| 32 | $(objdir)/archival.a: $(archival_OBJ) | ||
| 33 | libraries-y:=$(libraries-y) $(objdir)/archival.a | ||
| 34 | |||
diff --git a/archival/libunarchive/Makefile.in b/archival/libunarchive/Makefile.in index 75d761036..d77aff736 100644 --- a/archival/libunarchive/Makefile.in +++ b/archival/libunarchive/Makefile.in | |||
| @@ -4,8 +4,8 @@ | |||
| 4 | # | 4 | # |
| 5 | # Licensed under the GPL v2 or later, see the file LICENSE in this tarball. | 5 | # Licensed under the GPL v2 or later, see the file LICENSE in this tarball. |
| 6 | 6 | ||
| 7 | srcdir=$(top_srcdir)/archival/libunarchive | 7 | srcdir:=$(top_srcdir)/archival/libunarchive |
| 8 | objdir=$(top_builddir)/archival/libunarchive | 8 | objdir:=$(top_builddir)/archival/libunarchive |
| 9 | 9 | ||
| 10 | LIBUNARCHIVE-y:= \ | 10 | LIBUNARCHIVE-y:= \ |
| 11 | \ | 11 | \ |
| @@ -71,3 +71,7 @@ LIBRARY_SRC-a+=$(LIBUNARCHIVE_SRC-a) | |||
| 71 | 71 | ||
| 72 | archival_libunarchive_OBJ$(os):=$(patsubst %,$(objdir)/%$(os),$(LIBUNARCHIVE-y)) | 72 | archival_libunarchive_OBJ$(os):=$(patsubst %,$(objdir)/%$(os),$(LIBUNARCHIVE-y)) |
| 73 | 73 | ||
| 74 | $(archival_libunarchive_OBJ$(os)): $(objdir)/%$(os): $(srcdir)/%.c | ||
| 75 | $(objdir)/libunarchive.a: $(archival_libunarchive_OBJ$(os)) | ||
| 76 | libraries-y:=$(libraries-y) $(objdir)/libunarchive.a | ||
| 77 | |||
diff --git a/console-tools/Makefile.in b/console-tools/Makefile.in index e10bc4f78..7994e0f08 100644 --- a/console-tools/Makefile.in +++ b/console-tools/Makefile.in | |||
| @@ -4,8 +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 | srcdir=$(top_srcdir)/console-tools | 7 | srcdir:=$(top_srcdir)/console-tools |
| 8 | objdir=$(top_builddir)/console-tools | 8 | objdir:=$(top_builddir)/console-tools |
| 9 | 9 | ||
| 10 | CONSOLETOOLS-$(CONFIG_CHVT) += chvt.o | 10 | CONSOLETOOLS-$(CONFIG_CHVT) += chvt.o |
| 11 | CONSOLETOOLS-$(CONFIG_CLEAR) += clear.o | 11 | CONSOLETOOLS-$(CONFIG_CLEAR) += clear.o |
| @@ -26,3 +26,7 @@ APPLET_SRC-a+=$(CONSOLETOOLS_SRC-a) | |||
| 26 | 26 | ||
| 27 | console-tools_OBJ:= $(patsubst %,$(objdir)/%,$(CONSOLETOOLS-y)) | 27 | console-tools_OBJ:= $(patsubst %,$(objdir)/%,$(CONSOLETOOLS-y)) |
| 28 | 28 | ||
| 29 | $(console-tools_OBJ): $(objdir)/%.o: $(srcdir)/%.c | ||
| 30 | $(objdir)/console-tools.a: $(console-tools_OBJ) | ||
| 31 | libraries-y:=$(libraries-y) $(objdir)/console-tools.a | ||
| 32 | |||
diff --git a/coreutils/Makefile.in b/coreutils/Makefile.in index 5f8a0ac52..73581f2aa 100644 --- a/coreutils/Makefile.in +++ b/coreutils/Makefile.in | |||
| @@ -4,8 +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 | srcdir=$(top_srcdir)/coreutils | 7 | srcdir:=$(top_srcdir)/coreutils |
| 8 | objdir=$(top_builddir)/coreutils | 8 | objdir:=$(top_builddir)/coreutils |
| 9 | 9 | ||
| 10 | COREUTILS-$(CONFIG_BASENAME) += basename.o | 10 | COREUTILS-$(CONFIG_BASENAME) += basename.o |
| 11 | COREUTILS-$(CONFIG_CAL) += cal.o | 11 | COREUTILS-$(CONFIG_CAL) += cal.o |
| @@ -86,3 +86,7 @@ APPLET_SRC-a+=$(COREUTILS_SRC-a) | |||
| 86 | 86 | ||
| 87 | coreutils_OBJ:= $(patsubst %,$(objdir)/%,$(COREUTILS-y)) | 87 | coreutils_OBJ:= $(patsubst %,$(objdir)/%,$(COREUTILS-y)) |
| 88 | 88 | ||
| 89 | $(coreutils_OBJ): $(objdir)/%.o: $(srcdir)/%.c | ||
| 90 | $(objdir)/coreutils.a: $(coreutils_OBJ) | ||
| 91 | libraries-y:=$(libraries-y) $(objdir)/coreutils.a | ||
| 92 | |||
diff --git a/coreutils/libcoreutils/Makefile.in b/coreutils/libcoreutils/Makefile.in index 700341c97..d89e9d049 100644 --- a/coreutils/libcoreutils/Makefile.in +++ b/coreutils/libcoreutils/Makefile.in | |||
| @@ -4,8 +4,8 @@ | |||
| 4 | # | 4 | # |
| 5 | # Licensed under the GPL v2 or later, see the file LICENSE in this tarball. | 5 | # Licensed under the GPL v2 or later, see the file LICENSE in this tarball. |
| 6 | 6 | ||
| 7 | srcdir=$(top_srcdir)/coreutils/libcoreutils | 7 | srcdir:=$(top_srcdir)/coreutils/libcoreutils |
| 8 | objdir=$(top_builddir)/coreutils/libcoreutils | 8 | objdir:=$(top_builddir)/coreutils/libcoreutils |
| 9 | 9 | ||
| 10 | LIBCOREUTILS-$(CONFIG_MKFIFO) += getopt_mk_fifo_nod | 10 | LIBCOREUTILS-$(CONFIG_MKFIFO) += getopt_mk_fifo_nod |
| 11 | LIBCOREUTILS-$(CONFIG_MKNOD) += getopt_mk_fifo_nod | 11 | LIBCOREUTILS-$(CONFIG_MKNOD) += getopt_mk_fifo_nod |
| @@ -21,3 +21,8 @@ LIBRARY_SRC-y+=$(LIBCOREUTILS_SRC-y) | |||
| 21 | LIBRARY_SRC-a+=$(LIBCOREUTILS_SRC-a) | 21 | LIBRARY_SRC-a+=$(LIBCOREUTILS_SRC-a) |
| 22 | 22 | ||
| 23 | coreutils_libcoreutils_OBJ$(os):=$(patsubst %,$(objdir)/%$(os),$(LIBCOREUTILS-y)) | 23 | coreutils_libcoreutils_OBJ$(os):=$(patsubst %,$(objdir)/%$(os),$(LIBCOREUTILS-y)) |
| 24 | |||
| 25 | $(coreutils_libcoreutils_OBJ$(os)): $(objdir)/%$(os): $(srcdir)/%.c | ||
| 26 | $(objdir)/libcoreutils.a: $(coreutils_libcoreutils_OBJ$(os)) | ||
| 27 | libraries-y:=$(libraries-y) $(objdir)/libcoreutils.a | ||
| 28 | |||
diff --git a/debianutils/Makefile.in b/debianutils/Makefile.in index ffdb7abdc..4f72c233c 100644 --- a/debianutils/Makefile.in +++ b/debianutils/Makefile.in | |||
| @@ -4,8 +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 | srcdir=$(top_srcdir)/debianutils | 7 | srcdir:=$(top_srcdir)/debianutils |
| 8 | objdir=$(top_builddir)/debianutils | 8 | objdir:=$(top_builddir)/debianutils |
| 9 | 9 | ||
| 10 | DEBIANUTILS-$(CONFIG_MKTEMP) += mktemp.o | 10 | DEBIANUTILS-$(CONFIG_MKTEMP) += mktemp.o |
| 11 | DEBIANUTILS-$(CONFIG_PIPE_PROGRESS) += pipe_progress.o | 11 | DEBIANUTILS-$(CONFIG_PIPE_PROGRESS) += pipe_progress.o |
| @@ -21,3 +21,7 @@ APPLET_SRC-a+=$(DEBIANUTILS_SRC-a) | |||
| 21 | 21 | ||
| 22 | debianutils_OBJ:= $(patsubst %,$(objdir)/%,$(DEBIANUTILS-y)) | 22 | debianutils_OBJ:= $(patsubst %,$(objdir)/%,$(DEBIANUTILS-y)) |
| 23 | 23 | ||
| 24 | $(debianutils_OBJ): $(objdir)/%.o: $(srcdir)/%.c | ||
| 25 | $(objdir)/debianutils.a: $(debianutils_OBJ) | ||
| 26 | libraries-y:=$(libraries-y) $(objdir)/debianutils.a | ||
| 27 | |||
diff --git a/e2fsprogs/Makefile.in b/e2fsprogs/Makefile.in index c30318b67..0ca1c976d 100644 --- a/e2fsprogs/Makefile.in +++ b/e2fsprogs/Makefile.in | |||
| @@ -45,14 +45,7 @@ $(patsubst %,$(objdir)/%, blkid e2fsck e2p ext2fs uuid): | |||
| 45 | # may have object files created after the timestamp of the directory was | 45 | # may have object files created after the timestamp of the directory was |
| 46 | # updated which would lead to spurious rebuilds (as some of the dentries | 46 | # updated which would lead to spurious rebuilds (as some of the dentries |
| 47 | # may be older than the dir itself). | 47 | # may be older than the dir itself). |
| 48 | ifneq ($(MAKE_VERSION),3.81beta4) | 48 | ifeq ($(MAKE_VERSION),3.81beta4) |
| 49 | # /top/obj/dir/*.o: /top/obj/dir/file.o: /top/src/dir/file.c | ||
| 50 | $(patsubst %,$(objdir)/%,$(BLKID_OBJS)): $(objdir)/blkid/%.o: $(srcdir)/blkid/%.c |$(objdir)/blkid | ||
| 51 | $(patsubst %,$(objdir)/%,$(E2FSCK_OBJS)):$(objdir)/e2fsck/%.o:$(srcdir)/e2fsck/%.c|$(objdir)/e2fsck | ||
| 52 | $(patsubst %,$(objdir)/%,$(E2P_OBJS)): $(objdir)/e2p/%.o: $(srcdir)/e2p/%.c |$(objdir)/e2p | ||
| 53 | $(patsubst %,$(objdir)/%,$(EXT2FS_OBJS)):$(objdir)/ext2fs/%.o:$(srcdir)/ext2fs/%.c|$(objdir)/ext2fs | ||
| 54 | $(patsubst %,$(objdir)/%,$(UUID_OBJS)): $(objdir)/uuid/%.o: $(srcdir)/uuid/%.c |$(objdir)/uuid | ||
| 55 | else | ||
| 56 | # alleged bug in 3.81beta4. Stripping dir from dir/files.c | 49 | # alleged bug in 3.81beta4. Stripping dir from dir/files.c |
| 57 | # /top/obj/dir/*.o: /top/obj/dir/file.o: /top/src/file.c | 50 | # /top/obj/dir/*.o: /top/obj/dir/file.o: /top/src/file.c |
| 58 | $(patsubst %,$(objdir)/%,$(BLKID_OBJS)): $(objdir)/blkid/%.o: $(srcdir)/%.c |$(objdir)/blkid | 51 | $(patsubst %,$(objdir)/%,$(BLKID_OBJS)): $(objdir)/blkid/%.o: $(srcdir)/%.c |$(objdir)/blkid |
| @@ -60,8 +53,40 @@ $(patsubst %,$(objdir)/%,$(E2FSCK_OBJS)):$(objdir)/e2fsck/%.o:$(srcdir)/%.c|$(ob | |||
| 60 | $(patsubst %,$(objdir)/%,$(E2P_OBJS)): $(objdir)/e2p/%.o: $(srcdir)/%.c |$(objdir)/e2p | 53 | $(patsubst %,$(objdir)/%,$(E2P_OBJS)): $(objdir)/e2p/%.o: $(srcdir)/%.c |$(objdir)/e2p |
| 61 | $(patsubst %,$(objdir)/%,$(EXT2FS_OBJS)):$(objdir)/ext2fs/%.o:$(srcdir)/%.c|$(objdir)/ext2fs | 54 | $(patsubst %,$(objdir)/%,$(EXT2FS_OBJS)):$(objdir)/ext2fs/%.o:$(srcdir)/%.c|$(objdir)/ext2fs |
| 62 | $(patsubst %,$(objdir)/%,$(UUID_OBJS)): $(objdir)/uuid/%.o: $(srcdir)/%.c |$(objdir)/uuid | 55 | $(patsubst %,$(objdir)/%,$(UUID_OBJS)): $(objdir)/uuid/%.o: $(srcdir)/%.c |$(objdir)/uuid |
| 56 | |||
| 57 | e2fsprogs-rules-seen:=1 | ||
| 58 | endif | ||
| 59 | |||
| 60 | ifeq ($(MAKE_VERSION),3.79.1) | ||
| 61 | # no order-only prerequesites | ||
| 62 | $(patsubst %,$(objdir)/%,$(BLKID_OBJS)): $(objdir)/blkid/%.o: $(srcdir)/blkid/%.c #|$(objdir)/blkid | ||
| 63 | $(patsubst %,$(objdir)/%,$(E2FSCK_OBJS)):$(objdir)/e2fsck/%.o:$(srcdir)/e2fsck/%.c#|$(objdir)/e2fsck | ||
| 64 | $(patsubst %,$(objdir)/%,$(E2P_OBJS)): $(objdir)/e2p/%.o: $(srcdir)/e2p/%.c #|$(objdir)/e2p | ||
| 65 | $(patsubst %,$(objdir)/%,$(EXT2FS_OBJS)):$(objdir)/ext2fs/%.o:$(srcdir)/ext2fs/%.c#|$(objdir)/ext2fs | ||
| 66 | $(patsubst %,$(objdir)/%,$(UUID_OBJS)): $(objdir)/uuid/%.o: $(srcdir)/uuid/%.c #|$(objdir)/uuid | ||
| 67 | $(patsubst %,$(objdir)/%,$(BLKID_OBJS)): $(objdir)/blkid | ||
| 68 | $(patsubst %,$(objdir)/%,$(E2FSCK_OBJS)):$(objdir)/e2fsck | ||
| 69 | $(patsubst %,$(objdir)/%,$(E2P_OBJS)): $(objdir)/e2p | ||
| 70 | $(patsubst %,$(objdir)/%,$(EXT2FS_OBJS)):$(objdir)/ext2fs | ||
| 71 | $(patsubst %,$(objdir)/%,$(UUID_OBJS)): $(objdir)/uuid | ||
| 72 | $(patsubst %,$(objdir)/%,$(BLKID_OBJS)): $(objdir)/blkid | ||
| 73 | $(patsubst %,$(objdir)/%,$(E2FSCK_OBJS)):$(objdir)/e2fsck | ||
| 74 | $(patsubst %,$(objdir)/%,$(E2P_OBJS)): $(objdir)/e2p | ||
| 75 | $(patsubst %,$(objdir)/%,$(EXT2FS_OBJS)):$(objdir)/ext2fs | ||
| 76 | $(patsubst %,$(objdir)/%,$(UUID_OBJS)): $(objdir)/uuid | ||
| 77 | |||
| 78 | e2fsprogs-rules-seen:=1 | ||
| 63 | endif | 79 | endif |
| 64 | 80 | ||
| 81 | ifndef e2fsprogs-rules-seen | ||
| 82 | $(patsubst %,$(objdir)/%,$(BLKID_OBJS)): $(objdir)/blkid/%.o: $(srcdir)/blkid/%.c |$(objdir)/blkid | ||
| 83 | $(patsubst %,$(objdir)/%,$(E2FSCK_OBJS)):$(objdir)/e2fsck/%.o:$(srcdir)/e2fsck/%.c|$(objdir)/e2fsck | ||
| 84 | $(patsubst %,$(objdir)/%,$(E2P_OBJS)): $(objdir)/e2p/%.o: $(srcdir)/e2p/%.c |$(objdir)/e2p | ||
| 85 | $(patsubst %,$(objdir)/%,$(EXT2FS_OBJS)):$(objdir)/ext2fs/%.o:$(srcdir)/ext2fs/%.c|$(objdir)/ext2fs | ||
| 86 | $(patsubst %,$(objdir)/%,$(UUID_OBJS)): $(objdir)/uuid/%.o: $(srcdir)/uuid/%.c |$(objdir)/uuid | ||
| 87 | endif | ||
| 88 | |||
| 89 | |||
| 65 | E2FSPROGS-$(CONFIG_CHATTR) += chattr.o $(E2P_OBJS) | 90 | E2FSPROGS-$(CONFIG_CHATTR) += chattr.o $(E2P_OBJS) |
| 66 | E2FSPROGS-$(CONFIG_E2FSCK) += e2fsck.o util.o $(BLKID_OBJS) $(EXT2FS_OBJS) $(UUID_OBJS) | 91 | E2FSPROGS-$(CONFIG_E2FSCK) += e2fsck.o util.o $(BLKID_OBJS) $(EXT2FS_OBJS) $(UUID_OBJS) |
| 67 | E2FSPROGS-$(CONFIG_FSCK) += fsck.o util.o $(BLKID_OBJS) $(UUID_OBJS) | 92 | E2FSPROGS-$(CONFIG_FSCK) += fsck.o util.o $(BLKID_OBJS) $(UUID_OBJS) |
| @@ -93,3 +118,7 @@ APPLETS_DEFINE-a+=$(CFLAGS-e2fsprogs) -I$(srcdir) $(E2FSPROGS_TMP_KLUDGE) | |||
| 93 | 118 | ||
| 94 | e2fsprogs_OBJ:= $(patsubst %,$(objdir)/%,$(E2FSPROGS-y)) | 119 | e2fsprogs_OBJ:= $(patsubst %,$(objdir)/%,$(E2FSPROGS-y)) |
| 95 | 120 | ||
| 121 | $(e2fsprogs_OBJ): $(objdir)/%.o: $(srcdir)/%.c | ||
| 122 | $(objdir)/e2fsprogs.a: $(e2fsprogs_OBJ) | ||
| 123 | libraries-y:=$(libraries-y) $(objdir)/e2fsprogs.a | ||
| 124 | |||
diff --git a/editors/Makefile.in b/editors/Makefile.in index 19d8bf8e6..dd09e7a21 100644 --- a/editors/Makefile.in +++ b/editors/Makefile.in | |||
| @@ -4,8 +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 | srcdir=$(top_srcdir)/editors | 7 | srcdir:=$(top_srcdir)/editors |
| 8 | objdir=$(top_builddir)/editors | 8 | objdir:=$(top_builddir)/editors |
| 9 | 9 | ||
| 10 | EDITORS-$(CONFIG_AWK) += awk.o | 10 | EDITORS-$(CONFIG_AWK) += awk.o |
| 11 | EDITORS-$(CONFIG_PATCH) += patch.o | 11 | EDITORS-$(CONFIG_PATCH) += patch.o |
| @@ -26,3 +26,7 @@ APPLET_SRC-a+=$(EDITOR_SRC-a) | |||
| 26 | 26 | ||
| 27 | editors_OBJ:= $(patsubst %,$(objdir)/%,$(EDITORS-y)) | 27 | editors_OBJ:= $(patsubst %,$(objdir)/%,$(EDITORS-y)) |
| 28 | 28 | ||
| 29 | $(editors_OBJ): $(objdir)/%.o: $(srcdir)/%.c | ||
| 30 | $(objdir)/editors.a: $(editors_OBJ) | ||
| 31 | libraries-y:=$(libraries-y) $(objdir)/editors.a | ||
| 32 | |||
diff --git a/findutils/Makefile.in b/findutils/Makefile.in index d268f987d..7fbf8d4b9 100644 --- a/findutils/Makefile.in +++ b/findutils/Makefile.in | |||
| @@ -4,8 +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 | srcdir=$(top_srcdir)/findutils | 7 | srcdir:=$(top_srcdir)/findutils |
| 8 | objdir=$(top_builddir)/findutils | 8 | objdir:=$(top_builddir)/findutils |
| 9 | 9 | ||
| 10 | FINDUTILS-$(CONFIG_FIND) += find.o | 10 | FINDUTILS-$(CONFIG_FIND) += find.o |
| 11 | FINDUTILS-$(CONFIG_GREP) += grep.o | 11 | FINDUTILS-$(CONFIG_GREP) += grep.o |
| @@ -18,3 +18,7 @@ APPLET_SRC-a+=$(FINDUTILS_SRC-a) | |||
| 18 | 18 | ||
| 19 | findutils_OBJ:= $(patsubst %,$(objdir)/%,$(FINDUTILS-y)) | 19 | findutils_OBJ:= $(patsubst %,$(objdir)/%,$(FINDUTILS-y)) |
| 20 | 20 | ||
| 21 | $(findutils_OBJ): $(objdir)/%.o: $(srcdir)/%.c | ||
| 22 | $(objdir)/findutils.a: $(findutils_OBJ) | ||
| 23 | libraries-y:=$(libraries-y) $(objdir)/findutils.a | ||
| 24 | |||
diff --git a/init/Makefile.in b/init/Makefile.in index a07c2189b..ef5eb1c58 100644 --- a/init/Makefile.in +++ b/init/Makefile.in | |||
| @@ -4,8 +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 | srcdir=$(top_srcdir)/init | 7 | srcdir:=$(top_srcdir)/init |
| 8 | objdir=$(top_builddir)/init | 8 | objdir:=$(top_builddir)/init |
| 9 | 9 | ||
| 10 | INIT-$(CONFIG_HALT) += halt.o | 10 | INIT-$(CONFIG_HALT) += halt.o |
| 11 | INIT-$(CONFIG_INIT) += init.o | 11 | INIT-$(CONFIG_INIT) += init.o |
| @@ -30,3 +30,7 @@ APPLET_SRC-a+=$(INIT_SRC-a) | |||
| 30 | 30 | ||
| 31 | init_OBJ:= $(patsubst %,$(objdir)/%,$(INIT-y)) | 31 | init_OBJ:= $(patsubst %,$(objdir)/%,$(INIT-y)) |
| 32 | 32 | ||
| 33 | $(init_OBJ): $(objdir)/%.o: $(srcdir)/%.c | ||
| 34 | $(objdir)/init.a: $(init_OBJ) | ||
| 35 | libraries-y:=$(libraries-y) $(objdir)/init.a | ||
| 36 | |||
diff --git a/libbb/Makefile.in b/libbb/Makefile.in index d4cc7646a..b4ee3f501 100644 --- a/libbb/Makefile.in +++ b/libbb/Makefile.in | |||
| @@ -4,8 +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 | srcdir=$(top_srcdir)/libbb | 7 | srcdir:=$(top_srcdir)/libbb |
| 8 | objdir=$(top_builddir)/libbb | 8 | objdir:=$(top_builddir)/libbb |
| 9 | 9 | ||
| 10 | LIBBB-n:= | 10 | LIBBB-n:= |
| 11 | LIBBB-y:= \ | 11 | LIBBB-y:= \ |
| @@ -146,3 +146,8 @@ $(LIBBB_MOBJ5:.osm=.om): $(LIBBB_MSRC5) | |||
| 146 | $(LIBBB_MOBJ6:.osm=.om): $(LIBBB_MSRC6) | 146 | $(LIBBB_MOBJ6:.osm=.om): $(LIBBB_MSRC6) |
| 147 | endif | 147 | endif |
| 148 | 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 | |||
diff --git a/libpwdgrp/Makefile.in b/libpwdgrp/Makefile.in index 93c4634a2..a99d3d86f 100644 --- a/libpwdgrp/Makefile.in +++ b/libpwdgrp/Makefile.in | |||
| @@ -4,8 +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 | srcdir=$(top_srcdir)/libpwdgrp | 7 | srcdir:=$(top_srcdir)/libpwdgrp |
| 8 | objdir=$(top_builddir)/libpwdgrp | 8 | objdir:=$(top_builddir)/libpwdgrp |
| 9 | 9 | ||
| 10 | LIBPWDGRP_MSRC0:=$(srcdir)/pwd_grp.c | 10 | LIBPWDGRP_MSRC0:=$(srcdir)/pwd_grp.c |
| 11 | LIBPWDGRP_M0-$(CONFIG_USE_BB_PWD_GRP):= fgetpwent_r fgetgrent_r \ | 11 | LIBPWDGRP_M0-$(CONFIG_USE_BB_PWD_GRP):= fgetpwent_r fgetgrent_r \ |
| @@ -43,3 +43,7 @@ ifeq ($(om),.osm) | |||
| 43 | $(LIBPWDGRP_MOBJ0:.osm=.om): $(LIBPWDGRP_MSRC0) | 43 | $(LIBPWDGRP_MOBJ0:.osm=.om): $(LIBPWDGRP_MSRC0) |
| 44 | $(LIBPWDGRP_MOBJ1:.osm=.om): $(LIBPWDGRP_MSRC1) | 44 | $(LIBPWDGRP_MOBJ1:.osm=.om): $(LIBPWDGRP_MSRC1) |
| 45 | endif | 45 | endif |
| 46 | |||
| 47 | $(objdir)/libpwdgrp.a: $(libpwdgrp_MOBJ$(os)) | ||
| 48 | libraries-y:=$(libraries-y) $(objdir)/libpwdgrp.a | ||
| 49 | |||
diff --git a/loginutils/Makefile.in b/loginutils/Makefile.in index dfbba5019..959cb4f57 100644 --- a/loginutils/Makefile.in +++ b/loginutils/Makefile.in | |||
| @@ -4,8 +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 | srcdir=$(top_srcdir)/loginutils | 7 | srcdir:=$(top_srcdir)/loginutils |
| 8 | objdir=$(top_builddir)/loginutils | 8 | objdir:=$(top_builddir)/loginutils |
| 9 | 9 | ||
| 10 | LOGINUTILS-$(CONFIG_ADDGROUP) += addgroup.o | 10 | LOGINUTILS-$(CONFIG_ADDGROUP) += addgroup.o |
| 11 | LOGINUTILS-$(CONFIG_ADDUSER) += adduser.o | 11 | LOGINUTILS-$(CONFIG_ADDUSER) += adduser.o |
| @@ -36,3 +36,7 @@ endif | |||
| 36 | 36 | ||
| 37 | loginutils_OBJ:= $(patsubst %,$(objdir)/%,$(LOGINUTILS-y)) | 37 | loginutils_OBJ:= $(patsubst %,$(objdir)/%,$(LOGINUTILS-y)) |
| 38 | 38 | ||
| 39 | $(loginutils_OBJ): $(objdir)/%.o: $(srcdir)/%.c | ||
| 40 | $(objdir)/loginutils.a: $(loginutils_OBJ) | ||
| 41 | libraries-y:=$(libraries-y) $(objdir)/loginutils.a | ||
| 42 | |||
diff --git a/miscutils/Makefile.in b/miscutils/Makefile.in index 12b4f05a4..4f9de7c93 100644 --- a/miscutils/Makefile.in +++ b/miscutils/Makefile.in | |||
| @@ -4,8 +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 | srcdir=$(top_srcdir)/miscutils | 7 | srcdir:=$(top_srcdir)/miscutils |
| 8 | objdir=$(top_builddir)/miscutils | 8 | objdir:=$(top_builddir)/miscutils |
| 9 | 9 | ||
| 10 | MISCUTILS-$(CONFIG_ADJTIMEX) += adjtimex.o | 10 | MISCUTILS-$(CONFIG_ADJTIMEX) += adjtimex.o |
| 11 | MISCUTILS-$(CONFIG_CROND) += crond.o | 11 | MISCUTILS-$(CONFIG_CROND) += crond.o |
| @@ -40,3 +40,7 @@ APPLET_SRC-a+=$(MISCUTILS_SRC-a) | |||
| 40 | 40 | ||
| 41 | miscutils_OBJ:= $(patsubst %,$(objdir)/%,$(MISCUTILS-y)) | 41 | miscutils_OBJ:= $(patsubst %,$(objdir)/%,$(MISCUTILS-y)) |
| 42 | 42 | ||
| 43 | $(miscutils_OBJ): $(objdir)/%.o: $(srcdir)/%.c | ||
| 44 | $(objdir)/miscutils.a: $(miscutils_OBJ) | ||
| 45 | libraries-y:=$(libraries-y) $(objdir)/miscutils.a | ||
| 46 | |||
diff --git a/modutils/Makefile.in b/modutils/Makefile.in index fc7e4ff8e..a59b29d76 100644 --- a/modutils/Makefile.in +++ b/modutils/Makefile.in | |||
| @@ -4,8 +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 | srcdir=$(top_srcdir)/modutils | 7 | srcdir:=$(top_srcdir)/modutils |
| 8 | objdir=$(top_builddir)/modutils | 8 | objdir:=$(top_builddir)/modutils |
| 9 | 9 | ||
| 10 | MODUTILS-$(CONFIG_INSMOD) += insmod.o | 10 | MODUTILS-$(CONFIG_INSMOD) += insmod.o |
| 11 | MODUTILS-$(CONFIG_LSMOD) += lsmod.o | 11 | MODUTILS-$(CONFIG_LSMOD) += lsmod.o |
| @@ -19,3 +19,7 @@ APPLET_SRC-a+=$(MODUTILS_SRC-a) | |||
| 19 | 19 | ||
| 20 | modutils_OBJ:= $(patsubst %,$(objdir)/%,$(MODUTILS-y)) | 20 | modutils_OBJ:= $(patsubst %,$(objdir)/%,$(MODUTILS-y)) |
| 21 | 21 | ||
| 22 | $(modutils_OBJ): $(objdir)/%.o: $(srcdir)/%.c | ||
| 23 | $(objdir)/modutils.a: $(modutils_OBJ) | ||
| 24 | libraries-y:=$(libraries-y) $(objdir)/modutils.a | ||
| 25 | |||
diff --git a/networking/Makefile.in b/networking/Makefile.in index efad05053..80cfd1733 100644 --- a/networking/Makefile.in +++ b/networking/Makefile.in | |||
| @@ -4,8 +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 | srcdir=$(top_srcdir)/networking | 7 | srcdir:=$(top_srcdir)/networking |
| 8 | objdir=$(top_builddir)/networking | 8 | objdir:=$(top_builddir)/networking |
| 9 | 9 | ||
| 10 | NETWORKING-$(CONFIG_ARPING) += arping.o | 10 | NETWORKING-$(CONFIG_ARPING) += arping.o |
| 11 | NETWORKING-$(CONFIG_DNSD) += dnsd.o | 11 | NETWORKING-$(CONFIG_DNSD) += dnsd.o |
| @@ -57,3 +57,7 @@ LIBRARY_DEFINE-a+= -I$(top_srcdir)/networking | |||
| 57 | 57 | ||
| 58 | networking_OBJ:= $(patsubst %,$(objdir)/%,$(NETWORKING-y)) | 58 | networking_OBJ:= $(patsubst %,$(objdir)/%,$(NETWORKING-y)) |
| 59 | 59 | ||
| 60 | $(networking_OBJ): $(objdir)/%.o: $(srcdir)/%.c | ||
| 61 | $(objdir)/networking.a: $(networking_OBJ) | ||
| 62 | libraries-y:=$(libraries-y) $(objdir)/networking.a | ||
| 63 | |||
diff --git a/networking/libiproute/Makefile.in b/networking/libiproute/Makefile.in index 99fa22e9d..2fee2796d 100644 --- a/networking/libiproute/Makefile.in +++ b/networking/libiproute/Makefile.in | |||
| @@ -3,10 +3,9 @@ | |||
| 3 | # Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> | 3 | # Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> |
| 4 | # | 4 | # |
| 5 | # Licensed under the GPL v2 or later, see the file LICENSE in this tarball. | 5 | # Licensed under the GPL v2 or later, see the file LICENSE in this tarball. |
| 6 | # | ||
| 7 | 6 | ||
| 8 | srcdir=$(top_srcdir)/networking/libiproute | 7 | srcdir:=$(top_srcdir)/networking/libiproute |
| 9 | objdir=$(top_builddir)/networking/libiproute | 8 | objdir:=$(top_builddir)/networking/libiproute |
| 10 | 9 | ||
| 11 | LIBIPROUTE-$(CONFIG_IP) += \ | 10 | LIBIPROUTE-$(CONFIG_IP) += \ |
| 12 | ip_parse_common_args \ | 11 | ip_parse_common_args \ |
| @@ -68,3 +67,7 @@ LIBRARY_SRC-a+=$(LIBIPROUTE_SRC-a) | |||
| 68 | 67 | ||
| 69 | networking_libiproute_OBJ$(os):=$(patsubst %,$(objdir)/%$(os),$(LIBIPROUTE-y)) | 68 | networking_libiproute_OBJ$(os):=$(patsubst %,$(objdir)/%$(os),$(LIBIPROUTE-y)) |
| 70 | 69 | ||
| 70 | $(networking_libiproute_OBJ$(os)): $(objdir)/%$(os): $(srcdir)/%.c | ||
| 71 | $(objdir)/networking.a: $(networking_libiproute_OBJ$(os)) | ||
| 72 | libraries-y:=$(libraries-y) $(objdir)/networking.a | ||
| 73 | |||
diff --git a/networking/udhcp/Makefile.in b/networking/udhcp/Makefile.in index ca00b647d..210939fd6 100644 --- a/networking/udhcp/Makefile.in +++ b/networking/udhcp/Makefile.in | |||
| @@ -4,8 +4,8 @@ | |||
| 4 | # | 4 | # |
| 5 | # Licensed under the GPL v2 or later, see the file LICENSE in this tarball. | 5 | # Licensed under the GPL v2 or later, see the file LICENSE in this tarball. |
| 6 | 6 | ||
| 7 | srcdir=$(top_srcdir)/networking/udhcp | 7 | srcdir:=$(top_srcdir)/networking/udhcp |
| 8 | objdir=$(top_builddir)/networking/udhcp | 8 | objdir:=$(top_builddir)/networking/udhcp |
| 9 | 9 | ||
| 10 | #ok, so I forgot how to do an or, but this is a quick and dirty hack | 10 | #ok, so I forgot how to do an or, but this is a quick and dirty hack |
| 11 | ifeq ($(strip $(CONFIG_UDHCPC)),y) | 11 | ifeq ($(strip $(CONFIG_UDHCPC)),y) |
| @@ -88,3 +88,7 @@ endif | |||
| 88 | 88 | ||
| 89 | networking_udhcp_OBJ:=$(patsubst %.c,$(objdir)/%.o,$(UDHCP-y)) | 89 | networking_udhcp_OBJ:=$(patsubst %.c,$(objdir)/%.o,$(UDHCP-y)) |
| 90 | 90 | ||
| 91 | $(networking_udhcp_OBJ): $(objdir)/%.o: $(srcdir)/%.c | ||
| 92 | $(objdir)/udhcp.a: $(networking_udhcp_OBJ) | ||
| 93 | libraries-y:=$(libraries-y) $(objdir)/udhcp.a | ||
| 94 | |||
diff --git a/procps/Makefile.in b/procps/Makefile.in index 32314c3c5..69455eb26 100644 --- a/procps/Makefile.in +++ b/procps/Makefile.in | |||
| @@ -4,8 +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 | srcdir=$(top_srcdir)/procps | 7 | srcdir:=$(top_srcdir)/procps |
| 8 | objdir=$(top_builddir)/procps | 8 | objdir:=$(top_builddir)/procps |
| 9 | 9 | ||
| 10 | PROCPS-$(CONFIG_FREE) += free.o | 10 | PROCPS-$(CONFIG_FREE) += free.o |
| 11 | PROCPS-$(CONFIG_KILL) += kill.o | 11 | PROCPS-$(CONFIG_KILL) += kill.o |
| @@ -25,3 +25,7 @@ APPLET_SRC-a+=$(PROCPS_SRC-a) | |||
| 25 | 25 | ||
| 26 | procps_OBJ:= $(patsubst %,$(objdir)/%,$(PROCPS-y)) | 26 | procps_OBJ:= $(patsubst %,$(objdir)/%,$(PROCPS-y)) |
| 27 | 27 | ||
| 28 | $(procps_OBJ): $(objdir)/%.o: $(srcdir)/%.c | ||
| 29 | $(objdir)/procps.a: $(procps_OBJ) | ||
| 30 | libraries-y:=$(libraries-y) $(objdir)/procps.a | ||
| 31 | |||
diff --git a/shell/Makefile.in b/shell/Makefile.in index 43e2acd09..94cf729a7 100644 --- a/shell/Makefile.in +++ b/shell/Makefile.in | |||
| @@ -4,8 +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 | srcdir=$(top_srcdir)/shell | 7 | srcdir:=$(top_srcdir)/shell |
| 8 | objdir=$(top_builddir)/shell | 8 | objdir:=$(top_builddir)/shell |
| 9 | 9 | ||
| 10 | SHELL-$(CONFIG_ASH) += ash.o | 10 | SHELL-$(CONFIG_ASH) += ash.o |
| 11 | SHELL-$(CONFIG_HUSH) += hush.o | 11 | SHELL-$(CONFIG_HUSH) += hush.o |
| @@ -21,3 +21,7 @@ APPLET_SRC-a+=$(SHELLT_SRC-a) | |||
| 21 | 21 | ||
| 22 | shell_OBJ:= $(patsubst %,$(objdir)/%,$(SHELL-y)) | 22 | shell_OBJ:= $(patsubst %,$(objdir)/%,$(SHELL-y)) |
| 23 | 23 | ||
| 24 | $(shell_OBJ): $(objdir)/%.o: $(srcdir)/%.c | ||
| 25 | $(objdir)/shell.a: $(shell_OBJ) | ||
| 26 | libraries-y:=$(libraries-y) $(objdir)/shell.a | ||
| 27 | |||
diff --git a/sysklogd/Makefile.in b/sysklogd/Makefile.in index d1f274110..412cf5bab 100644 --- a/sysklogd/Makefile.in +++ b/sysklogd/Makefile.in | |||
| @@ -4,8 +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 | srcdir=$(top_srcdir)/sysklogd | 7 | srcdir:=$(top_srcdir)/sysklogd |
| 8 | objdir=$(top_builddir)/sysklogd | 8 | objdir:=$(top_builddir)/sysklogd |
| 9 | 9 | ||
| 10 | SYSKLOGD-$(CONFIG_KLOGD) += klogd.o | 10 | SYSKLOGD-$(CONFIG_KLOGD) += klogd.o |
| 11 | SYSKLOGD-$(CONFIG_LOGGER) += logger.o | 11 | SYSKLOGD-$(CONFIG_LOGGER) += logger.o |
| @@ -20,3 +20,7 @@ APPLET_SRC-a+=$(SYSKLOGD_SRC-a) | |||
| 20 | 20 | ||
| 21 | sysklogd_OBJ:= $(patsubst %,$(objdir)/%,$(SYSKLOGD-y)) | 21 | sysklogd_OBJ:= $(patsubst %,$(objdir)/%,$(SYSKLOGD-y)) |
| 22 | 22 | ||
| 23 | $(sysklogd_OBJ): $(objdir)/%.o: $(srcdir)/%.c | ||
| 24 | $(objdir)/sysklogd.a: $(sysklogd_OBJ) | ||
| 25 | libraries-y:=$(libraries-y) $(objdir)/sysklogd.a | ||
| 26 | |||
diff --git a/util-linux/Makefile.in b/util-linux/Makefile.in index 031c798a0..b56a7766e 100644 --- a/util-linux/Makefile.in +++ b/util-linux/Makefile.in | |||
| @@ -4,8 +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 | srcdir=$(top_srcdir)/util-linux | 7 | srcdir:=$(top_srcdir)/util-linux |
| 8 | objdir=$(top_builddir)/util-linux | 8 | objdir:=$(top_builddir)/util-linux |
| 9 | 9 | ||
| 10 | UTIL-LINUX-$(CONFIG_DMESG) +=dmesg.o | 10 | UTIL-LINUX-$(CONFIG_DMESG) +=dmesg.o |
| 11 | UTIL-LINUX-$(CONFIG_FBSET) +=fbset.o | 11 | UTIL-LINUX-$(CONFIG_FBSET) +=fbset.o |
| @@ -48,3 +48,7 @@ endif | |||
| 48 | 48 | ||
| 49 | util-linux_OBJ:= $(patsubst %,$(objdir)/%,$(UTIL-LINUX-y)) | 49 | util-linux_OBJ:= $(patsubst %,$(objdir)/%,$(UTIL-LINUX-y)) |
| 50 | 50 | ||
| 51 | $(util-linux_OBJ): $(objdir)/%.o: $(srcdir)/%.c | ||
| 52 | $(objdir)/util-linux.a: $(util-linux_OBJ) | ||
| 53 | libraries-y:=$(libraries-y) $(objdir)/util-linux.a | ||
| 54 | |||
