]> git.karo-electronics.de Git - karo-tx-uboot.git/blob - post/Makefile
karo: tx51: init pad settings for SDRAM and NAND
[karo-tx-uboot.git] / post / Makefile
1 #
2 # (C) Copyright 2002-2006
3 # Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4 #
5 # SPDX-License-Identifier:      GPL-2.0+
6 #
7
8 include $(TOPDIR)/config.mk
9
10 LIB                             = libpost.o
11 GPLIB-$(CONFIG_HAS_POST)        += libgenpost.o
12 COBJS-$(CONFIG_HAS_POST)        += post.o
13 COBJS-$(CONFIG_POST_STD_LIST)   += tests.o
14
15 SPLIB-$(CONFIG_HAS_POST) = drivers/libpostdrivers.o
16 SPLIB-$(CONFIG_HAS_POST) += $(shell if [ -d lib_$(ARCH) ]; then echo \
17                             "lib_$(ARCH)/libpost$(ARCH).o"; fi)
18 SPLIB-$(CONFIG_HAS_POST) += $(shell if [ -d lib_$(ARCH)/fpu ]; then echo \
19                             "lib_$(ARCH)/fpu/libpost$(ARCH)fpu.o"; fi)
20 SPLIB-$(CONFIG_HAS_POST) += $(shell if [ -d cpu/$(CPU) ]; then echo \
21                             "cpu/$(CPU)/libpost$(CPU).o"; fi)
22 SPLIB-$(CONFIG_HAS_POST) += $(shell if [ -d board/$(BOARD) ]; then echo \
23                             "board/$(BOARD)/libpost$(BOARD).o"; fi)
24
25 GPLIB   := $(addprefix $(obj),$(GPLIB-y))
26 SPLIB   := $(addprefix $(obj),$(SPLIB-y))
27 COBJS   := $(COBJS-y)
28 SRCS    := $(SOBJS:.o=.S) $(COBJS:.o=.c)
29 OBJS    := $(addprefix $(obj),$(COBJS))
30 LIB     := $(obj)$(LIB)
31
32 all:    $(LIB)
33
34 postdeps:
35         @for lib in $(SPLIB-y) ; do \
36                 $(MAKE) -C `dirname $$lib` all ; \
37         done
38
39 # generic POST library
40 $(GPLIB): $(obj).depend $(OBJS)
41         $(call cmd_link_o_target, $(OBJS))
42
43 # specific POST libraries
44 $(SPLIB): $(obj).depend postdeps
45         $(MAKE) -C $(dir $(subst $(obj),,$@))
46
47 # the POST lib archive
48 $(LIB): $(GPLIB) $(SPLIB)
49         $(call cmd_link_o_target, $^)
50
51 #########################################################################
52
53 # defines $(obj).depend target
54 include $(SRCTREE)/rules.mk
55
56 sinclude $(obj).depend
57
58 #########################################################################