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