summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.m@jp.panasonic.com>2013-10-17 17:35:01 +0900
committerTom Rini <trini@ti.com>2013-10-31 13:26:44 -0400
commit0a1a1575587b1ec28196b8519c812d6d468a344a (patch)
tree5e109319236ada90b0d0a9c700febdfc6fcc35b4 /lib
parent9cc1180c37ab2011ed274bf61565b4aa5c877123 (diff)
lib: convert makefiles to Kbuild style
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/Makefile114
-rw-r--r--lib/libfdt/Makefile27
-rw-r--r--lib/lzma/Makefile24
-rw-r--r--lib/lzo/Makefile24
-rw-r--r--lib/rsa/Makefile22
-rw-r--r--lib/tizen/Makefile24
-rw-r--r--lib/zlib/Makefile22
7 files changed, 54 insertions, 203 deletions
diff --git a/lib/Makefile b/lib/Makefile
index df0cdd4252e..4e3b500f5ad 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -5,78 +5,58 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)libgeneric.o
-
ifndef CONFIG_SPL_BUILD
-COBJS-$(CONFIG_AES) += aes.o
-COBJS-$(CONFIG_BZIP2) += bzlib.o
-COBJS-$(CONFIG_BZIP2) += bzlib_crctable.o
-COBJS-$(CONFIG_BZIP2) += bzlib_decompress.o
-COBJS-$(CONFIG_BZIP2) += bzlib_randtable.o
-COBJS-$(CONFIG_BZIP2) += bzlib_huffman.o
-COBJS-$(CONFIG_USB_TTY) += circbuf.o
-COBJS-y += crc7.o
-COBJS-y += crc16.o
-COBJS-$(CONFIG_OF_CONTROL) += fdtdec.o
-COBJS-$(CONFIG_TEST_FDTDEC) += fdtdec_test.o
-COBJS-$(CONFIG_GZIP) += gunzip.o
-COBJS-$(CONFIG_GZIP_COMPRESSED) += gzip.o
-COBJS-y += initcall.o
-COBJS-$(CONFIG_LMB) += lmb.o
-COBJS-y += ldiv.o
-COBJS-$(CONFIG_MD5) += md5.o
-COBJS-y += net_utils.o
-COBJS-$(CONFIG_PHYSMEM) += physmem.o
-COBJS-y += qsort.o
-COBJS-$(CONFIG_SHA1) += sha1.o
-COBJS-$(CONFIG_SHA256) += sha256.o
-COBJS-y += strmhz.o
-COBJS-$(CONFIG_TPM) += tpm.o
-COBJS-$(CONFIG_RBTREE) += rbtree.o
-COBJS-$(CONFIG_BITREVERSE) += bitrev.o
+obj-$(CONFIG_AES) += aes.o
+obj-$(CONFIG_BZIP2) += bzlib.o
+obj-$(CONFIG_BZIP2) += bzlib_crctable.o
+obj-$(CONFIG_BZIP2) += bzlib_decompress.o
+obj-$(CONFIG_BZIP2) += bzlib_randtable.o
+obj-$(CONFIG_BZIP2) += bzlib_huffman.o
+obj-$(CONFIG_USB_TTY) += circbuf.o
+obj-y += crc7.o
+obj-y += crc16.o
+obj-$(CONFIG_OF_CONTROL) += fdtdec.o
+obj-$(CONFIG_TEST_FDTDEC) += fdtdec_test.o
+obj-$(CONFIG_GZIP) += gunzip.o
+obj-$(CONFIG_GZIP_COMPRESSED) += gzip.o
+obj-y += initcall.o
+obj-$(CONFIG_LMB) += lmb.o
+obj-y += ldiv.o
+obj-$(CONFIG_MD5) += md5.o
+obj-y += net_utils.o
+obj-$(CONFIG_PHYSMEM) += physmem.o
+obj-y += qsort.o
+obj-$(CONFIG_SHA1) += sha1.o
+obj-$(CONFIG_SHA256) += sha256.o
+obj-y += strmhz.o
+obj-$(CONFIG_TPM) += tpm.o
+obj-$(CONFIG_RBTREE) += rbtree.o
+obj-$(CONFIG_BITREVERSE) += bitrev.o
endif
ifdef CONFIG_SPL_BUILD
-COBJS-$(CONFIG_SPL_YMODEM_SUPPORT) += crc16.o
-COBJS-$(CONFIG_SPL_NET_SUPPORT) += net_utils.o
+obj-$(CONFIG_SPL_YMODEM_SUPPORT) += crc16.o
+obj-$(CONFIG_SPL_NET_SUPPORT) += net_utils.o
endif
-COBJS-$(CONFIG_ADDR_MAP) += addr_map.o
-COBJS-y += hashtable.o
-COBJS-y += errno.o
-COBJS-y += display_options.o
-COBJS-$(CONFIG_BCH) += bch.o
-COBJS-y += crc32.o
-COBJS-y += ctype.o
-COBJS-y += div64.o
-COBJS-y += hang.o
-COBJS-y += linux_string.o
-COBJS-$(CONFIG_REGEX) += slre.o
-COBJS-y += string.o
-COBJS-y += time.o
-COBJS-$(CONFIG_TRACE) += trace.o
-COBJS-$(CONFIG_BOOTP_PXE) += uuid.o
-COBJS-y += vsprintf.o
-COBJS-$(CONFIG_RANDOM_MACADDR) += rand.o
-COBJS-$(CONFIG_BOOTP_RANDOM_DELAY) += rand.o
-COBJS-$(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))
+obj-$(CONFIG_ADDR_MAP) += addr_map.o
+obj-y += hashtable.o
+obj-y += errno.o
+obj-y += display_options.o
+obj-$(CONFIG_BCH) += bch.o
+obj-y += crc32.o
+obj-y += ctype.o
+obj-y += div64.o
+obj-y += hang.o
+obj-y += linux_string.o
+obj-$(CONFIG_REGEX) += slre.o
+obj-y += string.o
+obj-y += time.o
+obj-$(CONFIG_TRACE) += trace.o
+obj-$(CONFIG_BOOTP_PXE) += uuid.o
+obj-y += vsprintf.o
+obj-$(CONFIG_RANDOM_MACADDR) += rand.o
+obj-$(CONFIG_BOOTP_RANDOM_DELAY) += rand.o
+obj-$(CONFIG_CMD_LINK_LOCAL) += rand.o
# SEE README.arm-unaligned-accesses
$(obj)bzlib.o: CFLAGS += $(PLATFORM_NO_UNALIGNED)
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
diff --git a/lib/libfdt/Makefile b/lib/libfdt/Makefile
index 07373df99ae..a02c9b02add 100644
--- a/lib/libfdt/Makefile
+++ b/lib/libfdt/Makefile
@@ -5,30 +5,7 @@
# 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-$(CONFIG_OF_LIBFDT) += $(COBJS-libfdt)
-COBJS-$(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
-
-#########################################################################
+obj-$(CONFIG_OF_LIBFDT) += $(COBJS-libfdt)
+obj-$(CONFIG_FIT) += $(COBJS-libfdt)
diff --git a/lib/lzma/Makefile b/lib/lzma/Makefile
index 412e187c57e..25c6797fb60 100644
--- a/lib/lzma/Makefile
+++ b/lib/lzma/Makefile
@@ -8,28 +8,6 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)liblzma.o
-
-SOBJS =
-
CFLAGS += -D_LZMA_PROB32
-COBJS-$(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
-
-#########################################################################
+obj-$(CONFIG_LZMA) += LzmaDec.o LzmaTools.o
diff --git a/lib/lzo/Makefile b/lib/lzo/Makefile
index 516519a1f8f..dd853eae231 100644
--- a/lib/lzo/Makefile
+++ b/lib/lzo/Makefile
@@ -5,26 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-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
-
-#########################################################################
+obj-$(CONFIG_LZO) += lzo1x_decompress.o
diff --git a/lib/rsa/Makefile b/lib/rsa/Makefile
index decd6e509df..693c745514a 100644
--- a/lib/rsa/Makefile
+++ b/lib/rsa/Makefile
@@ -7,26 +7,6 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB = $(obj)librsa.o
-
ifdef CONFIG_FIT_SIGNATURE
-COBJS-$(CONFIG_RSA) += rsa-verify.o
+obj-$(CONFIG_RSA) += rsa-verify.o
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
-
-#########################################################################
diff --git a/lib/tizen/Makefile b/lib/tizen/Makefile
index 80d76cfef21..e1a9cf45471 100644
--- a/lib/tizen/Makefile
+++ b/lib/tizen/Makefile
@@ -5,26 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-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
-
-#########################################################################
+obj-$(CONFIG_TIZEN) += tizen.o
diff --git a/lib/zlib/Makefile b/lib/zlib/Makefile
index b69e2348f2a..1e9e04d9915 100644
--- a/lib/zlib/Makefile
+++ b/lib/zlib/Makefile
@@ -5,24 +5,4 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-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
-
-#########################################################################
+obj-$(CONFIG_ZLIB) += zlib.o