Makefile: change LIB to LIB-y
PATCH 1/1 Makefile: change LIB to LIB-y
Use LIB-y and LIB-$(xxx) for appending libraries. Also allow appending to LIB-y in sub-makefiles.
The top Makefile and the SPL Makefile have lines like those:
ifneq ($(CONFIG_AM33XX)$(CONFIG_OMAP34XX)$(CONFIG_OMAP44XX)$(CONFIG_OMAP54XX),) LIBS-y += $(CPUDIR)/omap-common/libomap-common.o
endif
ifeq ($(SOC),mx5)
LIBS-y += $(CPUDIR)/imx-common/libimx-common.o
endif
This should be done in the arch/CPU/SoC specific sub-makefiles to keep the top Makefiles clean. This patch also allows adding of new arch/CPU/SoC specific libraries in the future without touching the top Makefiles.
--- Makefile | 144 +++++++++++++++++++++++++++++++-------------------------------- 1 file changed, 70 insertions(+), 74 deletions(-)
Makefile +70 -74
@@ -225,105 +225,101 @@ endif OBJS := $(addprefix $(obj),$(OBJS)) -LIBS = lib/libgeneric.o -LIBS += lib/lzma/liblzma.o -LIBS += lib/lzo/liblzo.o -LIBS += lib/zlib/libz.o -ifeq ($(CONFIG_TIZEN),y) -LIBS += lib/tizen/libtizen.o -endif -LIBS += $(shell if [ -f board/$(VENDOR)/common/Makefile ]; then echo \ - "board/$(VENDOR)/common/lib$(VENDOR).o"; fi) -LIBS += $(CPUDIR)/lib$(CPU).o +HAVE_VENDOR_COMMON_LIB := $(shell [ -f board/$(VENDOR)/common/Makefile ] \ + && echo y || echo n) + +LIBS-y += lib/libgeneric.o +LIBS-y += lib/lzma/liblzma.o +LIBS-y += lib/lzo/liblzo.o +LIBS-y += lib/zlib/libz.o +LIBS-$(CONFIG_TIZEN) += lib/tizen/libtizen.o +LIBS-$(HAVE_VENDOR_COMMON_LIB) += board/$(VENDOR)/common/lib$(VENDOR).o +LIBS-y += $(CPUDIR)/lib$(CPU).o ifdef SOC -LIBS += $(CPUDIR)/$(SOC)/lib$(SOC).o +LIBS-y += $(CPUDIR)/$(SOC)/lib$(SOC).o endif ifeq ($(CPU),ixp) -LIBS += arch/arm/cpu/ixp/npe/libnpe.o -endif -ifeq ($(CONFIG_OF_EMBED),y) -LIBS += dts/libdts.o +LIBS-y += arch/arm/cpu/ixp/npe/libnpe.o endif -LIBS += arch/$(ARCH)/lib/lib$(ARCH).o -LIBS += fs/cramfs/libcramfs.o fs/fat/libfat.o fs/fdos/libfdos.o fs/jffs2/libjffs2.o \ +LIBS-$(CONFIG_OF_EMBED) += dts/libdts.o +LIBS-y += arch/$(ARCH)/lib/lib$(ARCH).o +LIBS-y += fs/cramfs/libcramfs.o fs/fat/libfat.o fs/fdos/libfdos.o fs/jffs2/libjffs2.o \ fs/reiserfs/libreiserfs.o fs/ext2/libext2fs.o fs/yaffs2/libyaffs2.o \ fs/ubifs/libubifs.o -LIBS += net/libnet.o -LIBS += disk/libdisk.o -LIBS += drivers/bios_emulator/libatibiosemu.o -LIBS += drivers/block/libblock.o -LIBS += drivers/dma/libdma.o -LIBS += drivers/fpga/libfpga.o -LIBS += drivers/gpio/libgpio.o -LIBS += drivers/hwmon/libhwmon.o -LIBS += drivers/i2c/libi2c.o -LIBS += drivers/input/libinput.o -LIBS += drivers/misc/libmisc.o -LIBS += drivers/mmc/libmmc.o -LIBS += drivers/mtd/libmtd.o -LIBS += drivers/mtd/nand/libnand.o -LIBS += drivers/mtd/onenand/libonenand.o -LIBS += drivers/mtd/ubi/libubi.o -LIBS += drivers/mtd/spi/libspi_flash.o -LIBS += drivers/net/libnet.o -LIBS += drivers/net/phy/libphy.o -LIBS += drivers/pci/libpci.o -LIBS += drivers/pcmcia/libpcmcia.o -LIBS += drivers/power/libpower.o -LIBS += drivers/spi/libspi.o +LIBS-y += net/libnet.o +LIBS-y += disk/libdisk.o +LIBS-y += drivers/bios_emulator/libatibiosemu.o +LIBS-y += drivers/block/libblock.o +LIBS-y += drivers/dma/libdma.o +LIBS-y += drivers/fpga/libfpga.o +LIBS-y += drivers/gpio/libgpio.o +LIBS-y += drivers/hwmon/libhwmon.o +LIBS-y += drivers/i2c/libi2c.o +LIBS-y += drivers/input/libinput.o +LIBS-y += drivers/misc/libmisc.o +LIBS-y += drivers/mmc/libmmc.o +LIBS-y += drivers/mtd/libmtd.o +LIBS-y += drivers/mtd/nand/libnand.o +LIBS-y += drivers/mtd/onenand/libonenand.o +LIBS-y += drivers/mtd/ubi/libubi.o +LIBS-y += drivers/mtd/spi/libspi_flash.o +LIBS-y += drivers/net/libnet.o +LIBS-y += drivers/net/phy/libphy.o +LIBS-y += drivers/pci/libpci.o +LIBS-y += drivers/pcmcia/libpcmcia.o +LIBS-y += drivers/power/libpower.o +LIBS-y += drivers/spi/libspi.o ifeq ($(CPU),mpc83xx) -LIBS += drivers/qe/libqe.o -LIBS += arch/powerpc/cpu/mpc8xxx/ddr/libddr.o -LIBS += arch/powerpc/cpu/mpc8xxx/lib8xxx.o +LIBS-y += drivers/qe/libqe.o +LIBS-y += arch/powerpc/cpu/mpc8xxx/ddr/libddr.o +LIBS-y += arch/powerpc/cpu/mpc8xxx/lib8xxx.o endif ifeq ($(CPU),mpc85xx) -LIBS += drivers/qe/libqe.o -LIBS += drivers/net/fm/libfm.o -LIBS += arch/powerpc/cpu/mpc8xxx/ddr/libddr.o -LIBS += arch/powerpc/cpu/mpc8xxx/lib8xxx.o +LIBS-y += drivers/qe/libqe.o +LIBS-y += drivers/net/fm/libfm.o +LIBS-y += arch/powerpc/cpu/mpc8xxx/ddr/libddr.o +LIBS-y += arch/powerpc/cpu/mpc8xxx/lib8xxx.o endif ifeq ($(CPU),mpc86xx) -LIBS += arch/powerpc/cpu/mpc8xxx/ddr/libddr.o -LIBS += arch/powerpc/cpu/mpc8xxx/lib8xxx.o -endif -LIBS += drivers/rtc/librtc.o -LIBS += drivers/serial/libserial.o -ifeq ($(CONFIG_GENERIC_LPC_TPM),y) -LIBS += drivers/tpm/libtpm.o -endif -LIBS += drivers/twserial/libtws.o -LIBS += drivers/usb/eth/libusb_eth.o -LIBS += drivers/usb/gadget/libusb_gadget.o -LIBS += drivers/usb/host/libusb_host.o -LIBS += drivers/usb/musb/libusb_musb.o -LIBS += drivers/usb/phy/libusb_phy.o -LIBS += drivers/usb/ulpi/libusb_ulpi.o -LIBS += drivers/video/libvideo.o -LIBS += drivers/watchdog/libwatchdog.o -LIBS += common/libcommon.o -LIBS += lib/libfdt/libfdt.o -LIBS += api/libapi.o -LIBS += post/libpost.o +LIBS-y += arch/powerpc/cpu/mpc8xxx/ddr/libddr.o +LIBS-y += arch/powerpc/cpu/mpc8xxx/lib8xxx.o +endif +LIBS-y += drivers/rtc/librtc.o +LIBS-y += drivers/serial/libserial.o +LIBS-$(CONFIG_GENERIC_LPC_TPM) += drivers/tpm/libtpm.o +LIBS-y += drivers/twserial/libtws.o +LIBS-y += drivers/usb/eth/libusb_eth.o +LIBS-y += drivers/usb/gadget/libusb_gadget.o +LIBS-y += drivers/usb/host/libusb_host.o +LIBS-y += drivers/usb/musb/libusb_musb.o +LIBS-y += drivers/usb/phy/libusb_phy.o +LIBS-y += drivers/usb/ulpi/libusb_ulpi.o +LIBS-y += drivers/video/libvideo.o +LIBS-y += drivers/watchdog/libwatchdog.o +LIBS-y += common/libcommon.o +LIBS-y += lib/libfdt/libfdt.o +LIBS-y += api/libapi.o +LIBS-y += post/libpost.o ifneq ($(CONFIG_AM33XX)$(CONFIG_OMAP34XX)$(CONFIG_OMAP44XX)$(CONFIG_OMAP54XX),) -LIBS += $(CPUDIR)/omap-common/libomap-common.o +LIBS-y += $(CPUDIR)/omap-common/libomap-common.o endif ifeq ($(SOC),mx5) -LIBS += $(CPUDIR)/imx-common/libimx-common.o +LIBS-y += $(CPUDIR)/imx-common/libimx-common.o endif ifeq ($(SOC),mx6) -LIBS += $(CPUDIR)/imx-common/libimx-common.o +LIBS-y += $(CPUDIR)/imx-common/libimx-common.o endif ifeq ($(SOC),s5pc1xx) -LIBS += $(CPUDIR)/s5p-common/libs5p-common.o +LIBS-y += $(CPUDIR)/s5p-common/libs5p-common.o endif ifeq ($(SOC),exynos) -LIBS += $(CPUDIR)/s5p-common/libs5p-common.o +LIBS-y += $(CPUDIR)/s5p-common/libs5p-common.o endif -LIBS := $(addprefix $(obj),$(sort $(LIBS))) +LIBS := $(addprefix $(obj),$(sort $(LIBS-y))) .PHONY : $(LIBS) LIBBOARD = board/$(BOARDDIR)/lib$(BOARD).o
Signature · 1 line
1.7.11.1
PATCH 1/1 Makefile: change LIB to LIB-y
Dear Daniel Schwierzeck,
Quoted 9 lines · In message <[email protected]> you…
Use LIB-y and LIB-$(xxx) for appending libraries. Also allow appending to LIB-y in sub-makefiles.
The top
Makefileand the SPLMakefilehave lines like those:ifneq ($(CONFIG_AM33XX)$(CONFIG_OMAP34XX)$(CONFIG_OMAP44XX)$(CONFIG_OMAP54XX),) LIBS-y += $(CPUDIR)/omap-common/libomap-common.o
endif
Quoted 8 lines
ifeq ($(SOC),mx5)
LIBS-y += $(CPUDIR)/imx-common/libimx-common.o
endifThis should be done in the
arch/CPU/SoCspecific sub-makefiles to keep the top Makefiles clean. This patch also allows adding of newarch/CPU/SoCspecific libraries in the future without touching the top Makefiles.
Please split into two patches: one that introduces LIBS-y, and another one, that adds the extensions.
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de "Nobody will ever need more than 640k RAM!" -- Bill Gates, 1981 "Windows 95 needs at least 8 MB RAM." -- Bill Gates, 1996 "Nobody will ever need Windows 95." -- logical conclusion
cover replace LIBS by LIBS-y and allow appending to it in sub-makefiles
In reply to Daniel SchwierzeckThe top Makefile and the SPL Makefile have lines like those:
ifneq ($(CONFIG_AM33XX)$(CONFIG_OMAP34XX)$(CONFIG_OMAP44XX)$(CONFIG_OMAP54XX),) LIBS += $(CPUDIR)/omap-common/libomap-common.o
endif
ifeq ($(SOC),mx5)
LIBS += $(CPUDIR)/imx-common/libimx-common.o
endif
This should be done in the arch/CPU/SoC specific sub-makefiles to keep the top Makefiles clean. This patch also allows adding of new arch/CPU/SoC specific libraries in the future without touching the top Makefiles.
This series splits the patch in http://patchwork.ozlabs.org/patch/167866/
as demanded by Wolfgang.
Daniel Schwierzeck (3):
Makefile: allow appending to LIB in sub-makefiles
Makefile: replace LIBS by LIBS-y
Makefile: cosmetic: optimize usage of LIBS-y
Makefile | 144 +++++++++++++++++++++++++++++++-------------------------------- 1 file changed, 70 insertions(+), 74 deletions(-)
--
1.7.11.1
PATCH 1/3 Makefile: allow appending to LIB in sub-makefiles
The top Makefile and the SPL Makefile have lines like those:
ifneq ($(CONFIG_AM33XX)$(CONFIG_OMAP34XX)$(CONFIG_OMAP44XX)$(CONFIG_OMAP54XX),) LIBS += $(CPUDIR)/omap-common/libomap-common.o
endif
ifeq ($(SOC),mx5)
LIBS += $(CPUDIR)/imx-common/libimx-common.o
endif
This should be done in the arch/CPU/SoC specific sub-makefiles to keep the top Makefiles clean. This patch also allows adding of new arch/CPU/SoC specific libraries in the future without touching the top Makefiles.
--- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile +1 -1
@@ -225,7 +225,7 @@ endif OBJS := $(addprefix $(obj),$(OBJS)) -LIBS = lib/libgeneric.o +LIBS += lib/libgeneric.o LIBS += lib/lzma/liblzma.o LIBS += lib/lzo/liblzo.o LIBS += lib/zlib/libz.o
Signature · 1 line
1.7.11.1
PATCH 1/3 Makefile: allow appending to LIB in sub-makefiles
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120718/4c40b096/attachment.pgp>
Wolfgang Denk
AppliedPATCH 1/3 Makefile: allow appending to LIB in sub-makefiles
In reply to Daniel SchwierzeckDear Daniel Schwierzeck,
Quoted 15 lines · In message <[email protected]> you…
The top
Makefileand the SPLMakefilehave lines like those:ifneq ($(CONFIG_AM33XX)$(CONFIG_OMAP34XX)$(CONFIG_OMAP44XX)$(CONFIG_OMAP54XX),) LIBS += $(CPUDIR)/omap-common/libomap-common.o
endififeq ($(SOC),mx5)
LIBS += $(CPUDIR)/imx-common/libimx-common.o
endifThis should be done in the
arch/CPU/SoCspecific sub-makefiles to keep the top Makefiles clean. This patch also allows adding of newarch/CPU/SoCspecific libraries in the future without touching the top Makefiles.
Quoted 4 lines
Signed-off-by Daniel Schwierzeck <[email protected]>--- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 7 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Mandrell: "You know what I think?"
Doctor: "Ah, ah that's a catch question. With a brain your size you
don't think, right?"
- Dr. WhoPATCH 2/3 Makefile: replace LIBS by LIBS-y
In reply to Daniel SchwierzeckSynchronize with ALL-y handling and code in spl/Makefile.
--- Makefile | 134 +++++++++++++++++++++++++++++++-------------------------------- 1 file changed, 67 insertions(+), 67 deletions(-)
Makefile +67 -67
@@ -225,105 +225,105 @@ endif OBJS := $(addprefix $(obj),$(OBJS)) -LIBS += lib/libgeneric.o -LIBS += lib/lzma/liblzma.o -LIBS += lib/lzo/liblzo.o -LIBS += lib/zlib/libz.o +LIBS-y += lib/libgeneric.o +LIBS-y += lib/lzma/liblzma.o +LIBS-y += lib/lzo/liblzo.o +LIBS-y += lib/zlib/libz.o ifeq ($(CONFIG_TIZEN),y) -LIBS += lib/tizen/libtizen.o +LIBS-y += lib/tizen/libtizen.o endif -LIBS += $(shell if [ -f board/$(VENDOR)/common/Makefile ]; then echo \ +LIBS-y += $(shell if [ -f board/$(VENDOR)/common/Makefile ]; then echo \ "board/$(VENDOR)/common/lib$(VENDOR).o"; fi) -LIBS += $(CPUDIR)/lib$(CPU).o +LIBS-y += $(CPUDIR)/lib$(CPU).o ifdef SOC -LIBS += $(CPUDIR)/$(SOC)/lib$(SOC).o +LIBS-y += $(CPUDIR)/$(SOC)/lib$(SOC).o endif ifeq ($(CPU),ixp) -LIBS += arch/arm/cpu/ixp/npe/libnpe.o +LIBS-y += arch/arm/cpu/ixp/npe/libnpe.o endif ifeq ($(CONFIG_OF_EMBED),y) -LIBS += dts/libdts.o +LIBS-y += dts/libdts.o endif -LIBS += arch/$(ARCH)/lib/lib$(ARCH).o -LIBS += fs/cramfs/libcramfs.o fs/fat/libfat.o fs/fdos/libfdos.o fs/jffs2/libjffs2.o \ +LIBS-y += arch/$(ARCH)/lib/lib$(ARCH).o +LIBS-y += fs/cramfs/libcramfs.o fs/fat/libfat.o fs/fdos/libfdos.o fs/jffs2/libjffs2.o \ fs/reiserfs/libreiserfs.o fs/ext2/libext2fs.o fs/yaffs2/libyaffs2.o \ fs/ubifs/libubifs.o -LIBS += net/libnet.o -LIBS += disk/libdisk.o -LIBS += drivers/bios_emulator/libatibiosemu.o -LIBS += drivers/block/libblock.o -LIBS += drivers/dma/libdma.o -LIBS += drivers/fpga/libfpga.o -LIBS += drivers/gpio/libgpio.o -LIBS += drivers/hwmon/libhwmon.o -LIBS += drivers/i2c/libi2c.o -LIBS += drivers/input/libinput.o -LIBS += drivers/misc/libmisc.o -LIBS += drivers/mmc/libmmc.o -LIBS += drivers/mtd/libmtd.o -LIBS += drivers/mtd/nand/libnand.o -LIBS += drivers/mtd/onenand/libonenand.o -LIBS += drivers/mtd/ubi/libubi.o -LIBS += drivers/mtd/spi/libspi_flash.o -LIBS += drivers/net/libnet.o -LIBS += drivers/net/phy/libphy.o -LIBS += drivers/pci/libpci.o -LIBS += drivers/pcmcia/libpcmcia.o -LIBS += drivers/power/libpower.o -LIBS += drivers/spi/libspi.o +LIBS-y += net/libnet.o +LIBS-y += disk/libdisk.o +LIBS-y += drivers/bios_emulator/libatibiosemu.o +LIBS-y += drivers/block/libblock.o +LIBS-y += drivers/dma/libdma.o +LIBS-y += drivers/fpga/libfpga.o +LIBS-y += drivers/gpio/libgpio.o +LIBS-y += drivers/hwmon/libhwmon.o +LIBS-y += drivers/i2c/libi2c.o +LIBS-y += drivers/input/libinput.o +LIBS-y += drivers/misc/libmisc.o +LIBS-y += drivers/mmc/libmmc.o +LIBS-y += drivers/mtd/libmtd.o +LIBS-y += drivers/mtd/nand/libnand.o +LIBS-y += drivers/mtd/onenand/libonenand.o +LIBS-y += drivers/mtd/ubi/libubi.o +LIBS-y += drivers/mtd/spi/libspi_flash.o +LIBS-y += drivers/net/libnet.o +LIBS-y += drivers/net/phy/libphy.o +LIBS-y += drivers/pci/libpci.o +LIBS-y += drivers/pcmcia/libpcmcia.o +LIBS-y += drivers/power/libpower.o +LIBS-y += drivers/spi/libspi.o ifeq ($(CPU),mpc83xx) -LIBS += drivers/qe/libqe.o -LIBS += arch/powerpc/cpu/mpc8xxx/ddr/libddr.o -LIBS += arch/powerpc/cpu/mpc8xxx/lib8xxx.o +LIBS-y += drivers/qe/libqe.o +LIBS-y += arch/powerpc/cpu/mpc8xxx/ddr/libddr.o +LIBS-y += arch/powerpc/cpu/mpc8xxx/lib8xxx.o endif ifeq ($(CPU),mpc85xx) -LIBS += drivers/qe/libqe.o -LIBS += drivers/net/fm/libfm.o -LIBS += arch/powerpc/cpu/mpc8xxx/ddr/libddr.o -LIBS += arch/powerpc/cpu/mpc8xxx/lib8xxx.o +LIBS-y += drivers/qe/libqe.o +LIBS-y += drivers/net/fm/libfm.o +LIBS-y += arch/powerpc/cpu/mpc8xxx/ddr/libddr.o +LIBS-y += arch/powerpc/cpu/mpc8xxx/lib8xxx.o endif ifeq ($(CPU),mpc86xx) -LIBS += arch/powerpc/cpu/mpc8xxx/ddr/libddr.o -LIBS += arch/powerpc/cpu/mpc8xxx/lib8xxx.o +LIBS-y += arch/powerpc/cpu/mpc8xxx/ddr/libddr.o +LIBS-y += arch/powerpc/cpu/mpc8xxx/lib8xxx.o endif -LIBS += drivers/rtc/librtc.o -LIBS += drivers/serial/libserial.o +LIBS-y += drivers/rtc/librtc.o +LIBS-y += drivers/serial/libserial.o ifeq ($(CONFIG_GENERIC_LPC_TPM),y) -LIBS += drivers/tpm/libtpm.o -endif -LIBS += drivers/twserial/libtws.o -LIBS += drivers/usb/eth/libusb_eth.o -LIBS += drivers/usb/gadget/libusb_gadget.o -LIBS += drivers/usb/host/libusb_host.o -LIBS += drivers/usb/musb/libusb_musb.o -LIBS += drivers/usb/phy/libusb_phy.o -LIBS += drivers/usb/ulpi/libusb_ulpi.o -LIBS += drivers/video/libvideo.o -LIBS += drivers/watchdog/libwatchdog.o -LIBS += common/libcommon.o -LIBS += lib/libfdt/libfdt.o -LIBS += api/libapi.o -LIBS += post/libpost.o +LIBS-y += drivers/tpm/libtpm.o +endif +LIBS-y += drivers/twserial/libtws.o +LIBS-y += drivers/usb/eth/libusb_eth.o +LIBS-y += drivers/usb/gadget/libusb_gadget.o +LIBS-y += drivers/usb/host/libusb_host.o +LIBS-y += drivers/usb/musb/libusb_musb.o +LIBS-y += drivers/usb/phy/libusb_phy.o +LIBS-y += drivers/usb/ulpi/libusb_ulpi.o +LIBS-y += drivers/video/libvideo.o +LIBS-y += drivers/watchdog/libwatchdog.o +LIBS-y += common/libcommon.o +LIBS-y += lib/libfdt/libfdt.o +LIBS-y += api/libapi.o +LIBS-y += post/libpost.o ifneq ($(CONFIG_AM33XX)$(CONFIG_OMAP34XX)$(CONFIG_OMAP44XX)$(CONFIG_OMAP54XX),) -LIBS += $(CPUDIR)/omap-common/libomap-common.o +LIBS-y += $(CPUDIR)/omap-common/libomap-common.o endif ifeq ($(SOC),mx5) -LIBS += $(CPUDIR)/imx-common/libimx-common.o +LIBS-y += $(CPUDIR)/imx-common/libimx-common.o endif ifeq ($(SOC),mx6) -LIBS += $(CPUDIR)/imx-common/libimx-common.o +LIBS-y += $(CPUDIR)/imx-common/libimx-common.o endif ifeq ($(SOC),s5pc1xx) -LIBS += $(CPUDIR)/s5p-common/libs5p-common.o +LIBS-y += $(CPUDIR)/s5p-common/libs5p-common.o endif ifeq ($(SOC),exynos) -LIBS += $(CPUDIR)/s5p-common/libs5p-common.o +LIBS-y += $(CPUDIR)/s5p-common/libs5p-common.o endif -LIBS := $(addprefix $(obj),$(sort $(LIBS))) +LIBS := $(addprefix $(obj),$(sort $(LIBS-y))) .PHONY : $(LIBS) LIBBOARD = board/$(BOARDDIR)/lib$(BOARD).o
Signature · 1 line
1.7.11.1
PATCH 2/3 Makefile: replace LIBS by LIBS-y
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120718/42b18f55/attachment.pgp>
Wolfgang Denk
AppliedPATCH 2/3 Makefile: replace LIBS by LIBS-y
In reply to Daniel SchwierzeckDear Daniel Schwierzeck,
Quoted 6 lines · In message <[email protected]> you…
Synchronize with ALL-y handling and code in spl/Makefile.
Signed-off-by Daniel Schwierzeck <[email protected]>--- Makefile | 134 +++++++++++++++++++++++++++++++-------------------------------- 1 file changed, 67 insertions(+), 67 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de You got to learn three things. What's real, what's not real, and what's the difference." - Terry Pratchett, _Witches Abroad_
PATCH 2/3 Makefile: replace LIBS by LIBS-y
Dear Wolfgang Denk,
Quoted 3 lines
Dear Daniel Schwierzeck,
In message <[email protected]> you
Quoted 8 lines · wrote:
Quoted 8 lines
Synchronize with ALL-y handling and code in spl/Makefile.
Signed-off-by Daniel Schwierzeck <[email protected]>---
Makefile | 134+++++++++++++++++++++++++++++++-------------------------------- 1 file changed, 67 insertions(+), 67 deletions(-)
Bah, looks like we have a breakage in here ... breaks whole range of spear300 machines and some tegra2s ... I'm investigating just now, but I think I can cite Wolfgang during his absence here (bah, I wasn't able to find any particularly beefy quotation, the following has to make do) :-)
"And all these build warnings - have you ever actully compiled that code? What's going on here??? - wd"
Quoted 5 lines
Applied, thanks.
Best regards,
Wolfgang Denk
Best regards,
Marek Vasut
PATCH 3/3 Makefile: cosmetic: optimize usage of LIBS-y
In reply to Daniel Schwierzeck--- Makefile | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-)
Makefile +7 -11
@@ -225,15 +225,15 @@ endif OBJS := $(addprefix $(obj),$(OBJS)) +HAVE_VENDOR_COMMON_LIB := $(shell [ -f board/$(VENDOR)/common/Makefile ] \ + && echo y || echo n) + LIBS-y += lib/libgeneric.o LIBS-y += lib/lzma/liblzma.o LIBS-y += lib/lzo/liblzo.o LIBS-y += lib/zlib/libz.o -ifeq ($(CONFIG_TIZEN),y) -LIBS-y += lib/tizen/libtizen.o -endif -LIBS-y += $(shell if [ -f board/$(VENDOR)/common/Makefile ]; then echo \ - "board/$(VENDOR)/common/lib$(VENDOR).o"; fi) +LIBS-$(CONFIG_TIZEN) += lib/tizen/libtizen.o +LIBS-$(HAVE_VENDOR_COMMON_LIB) += board/$(VENDOR)/common/lib$(VENDOR).o LIBS-y += $(CPUDIR)/lib$(CPU).o ifdef SOC LIBS-y += $(CPUDIR)/$(SOC)/lib$(SOC).o
@@ -241,9 +241,7 @@ endif ifeq ($(CPU),ixp) LIBS-y += arch/arm/cpu/ixp/npe/libnpe.o endif -ifeq ($(CONFIG_OF_EMBED),y) -LIBS-y += dts/libdts.o -endif +LIBS-$(CONFIG_OF_EMBED) += dts/libdts.o LIBS-y += arch/$(ARCH)/lib/lib$(ARCH).o LIBS-y += fs/cramfs/libcramfs.o fs/fat/libfat.o fs/fdos/libfdos.o fs/jffs2/libjffs2.o \ fs/reiserfs/libreiserfs.o fs/ext2/libext2fs.o fs/yaffs2/libyaffs2.o \
@@ -288,9 +286,7 @@ LIBS-y += arch/powerpc/cpu/mpc8xxx/lib8xxx.o endif LIBS-y += drivers/rtc/librtc.o LIBS-y += drivers/serial/libserial.o -ifeq ($(CONFIG_GENERIC_LPC_TPM),y) -LIBS-y += drivers/tpm/libtpm.o -endif +LIBS-$(CONFIG_GENERIC_LPC_TPM) += drivers/tpm/libtpm.o LIBS-y += drivers/twserial/libtws.o LIBS-y += drivers/usb/eth/libusb_eth.o LIBS-y += drivers/usb/gadget/libusb_gadget.o
Signature · 1 line
1.7.11.1
PATCH 3/3 Makefile: cosmetic: optimize usage of LIBS-y
Makefile endif · line 229
Quoted 5 lines · On Thursday 28 June 2012 12:45:21 Daniel Schwierzeck wrote:
Makefile +2
-0+HAVE_VENDOR_COMMON_LIB := $(shell [ -f board/$(VENDOR)/common/Makefile ] \ + && echo y || echo n)
HAVE_VENDOR_COMMON_LIB = $(if $(wildcard board/$(VENDOR)/common/Makefile),y,n) -mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120718/7091bcf3/attachment.pgp>
PATCH 3/3 Makefile: cosmetic: optimize usage of LIBS-y
Hi Mike,
2012/7/19 Mike Frysinger <[email protected]>:
Quoted 9 lines · On Thursday 28 June 2012 12:45:21 Daniel Schwierzeck wrote:
Makefile endif · line 229
Quoted 5 lines
Makefile +2
-0+HAVE_VENDOR_COMMON_LIB := $(shell [ -f board/$(VENDOR)/common/Makefile ] \ + && echo y || echo n)
HAVE_VENDOR_COMMON_LIB= $(if $(wildcard board/$(VENDOR)/common/Makefile),y,n) -mike
yes, that's better.
I'll also cook a patch for spl/Makefile that already has this piece of code.
Thanks,
Daniel
PATCH v2 3/3 Makefile: cosmetic: optimize usage of LIBS-y
In reply to Daniel SchwierzeckFrom: Daniel Schwierzeck <[email protected]>
---
Changes for v2:
- optimized HAVE_VENDOR_COMMON_LIB macro as suggested by Mike
- optimized HAVE_VENDOR_COMMON_LIB macro also in spl/Makefile
--- Makefile | 17 ++++++----------- spl/Makefile | 3 +-- 2 files changed, 7 insertions(+), 13 deletions(-)
Makefile +6 -11
@@ -225,15 +225,14 @@ endif OBJS := $(addprefix $(obj),$(OBJS)) +HAVE_VENDOR_COMMON_LIB = $(if $(wildcard board/$(VENDOR)/common/Makefile), y, n) + LIBS-y += lib/libgeneric.o LIBS-y += lib/lzma/liblzma.o LIBS-y += lib/lzo/liblzo.o LIBS-y += lib/zlib/libz.o -ifeq ($(CONFIG_TIZEN),y) -LIBS-y += lib/tizen/libtizen.o -endif -LIBS-y += $(shell if [ -f board/$(VENDOR)/common/Makefile ]; then echo \ - "board/$(VENDOR)/common/lib$(VENDOR).o"; fi) +LIBS-$(CONFIG_TIZEN) += lib/tizen/libtizen.o +LIBS-$(HAVE_VENDOR_COMMON_LIB) += board/$(VENDOR)/common/lib$(VENDOR).o LIBS-y += $(CPUDIR)/lib$(CPU).o ifdef SOC LIBS-y += $(CPUDIR)/$(SOC)/lib$(SOC).o
@@ -241,9 +240,7 @@ endif ifeq ($(CPU),ixp) LIBS-y += arch/arm/cpu/ixp/npe/libnpe.o endif -ifeq ($(CONFIG_OF_EMBED),y) -LIBS-y += dts/libdts.o -endif +LIBS-$(CONFIG_OF_EMBED) += dts/libdts.o LIBS-y += arch/$(ARCH)/lib/lib$(ARCH).o LIBS-y += fs/cramfs/libcramfs.o fs/fat/libfat.o fs/fdos/libfdos.o fs/jffs2/libjffs2.o \ fs/reiserfs/libreiserfs.o fs/ext2/libext2fs.o fs/yaffs2/libyaffs2.o \
@@ -288,9 +285,7 @@ LIBS-y += arch/powerpc/cpu/mpc8xxx/lib8xxx.o endif LIBS-y += drivers/rtc/librtc.o LIBS-y += drivers/serial/libserial.o -ifeq ($(CONFIG_GENERIC_LPC_TPM),y) -LIBS-y += drivers/tpm/libtpm.o -endif +LIBS-$(CONFIG_GENERIC_LPC_TPM) += drivers/tpm/libtpm.o LIBS-y += drivers/twserial/libtws.o LIBS-y += drivers/usb/eth/libusb_eth.o LIBS-y += drivers/usb/gadget/libusb_gadget.o
spl/Makefile +1 -2
@@ -23,8 +23,7 @@ include $(TOPDIR)/config.mk # We want the final binaries in this directory obj := $(OBJTREE)/spl/ -HAVE_VENDOR_COMMON_LIB := $(shell [ -f $(SRCTREE)/board/$(VENDOR)/common/Makefile ] \ - && echo y || echo n) +HAVE_VENDOR_COMMON_LIB = $(if $(wildcard $(SRCTREE)/board/$(VENDOR)/common/Makefile), y, n) ifdef CONFIG_SPL_START_S_PATH START_PATH := $(subst ",,$(CONFIG_SPL_START_S_PATH))
Signature · 1 line
1.7.11.1
Wolfgang Denk
AppliedPATCH v2 3/3 Makefile: cosmetic: optimize usage of LIBS-y
Dear daniel.schwierzeck at gmail.com,
Quoted 4 lines · In message <[email protected]> you…
From: Daniel Schwierzeck <[email protected]>
Signed-off-by Daniel Schwierzeck <[email protected]>
Quoted 8 lines
---
Changes for v2:
- optimizedHAVE_VENDOR_COMMON_LIBmacro as suggested by Mike
- optimizedHAVE_VENDOR_COMMON_LIBmacro also in spl/Makefile--- Makefile | 17 ++++++----------- spl/Makefile | 3 +-- 2 files changed, 7 insertions(+), 13 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 11 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Each team building another component has been using the most recent
tested version of the integrated system as a test bed for debugging
its piece. Their work will be set back by having that test bed change
under them. Of course it must. But the changes need to be quantized.
Then each user has periods of productive stability, interrupted by
bursts of test-bed change. This seems to be much less disruptive than
a constant rippling and trembling.
- Frederick Brooks Jr., "The Mythical Man Month"PATCH v2 3/3 Makefile: cosmetic: optimize usage of LIBS-y
Quoted 16 lines · Wolfgang Denk
Dear daniel.schwierzeck at gmail.com,
Quoted 4 lines · In message <[email protected]> you…
From: Daniel Schwierzeck <[email protected]>
Signed-off-by Daniel Schwierzeck <[email protected]>Quoted 8 lines
---
Changes for v2:
- optimizedHAVE_VENDOR_COMMON_LIBmacro as suggested by Mike
- optimizedHAVE_VENDOR_COMMON_LIBmacro also in spl/Makefile
---Makefile| 17 ++++++-----------
spl/Makefile | 3 +--2 files changed, 7 insertions(+), 13 deletions(-)
Quoted 5 lines
Applied, thanks.
Best regards,
Wolfgang Denk
I spoke too soon, this patch is causing build issues on P4080DS_config:
[galak at right u-boot]$ make -j40 -sarch/powerpc/cpu/mpc85xx/libmpc85xx.o: In function `ft_cpu_setup':
/local/home/galak/git/u-boot/arch/powerpc/cpu/mpc85xx/fdt.c:614: undefined reference to get_board_sys_clk' arch/powerpc/cpu/mpc85xx/libmpc85xx.o: In function get_sys_info':
/local/home/galak/git/u-boot/arch/powerpc/cpu/mpc85xx/speed.c:77: undefined reference to get_board_sys_clk' arch/powerpc/cpu/mpc85xx/libmpc85xx.o:(.got2+0x344): undefined reference to tlb_table' arch/powerpc/cpu/mpc85xx/libmpc85xx.o:(.got2+0x348): undefined reference to num_tlb_entries' arch/powerpc/lib/libpowerpc.o: In function board_init_r':
/local/home/galak/git/u-boot/arch/powerpc/lib/board.c:850: undefined reference to mac_read_from_eeprom' common/libcommon.o:(.u_boot_cmd+0x370): undefined reference to do_mac' drivers/misc/libmisc.o:(.got2+0x14): undefined reference to law_table' drivers/misc/libmisc.o:(.got2+0x18): undefined reference to num_law_entries' drivers/pci/libpci.o: In function `pci_init':
/local/home/galak/git/u-boot/drivers/pci/pci.c:731: undefined reference to pci_init_board' board/freescale/corenet_ds/libcorenet_ds.o: In function ft_board_setup':
/local/home/galak/git/u-boot/board/freescale/corenet_ds/corenet_ds.c:231: undefined reference to pci_of_setup' board/freescale/corenet_ds/libcorenet_ds.o: In function board_ft_fman_fixup_port':
/local/home/galak/git/u-boot/board/freescale/corenet_ds/eth_p4080.c:230: undefined reference to fdt_set_phy_handle' /local/home/galak/git/u-boot/board/freescale/corenet_ds/eth_p4080.c:238: undefined reference to fdt_set_phy_handle'
make: *** [u-boot] Error 1
[galak at right u-boot]$
- k
PATCH v2 3/3 Makefile: cosmetic: optimize usage of LIBS-y
Quoted 49 lines · Kumar Gala
Quoted 16 lines · Wolfgang Denk
Dear daniel.schwierzeck at gmail.com,
Quoted 4 lines · In message <[email protected]> you…
From: Daniel Schwierzeck <[email protected]>
Signed-off-by Daniel Schwierzeck <[email protected]>Quoted 8 lines
---
Changes for v2:
- optimizedHAVE_VENDOR_COMMON_LIBmacro as suggested by Mike
- optimizedHAVE_VENDOR_COMMON_LIBmacro also in spl/Makefile
---Makefile| 17 ++++++-----------
spl/Makefile | 3 +--2 files changed, 7 insertions(+), 13 deletions(-)Quoted 5 lines
Applied, thanks.
Best regards,
Wolfgang Denk
I spoke too soon, this patch is causing build issues on
P4080DS_config:[galak at right u-boot]$ make -j40 -s
arch/powerpc/cpu/mpc85xx/libmpc85xx.o: In function `ft_cpu_setup':
/local/home/galak/git/u-boot/arch/powerpc/cpu/mpc85xx/fdt.c:614: undefined reference toget_board_sys_clk' arch/powerpc/cpu/mpc85xx/libmpc85xx.o: In functionget_sys_info':
/local/home/galak/git/u-boot/arch/powerpc/cpu/mpc85xx/speed.c:77: undefined reference toget_board_sys_clk' arch/powerpc/cpu/mpc85xx/libmpc85xx.o:(.got2+0x344): undefined reference totlb_table' arch/powerpc/cpu/mpc85xx/libmpc85xx.o:(.got2+0x348): undefined reference tonum_tlb_entries' arch/powerpc/lib/libpowerpc.o: In functionboard_init_r':
/local/home/galak/git/u-boot/arch/powerpc/lib/board.c:850: undefined reference tomac_read_from_eeprom' common/libcommon.o:(.u_boot_cmd+0x370): undefined reference todo_mac' drivers/misc/libmisc.o:(.got2+0x14): undefined reference tolaw_table' drivers/misc/libmisc.o:(.got2+0x18): undefined reference tonum_law_entries'drivers/pci/libpci.o: In function `pci_init':
/local/home/galak/git/u-boot/drivers/pci/pci.c:731: undefined reference topci_init_board' board/freescale/corenet_ds/libcorenet_ds.o: In functionft_board_setup':
/local/home/galak/git/u-boot/board/freescale/corenet_ds/corenet_ds.c:231: undefined reference topci_of_setup' board/freescale/corenet_ds/libcorenet_ds.o: In functionboard_ft_fman_fixup_port':
/local/home/galak/git/u-boot/board/freescale/corenet_ds/eth_p4080.c:230: undefined reference tofdt_set_phy_handle' /local/home/galak/git/u-boot/board/freescale/corenet_ds/eth_p4080.c:238: undefined reference tofdt_set_phy_handle'
make: *** [u-boot] Error 1
[galak at right u-boot]$
Quoted 1 line
- k
This is fixed by:
http://patchwork.ozlabs.org/patch/177235/
- k
PATCH 3/3 Makefile: cosmetic: optimize usage of LIBS-y
In reply to Daniel SchwierzeckDear Daniel Schwierzeck,
Quoted 17 lines
Signed-off-by Daniel Schwierzeck <[email protected]>--- Makefile | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-)Makefile +3
-0@@ -225,15 +225,15 @@ endif OBJS := $(addprefix $(obj),$(OBJS)) +HAVE_VENDOR_COMMON_LIB := $(shell [ -f board/$(VENDOR)/common/Makefile ] \ + && echo y || echo n) + LIBS-y += lib/libgeneric.o
Makefile endif · line 236
Quoted 10 lines
Makefile +2
-5LIBS-y += lib/lzma/liblzma.o LIBS-y += lib/lzo/liblzo.o LIBS-y += lib/zlib/libz.o -ifeq ($(CONFIG_TIZEN),y) -LIBS-y += lib/tizen/libtizen.o -endif -LIBS-y += $(shell if [ -f board/$(VENDOR)/common/Makefile ]; then echo \ - "board/$(VENDOR)/common/lib$(VENDOR).o"; fi) +LIBS-$(CONFIG_TIZEN) += lib/tizen/libtizen.o +LIBS-$(HAVE_VENDOR_COMMON_LIB) += board/$(VENDOR)/common/lib$(VENDOR).o
It's apparently this change to HAVE_VENDOR_COMMON_LIB that breaks stuff :-(
Makefile endif · line 239
Quoted 3 lines
Makefile +0
-0LIBS-y += $(CPUDIR)/lib$(CPU).o ifdef SOC LIBS-y += $(CPUDIR)/$(SOC)/lib$(SOC).o
[...]
Best regards,
Marek Vasut
PATCH 1/1 Makefile: change LIB to LIB-y
In reply to Daniel SchwierzeckQuoted 2 lines · On Thursday 28 June 2012 08:40:00 Daniel Schwierzeck wrote:
Use LIB-y and LIB-$(xxx) for appending libraries. Also allow appending to LIB-y in sub-makefiles.
nice ... hope this gets split & merged soon :)
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120718/295905c2/attachment.pgp>