]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
post: convert makefiles to Kbuild style
authorMasahiro Yamada <yamada.m@jp.panasonic.com>
Mon, 21 Oct 2013 02:53:39 +0000 (11:53 +0900)
committerTom Rini <trini@ti.com>
Fri, 1 Nov 2013 15:42:12 +0000 (11:42 -0400)
This commit also deletes post/rules.mk,
which in not necessary any more.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
12 files changed:
post/Makefile
post/board/lwmon/Makefile
post/board/lwmon5/Makefile
post/board/netta/Makefile
post/board/pdm360ng/Makefile
post/cpu/mpc83xx/Makefile
post/cpu/mpc8xx/Makefile
post/cpu/ppc4xx/Makefile
post/drivers/Makefile
post/lib_powerpc/Makefile
post/lib_powerpc/fpu/Makefile
post/rules.mk [deleted file]

index 0ecae5bd6427a9c5ee6e24bbe7c04cbb2b77706c..143924482ff0c9da69ad6539aa72870b8136e163 100644 (file)
@@ -5,55 +5,16 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-include $(TOPDIR)/config.mk
-include $(OBJTREE)/include/autoconf.mk
-
-LIB                            = libpost.o
-GPLIB-$(CONFIG_HAS_POST)       += libgenpost.o
-COBJS-$(CONFIG_HAS_POST)       += post.o
-COBJS-$(CONFIG_POST_STD_LIST)  += tests.o
-
-SPLIB-$(CONFIG_HAS_POST) = drivers/libpostdrivers.o
-SPLIB-$(CONFIG_HAS_POST) += $(shell if [ -d lib_$(ARCH) ]; then echo \
-                           "lib_$(ARCH)/libpost$(ARCH).o"; fi)
-SPLIB-$(CONFIG_HAS_POST) += $(shell if [ -d lib_$(ARCH)/fpu ]; then echo \
-                           "lib_$(ARCH)/fpu/libpost$(ARCH)fpu.o"; fi)
-SPLIB-$(CONFIG_HAS_POST) += $(shell if [ -d cpu/$(CPU) ]; then echo \
-                           "cpu/$(CPU)/libpost$(CPU).o"; fi)
-SPLIB-$(CONFIG_HAS_POST) += $(shell if [ -d board/$(BOARD) ]; then echo \
-                           "board/$(BOARD)/libpost$(BOARD).o"; fi)
-
-GPLIB  := $(addprefix $(obj),$(GPLIB-y))
-SPLIB  := $(addprefix $(obj),$(SPLIB-y))
-COBJS  := $(COBJS-y)
-SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS   := $(addprefix $(obj),$(COBJS))
-LIB    := $(obj)$(LIB)
-
-all:   $(LIB)
-
-postdeps:
-       @for lib in $(SPLIB-y) ; do \
-               $(MAKE) -C `dirname $$lib` all ; \
-       done
-
-# generic POST library
-$(GPLIB): $(obj).depend $(OBJS)
-       $(call cmd_link_o_target, $(OBJS))
-
-# specific POST libraries
-$(SPLIB): $(obj).depend postdeps
-       $(MAKE) -C $(dir $(subst $(obj),,$@))
-
-# the POST lib archive
-$(LIB): $(GPLIB) $(SPLIB)
-       $(call cmd_link_o_target, $^)
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-$(CONFIG_HAS_POST) += post.o
+obj-$(CONFIG_POST_STD_LIST)    += tests.o
+
+obj-$(CONFIG_HAS_POST) += drivers/
+ifeq ($(ARCH),powerpc)
+obj-$(CONFIG_HAS_POST) += lib_powerpc/
+endif
+ifneq ($(filter mpc83xx mpc8xx ppc4xx,$(CPU)),)
+obj-$(CONFIG_HAS_POST) += cpu/$(CPU)/
+endif
+ifneq ($(filter lwmon lwmon5 netta pdm360ng,$(BOARD)),)
+obj-$(CONFIG_HAS_POST) += board/$(BOARD)/
+endif
index d38498bc47ef5fa8abb1a2359289213b09c5e6c1..1ac7aa511dafde94212462b02e61bb16a2b64c1a 100644 (file)
@@ -4,10 +4,7 @@
 #
 # SPDX-License-Identifier:     GPL-2.0+
 #
-include $(OBJTREE)/include/autoconf.mk
 
-LIB    = libpostlwmon.o
+CPPFLAGS += -I$(TOPDIR)
 
-COBJS-$(CONFIG_HAS_POST)       += sysmon.o
-
-include $(TOPDIR)/post/rules.mk
+obj-$(CONFIG_HAS_POST) += sysmon.o
index b410dbb39974221fcf2311986baf6748b16900fd..d8b195289ea8a9310dd6a1e2907f89e5fe0fae88 100644 (file)
@@ -4,10 +4,7 @@
 # Developed for DENX Software Engineering GmbH
 #
 # SPDX-License-Identifier:     GPL-2.0+
-include $(OBJTREE)/include/autoconf.mk
 
-LIB    = libpostlwmon5.o
+CPPFLAGS += -I$(TOPDIR)
 
-COBJS-$(CONFIG_HAS_POST)       += sysmon.o watchdog.o dspic.o fpga.o dsp.o gdc.o
-
-include $(TOPDIR)/post/rules.mk
+obj-$(CONFIG_HAS_POST) += sysmon.o watchdog.o dspic.o fpga.o dsp.o gdc.o
index 2d73f55f25360889d9829d911f08c6b9e2669491..cd27a5ce34a9a9e3300dc0def43898f483598b6f 100644 (file)
@@ -4,10 +4,7 @@
 #
 # SPDX-License-Identifier:     GPL-2.0+
 #
-include $(OBJTREE)/include/autoconf.mk
 
-LIB    = libpostnetta.o
+CPPFLAGS += -I$(TOPDIR)
 
-COBJS-$(CONFIG_HAS_POST)       += codec.o dsp.o
-
-include $(TOPDIR)/post/rules.mk
+obj-$(CONFIG_HAS_POST) += codec.o dsp.o
index cb03e5896dff1dbc754f7fa878ad8469b39f779c..3f748892a76cba2fc2c545d05326bc1d4bcb96bd 100644 (file)
@@ -4,10 +4,7 @@
 #
 # SPDX-License-Identifier:     GPL-2.0+
 #
-include $(OBJTREE)/include/autoconf.mk
 
-LIB    = libpostpdm360ng.o
+CPPFLAGS += -I$(TOPDIR)
 
-COBJS-$(CONFIG_HAS_POST)       += coproc_com.o
-
-include $(TOPDIR)/post/rules.mk
+obj-$(CONFIG_HAS_POST) += coproc_com.o
index 6ac56dc2e8c674de0bd9cf6a379fb5fb421225ff..0643d01a7b13a1fc3238e9c10664941503d315ba 100644 (file)
@@ -4,11 +4,7 @@
 #
 # SPDX-License-Identifier:     GPL-2.0+
 #
-include $(OBJTREE)/include/autoconf.mk
 
-LIB    = libpostmpc83xx.o
+CPPFLAGS += -I$(TOPDIR)
 
-AOBJS-$(CONFIG_HAS_POST)       +=
-COBJS-$(CONFIG_HAS_POST)       += ecc.o
-
-include $(TOPDIR)/post/rules.mk
+obj-$(CONFIG_HAS_POST) += ecc.o
index efde1fb3dcae2d6e4135b861a0f35ea12d0478aa..7a2930a797f0770fbd9bc0566e58b2c0385852c5 100644 (file)
@@ -4,11 +4,8 @@
 #
 # SPDX-License-Identifier:     GPL-2.0+
 #
-include $(OBJTREE)/include/autoconf.mk
 
-LIB    = libpostmpc8xx.o
+CPPFLAGS += -I$(TOPDIR)
 
-AOBJS-$(CONFIG_HAS_POST)       += cache_8xx.o
-COBJS-$(CONFIG_HAS_POST)       += cache.o ether.o spr.o uart.o usb.o watchdog.o
-
-include $(TOPDIR)/post/rules.mk
+obj-$(CONFIG_HAS_POST) += cache_8xx.o
+obj-$(CONFIG_HAS_POST) += cache.o ether.o spr.o uart.o usb.o watchdog.o
index 614cef03fcb224def7fc268310575813ae7eea43..b7435c825296f0b7ddc9e3a3f9901a2a9a01f385 100644 (file)
@@ -4,18 +4,15 @@
 #
 # SPDX-License-Identifier:     GPL-2.0+
 #
-include $(OBJTREE)/include/autoconf.mk
 
-LIB    = libpostppc4xx.o
+CPPFLAGS += -I$(TOPDIR)
 
-AOBJS-$(CONFIG_HAS_POST)       += cache_4xx.o
-COBJS-$(CONFIG_HAS_POST)       += cache.o
-COBJS-$(CONFIG_HAS_POST)       += denali_ecc.o
-COBJS-$(CONFIG_HAS_POST)       += ether.o
-COBJS-$(CONFIG_HAS_POST)       += fpu.o
-COBJS-$(CONFIG_HAS_POST)       += ocm.o
-COBJS-$(CONFIG_HAS_POST)       += spr.o
-COBJS-$(CONFIG_HAS_POST)       += uart.o
-COBJS-$(CONFIG_HAS_POST)       += watchdog.o
-
-include $(TOPDIR)/post/rules.mk
+obj-$(CONFIG_HAS_POST) += cache_4xx.o
+obj-$(CONFIG_HAS_POST) += cache.o
+obj-$(CONFIG_HAS_POST) += denali_ecc.o
+obj-$(CONFIG_HAS_POST) += ether.o
+obj-$(CONFIG_HAS_POST) += fpu.o
+obj-$(CONFIG_HAS_POST) += ocm.o
+obj-$(CONFIG_HAS_POST) += spr.o
+obj-$(CONFIG_HAS_POST) += uart.o
+obj-$(CONFIG_HAS_POST) += watchdog.o
index 6720f85139572508bbcba45efd10a8591c5c1cee..2f6844cca4eb71d69230b7814327dbed2061c96f 100644 (file)
@@ -4,10 +4,7 @@
 #
 # SPDX-License-Identifier:     GPL-2.0+
 #
-include $(TOPDIR)/config.mk
 
-LIB    = libpostdrivers.o
+CPPFLAGS += -I$(TOPDIR)
 
-COBJS-$(CONFIG_HAS_POST)       += flash.o i2c.o memory.o rtc.o
-
-include $(TOPDIR)/post/rules.mk
+obj-$(CONFIG_HAS_POST) += flash.o i2c.o memory.o rtc.o
index efa1fb226102ebac96e1d0f9e7ca76a41f5930f9..f19fea3e5f65a7ee6810873dfc44cb72698789b8 100644 (file)
@@ -4,13 +4,12 @@
 #
 # SPDX-License-Identifier:     GPL-2.0+
 #
-include $(TOPDIR)/config.mk
 
-LIB    = libpost$(ARCH).o
+CPPFLAGS += -I$(TOPDIR)
 
-AOBJS-$(CONFIG_HAS_POST)       += asm.o
-COBJS-$(CONFIG_HAS_POST)       += cpu.o cmp.o cmpi.o two.o twox.o three.o threex.o
-COBJS-$(CONFIG_HAS_POST)   += threei.o andi.o srawi.o rlwnm.o rlwinm.o rlwimi.o
-COBJS-$(CONFIG_HAS_POST)       += store.o load.o cr.o b.o multi.o string.o complex.o
+obj-$(CONFIG_HAS_POST) += asm.o
+obj-$(CONFIG_HAS_POST) += cpu.o cmp.o cmpi.o two.o twox.o three.o threex.o
+obj-$(CONFIG_HAS_POST) += threei.o andi.o srawi.o rlwnm.o rlwinm.o rlwimi.o
+obj-$(CONFIG_HAS_POST) += store.o load.o cr.o b.o multi.o string.o complex.o
 
-include $(TOPDIR)/post/rules.mk
+obj-$(CONFIG_HAS_POST) += fpu/
index eff7e6b4020b8df81c0db7953eb496fa133f5372..6aec96c023a8fc4d465387759191b4ca42920e63 100644 (file)
@@ -4,22 +4,18 @@
 #
 # SPDX-License-Identifier:     GPL-2.0+
 #
-include $(TOPDIR)/config.mk
 
-LIB    = libpost$(ARCH)fpu.o
+CPPFLAGS += -I$(TOPDIR)
 
-COBJS-$(CONFIG_HAS_POST)       += 20001122-1.o
-COBJS-$(CONFIG_HAS_POST)       += 20010114-2.o
-COBJS-$(CONFIG_HAS_POST)       += 20010226-1.o
-COBJS-$(CONFIG_HAS_POST)       += 980619-1.o
-COBJS-$(CONFIG_HAS_POST)       += acc1.o
-COBJS-$(CONFIG_HAS_POST)       += compare-fp-1.o
-COBJS-$(CONFIG_HAS_POST)       += fpu.o
-COBJS-$(CONFIG_HAS_POST)       += mul-subnormal-single-1.o
-
-COBJS-$(CONFIG_HAS_POST)       += darwin-ldouble.o
-
-include $(TOPDIR)/post/rules.mk
+obj-$(CONFIG_HAS_POST) += 20001122-1.o
+obj-$(CONFIG_HAS_POST) += 20010114-2.o
+obj-$(CONFIG_HAS_POST) += 20010226-1.o
+obj-$(CONFIG_HAS_POST) += 980619-1.o
+obj-$(CONFIG_HAS_POST) += acc1.o
+obj-$(CONFIG_HAS_POST) += compare-fp-1.o
+obj-$(CONFIG_HAS_POST) += fpu.o
+obj-$(CONFIG_HAS_POST) += mul-subnormal-single-1.o
+obj-$(CONFIG_HAS_POST) += darwin-ldouble.o
 
 CFLAGS := $(shell echo $(CFLAGS) | sed s/-msoft-float//)
 CFLAGS += -mhard-float -fkeep-inline-functions
diff --git a/post/rules.mk b/post/rules.mk
deleted file mode 100644 (file)
index b25ebbf..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# (C) Copyright 2002-2006
-# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
-#
-# SPDX-License-Identifier:     GPL-2.0+
-#
-
-include $(TOPDIR)/config.mk
-
-COBJS  := $(COBJS-y)
-AOBJS  := $(AOBJS-y)
-SRCS   := $(AOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS   := $(addprefix $(obj),$(AOBJS) $(COBJS))
-LIB    := $(obj)$(LIB)
-
-CPPFLAGS += -I$(TOPDIR)
-
-all:   $(LIB)
-
-$(LIB):        $(obj).depend $(OBJS)
-       $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################