]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - arch/arm/lib/Makefile
merged tx6dl-devel into denx master branch
[karo-tx-uboot.git] / arch / arm / lib / 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     = $(obj)lib$(ARCH).o
11 LIBGCC  = $(obj)libgcc.o
12
13 GLSOBJS += _ashldi3.o
14 GLSOBJS += _ashrdi3.o
15 GLSOBJS += _divsi3.o
16 GLSOBJS += _lshrdi3.o
17 GLSOBJS += _modsi3.o
18 GLSOBJS += _udivsi3.o
19 GLSOBJS += _umodsi3.o
20
21 GLCOBJS += div0.o
22
23 ifndef CONFIG_SPL_BUILD
24 SOBJS-y += relocate.o
25 ifndef CONFIG_SYS_GENERIC_BOARD
26 COBJS-y += board.o
27 endif
28 COBJS-y += sections.o
29
30 COBJS-$(CONFIG_OF_LIBFDT) += bootm-fdt.o
31 COBJS-$(CONFIG_CMD_BOOTM) += bootm.o
32 COBJS-$(CONFIG_SYS_L2_PL310) += cache-pl310.o
33 SOBJS-y += crt0.o
34 SOBJS-$(CONFIG_USE_ARCH_MEMSET) += memset.o
35 SOBJS-$(CONFIG_USE_ARCH_MEMCPY) += memcpy.o
36 else
37 COBJS-$(CONFIG_SPL_FRAMEWORK) += spl.o
38 ifndef CONFIG_SPL_NO_CPU_SUPPORT_CODE
39 SOBJS-y += crt0.o
40 endif
41 endif
42
43 COBJS-y += interrupts.o
44 COBJS-y += reset.o
45
46 COBJS-y += cache.o
47 COBJS-y += cache-cp15.o
48
49 SRCS    := $(GLSOBJS:.o=.S) $(GLCOBJS:.o=.c) \
50            $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
51 OBJS    := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y))
52 LGOBJS  := $(addprefix $(obj),$(GLSOBJS)) \
53            $(addprefix $(obj),$(GLCOBJS))
54
55 # Always build libarm.o
56 TARGETS := $(LIB)
57
58 # Build private libgcc only when asked for
59 ifdef USE_PRIVATE_LIBGCC
60 TARGETS += $(LIBGCC)
61 endif
62
63 # For EABI conformant tool chains, provide eabi_compat()
64 ifneq (,$(findstring -mabi=aapcs-linux,$(PLATFORM_CPPFLAGS)))
65 TARGETS += $(obj)eabi_compat.o
66 endif
67
68 all:    $(TARGETS)
69
70 $(LIB): $(obj).depend $(OBJS)
71         $(call cmd_link_o_target, $(OBJS))
72
73 $(LIBGCC): $(obj).depend $(LGOBJS)
74         $(call cmd_link_o_target, $(LGOBJS))
75
76 #########################################################################
77
78 # defines $(obj).depend target
79 include $(SRCTREE)/rules.mk
80
81 sinclude $(obj).depend
82
83 #########################################################################