lib: convert makefiles to Kbuild style

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
This commit is contained in:
Masahiro Yamada 2013-10-17 17:35:01 +09:00 committed by Tom Rini
parent 9cc1180c37
commit 0a1a157558
7 changed files with 54 additions and 203 deletions

View file

@ -5,78 +5,58 @@
# SPDX-License-Identifier: GPL-2.0+ # SPDX-License-Identifier: GPL-2.0+
# #
include $(TOPDIR)/config.mk
LIB = $(obj)libgeneric.o
ifndef CONFIG_SPL_BUILD ifndef CONFIG_SPL_BUILD
COBJS-$(CONFIG_AES) += aes.o obj-$(CONFIG_AES) += aes.o
COBJS-$(CONFIG_BZIP2) += bzlib.o obj-$(CONFIG_BZIP2) += bzlib.o
COBJS-$(CONFIG_BZIP2) += bzlib_crctable.o obj-$(CONFIG_BZIP2) += bzlib_crctable.o
COBJS-$(CONFIG_BZIP2) += bzlib_decompress.o obj-$(CONFIG_BZIP2) += bzlib_decompress.o
COBJS-$(CONFIG_BZIP2) += bzlib_randtable.o obj-$(CONFIG_BZIP2) += bzlib_randtable.o
COBJS-$(CONFIG_BZIP2) += bzlib_huffman.o obj-$(CONFIG_BZIP2) += bzlib_huffman.o
COBJS-$(CONFIG_USB_TTY) += circbuf.o obj-$(CONFIG_USB_TTY) += circbuf.o
COBJS-y += crc7.o obj-y += crc7.o
COBJS-y += crc16.o obj-y += crc16.o
COBJS-$(CONFIG_OF_CONTROL) += fdtdec.o obj-$(CONFIG_OF_CONTROL) += fdtdec.o
COBJS-$(CONFIG_TEST_FDTDEC) += fdtdec_test.o obj-$(CONFIG_TEST_FDTDEC) += fdtdec_test.o
COBJS-$(CONFIG_GZIP) += gunzip.o obj-$(CONFIG_GZIP) += gunzip.o
COBJS-$(CONFIG_GZIP_COMPRESSED) += gzip.o obj-$(CONFIG_GZIP_COMPRESSED) += gzip.o
COBJS-y += initcall.o obj-y += initcall.o
COBJS-$(CONFIG_LMB) += lmb.o obj-$(CONFIG_LMB) += lmb.o
COBJS-y += ldiv.o obj-y += ldiv.o
COBJS-$(CONFIG_MD5) += md5.o obj-$(CONFIG_MD5) += md5.o
COBJS-y += net_utils.o obj-y += net_utils.o
COBJS-$(CONFIG_PHYSMEM) += physmem.o obj-$(CONFIG_PHYSMEM) += physmem.o
COBJS-y += qsort.o obj-y += qsort.o
COBJS-$(CONFIG_SHA1) += sha1.o obj-$(CONFIG_SHA1) += sha1.o
COBJS-$(CONFIG_SHA256) += sha256.o obj-$(CONFIG_SHA256) += sha256.o
COBJS-y += strmhz.o obj-y += strmhz.o
COBJS-$(CONFIG_TPM) += tpm.o obj-$(CONFIG_TPM) += tpm.o
COBJS-$(CONFIG_RBTREE) += rbtree.o obj-$(CONFIG_RBTREE) += rbtree.o
COBJS-$(CONFIG_BITREVERSE) += bitrev.o obj-$(CONFIG_BITREVERSE) += bitrev.o
endif endif
ifdef CONFIG_SPL_BUILD ifdef CONFIG_SPL_BUILD
COBJS-$(CONFIG_SPL_YMODEM_SUPPORT) += crc16.o obj-$(CONFIG_SPL_YMODEM_SUPPORT) += crc16.o
COBJS-$(CONFIG_SPL_NET_SUPPORT) += net_utils.o obj-$(CONFIG_SPL_NET_SUPPORT) += net_utils.o
endif endif
COBJS-$(CONFIG_ADDR_MAP) += addr_map.o obj-$(CONFIG_ADDR_MAP) += addr_map.o
COBJS-y += hashtable.o obj-y += hashtable.o
COBJS-y += errno.o obj-y += errno.o
COBJS-y += display_options.o obj-y += display_options.o
COBJS-$(CONFIG_BCH) += bch.o obj-$(CONFIG_BCH) += bch.o
COBJS-y += crc32.o obj-y += crc32.o
COBJS-y += ctype.o obj-y += ctype.o
COBJS-y += div64.o obj-y += div64.o
COBJS-y += hang.o obj-y += hang.o
COBJS-y += linux_string.o obj-y += linux_string.o
COBJS-$(CONFIG_REGEX) += slre.o obj-$(CONFIG_REGEX) += slre.o
COBJS-y += string.o obj-y += string.o
COBJS-y += time.o obj-y += time.o
COBJS-$(CONFIG_TRACE) += trace.o obj-$(CONFIG_TRACE) += trace.o
COBJS-$(CONFIG_BOOTP_PXE) += uuid.o obj-$(CONFIG_BOOTP_PXE) += uuid.o
COBJS-y += vsprintf.o obj-y += vsprintf.o
COBJS-$(CONFIG_RANDOM_MACADDR) += rand.o obj-$(CONFIG_RANDOM_MACADDR) += rand.o
COBJS-$(CONFIG_BOOTP_RANDOM_DELAY) += rand.o obj-$(CONFIG_BOOTP_RANDOM_DELAY) += rand.o
COBJS-$(CONFIG_CMD_LINK_LOCAL) += rand.o obj-$(CONFIG_CMD_LINK_LOCAL) += rand.o
COBJS := $(sort $(COBJS-y))
SRCS := $(COBJS:.o=.c)
OBJS := $(addprefix $(obj),$(COBJS))
$(LIB): $(obj).depend $(OBJS)
$(call cmd_link_o_target, $(OBJS))
# SEE README.arm-unaligned-accesses # SEE README.arm-unaligned-accesses
$(obj)bzlib.o: CFLAGS += $(PLATFORM_NO_UNALIGNED) $(obj)bzlib.o: CFLAGS += $(PLATFORM_NO_UNALIGNED)
#########################################################################
# defines $(obj).depend target
include $(SRCTREE)/rules.mk
sinclude $(obj).depend
#########################################################################

View file

@ -5,30 +5,7 @@
# SPDX-License-Identifier: GPL-2.0+ # SPDX-License-Identifier: GPL-2.0+
# #
include $(TOPDIR)/config.mk
LIB = $(obj)libfdt.o
SOBJS =
COBJS-libfdt += fdt.o fdt_ro.o fdt_rw.o fdt_strerror.o fdt_sw.o fdt_wip.o fdt_empty_tree.o COBJS-libfdt += fdt.o fdt_ro.o fdt_rw.o fdt_strerror.o fdt_sw.o fdt_wip.o fdt_empty_tree.o
COBJS-$(CONFIG_OF_LIBFDT) += $(COBJS-libfdt) obj-$(CONFIG_OF_LIBFDT) += $(COBJS-libfdt)
COBJS-$(CONFIG_FIT) += $(COBJS-libfdt) obj-$(CONFIG_FIT) += $(COBJS-libfdt)
COBJS := $(sort $(COBJS-y))
SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS))
$(LIB): $(obj).depend $(OBJS)
$(call cmd_link_o_target, $(OBJS))
#########################################################################
# defines $(obj).depend target
include $(SRCTREE)/rules.mk
sinclude $(obj).depend
#########################################################################

View file

@ -8,28 +8,6 @@
# SPDX-License-Identifier: GPL-2.0+ # SPDX-License-Identifier: GPL-2.0+
# #
include $(TOPDIR)/config.mk
LIB = $(obj)liblzma.o
SOBJS =
CFLAGS += -D_LZMA_PROB32 CFLAGS += -D_LZMA_PROB32
COBJS-$(CONFIG_LZMA) += LzmaDec.o LzmaTools.o obj-$(CONFIG_LZMA) += LzmaDec.o LzmaTools.o
COBJS = $(COBJS-y)
SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS))
$(LIB): $(obj).depend $(OBJS)
$(call cmd_link_o_target, $(OBJS))
#########################################################################
# defines $(obj).depend target
include $(SRCTREE)/rules.mk
sinclude $(obj).depend
#########################################################################

View file

@ -5,26 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+ # SPDX-License-Identifier: GPL-2.0+
# #
include $(TOPDIR)/config.mk obj-$(CONFIG_LZO) += lzo1x_decompress.o
LIB = $(obj)liblzo.o
SOBJS =
COBJS-$(CONFIG_LZO) += lzo1x_decompress.o
COBJS = $(COBJS-y)
SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS))
$(LIB): $(obj).depend $(OBJS)
$(call cmd_link_o_target, $(OBJS))
#########################################################################
# defines $(obj).depend target
include $(SRCTREE)/rules.mk
sinclude $(obj).depend
#########################################################################

View file

@ -7,26 +7,6 @@
# SPDX-License-Identifier: GPL-2.0+ # SPDX-License-Identifier: GPL-2.0+
# #
include $(TOPDIR)/config.mk
LIB = $(obj)librsa.o
ifdef CONFIG_FIT_SIGNATURE ifdef CONFIG_FIT_SIGNATURE
COBJS-$(CONFIG_RSA) += rsa-verify.o obj-$(CONFIG_RSA) += rsa-verify.o
endif endif
COBJS := $(sort $(COBJS-y))
SRCS := $(COBJS:.o=.c)
OBJS := $(addprefix $(obj),$(COBJS))
$(LIB): $(obj).depend $(OBJS)
$(call cmd_link_o_target, $(OBJS))
#########################################################################
# defines $(obj).depend target
include $(SRCTREE)/rules.mk
sinclude $(obj).depend
#########################################################################

View file

@ -5,26 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+ # SPDX-License-Identifier: GPL-2.0+
# #
include $(TOPDIR)/config.mk obj-$(CONFIG_TIZEN) += tizen.o
LIB = $(obj)libtizen.o
SOBJS =
COBJS-$(CONFIG_TIZEN) += tizen.o
COBJS := $(sort $(COBJS-y))
SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS))
$(LIB): $(obj).depend $(OBJS)
$(call cmd_link_o_target, $(OBJS))
#########################################################################
# defines $(obj).depend target
include $(SRCTREE)/rules.mk
sinclude $(obj).depend
#########################################################################

View file

@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+ # SPDX-License-Identifier: GPL-2.0+
# #
include $(TOPDIR)/config.mk obj-$(CONFIG_ZLIB) += zlib.o
LIB = $(obj)libz.o
COBJS-$(CONFIG_ZLIB) += zlib.o
COBJS := $(COBJS-y)
SRCS := $(COBJS:.o=.c)
OBJS := $(addprefix $(obj),$(COBJS))
$(LIB): $(obj).depend $(OBJS)
$(call cmd_link_o_target, $(OBJS))
#########################################################################
# defines $(obj).depend target
include $(SRCTREE)/rules.mk
sinclude $(obj).depend
#########################################################################