Nobuhiro Iwamatsu | 4fb44e2 | 2012-06-13 16:29:47 +0900 | [diff] [blame] | 1 | # |
| 2 | # (C) Copyright 2000-2006 |
| 3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
| 4 | # |
Wolfgang Denk | 1a45966 | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 5 | # SPDX-License-Identifier: GPL-2.0+ |
Nobuhiro Iwamatsu | 4fb44e2 | 2012-06-13 16:29:47 +0900 | [diff] [blame] | 6 | # |
| 7 | |
| 8 | include $(TOPDIR)/config.mk |
| 9 | |
| 10 | LIB = $(obj)lib$(SOC).o |
| 11 | |
Nobuhiro Iwamatsu | 1cdf248 | 2012-08-19 04:40:05 +0000 | [diff] [blame] | 12 | SOBJS = lowlevel_init.o |
| 13 | COBJS-y += cpu_info.o |
Nobuhiro Iwamatsu | 2d61084 | 2012-08-06 07:26:09 +0900 | [diff] [blame] | 14 | COBJS-y += emac.o |
Nobuhiro Iwamatsu | 4fb44e2 | 2012-06-13 16:29:47 +0900 | [diff] [blame] | 15 | |
Nobuhiro Iwamatsu | 1cdf248 | 2012-08-19 04:40:05 +0000 | [diff] [blame] | 16 | COBJS-$(CONFIG_DISPLAY_BOARDINFO) += board.o |
Nobuhiro Iwamatsu | 2c541df | 2012-08-03 14:21:05 +0900 | [diff] [blame] | 17 | COBJS-$(CONFIG_GLOBAL_TIMER) += timer.o |
Nobuhiro Iwamatsu | cfa291b | 2012-07-20 13:06:54 +0900 | [diff] [blame] | 18 | COBJS-$(CONFIG_R8A7740) += cpu_info-r8a7740.o |
| 19 | COBJS-$(CONFIG_R8A7740) += pfc-r8a7740.o |
Nobuhiro Iwamatsu | 1cdf248 | 2012-08-19 04:40:05 +0000 | [diff] [blame] | 20 | COBJS-$(CONFIG_SH73A0) += cpu_info-sh73a0.o |
Nobuhiro Iwamatsu | b045a23 | 2012-07-20 09:29:19 +0900 | [diff] [blame] | 21 | COBJS-$(CONFIG_SH73A0) += pfc-sh73a0.o |
Nobuhiro Iwamatsu | 35729c6 | 2012-10-02 16:40:39 +0000 | [diff] [blame] | 22 | COBJS_LN-$(CONFIG_TMU_TIMER) += sh_timer.o |
Nobuhiro Iwamatsu | 1cdf248 | 2012-08-19 04:40:05 +0000 | [diff] [blame] | 23 | |
| 24 | COBJS := $(COBJS-y) |
| 25 | SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) |
Nobuhiro Iwamatsu | 35729c6 | 2012-10-02 16:40:39 +0000 | [diff] [blame] | 26 | SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) $(addprefix $(obj),$(COBJS_LN-y:.o=.c)) |
| 27 | OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS) $(COBJS_LN-y)) |
Nobuhiro Iwamatsu | 1cdf248 | 2012-08-19 04:40:05 +0000 | [diff] [blame] | 28 | SOBJS := $(addprefix $(obj),$(SOBJS)) |
Nobuhiro Iwamatsu | 4fb44e2 | 2012-06-13 16:29:47 +0900 | [diff] [blame] | 29 | START := $(addprefix $(obj),$(START)) |
| 30 | |
| 31 | all: $(obj).depend $(LIB) |
| 32 | |
| 33 | $(LIB): $(OBJS) |
| 34 | $(call cmd_link_o_target, $(OBJS)) |
| 35 | |
Nobuhiro Iwamatsu | 35729c6 | 2012-10-02 16:40:39 +0000 | [diff] [blame] | 36 | # from arch/sh/lib/ directory |
| 37 | $(obj)sh_timer.c: |
| 38 | @rm -f $(obj)sh_timer.c |
| 39 | ln -s $(SRCTREE)/arch/sh/lib/time.c $(obj)sh_timer.c |
| 40 | |
Nobuhiro Iwamatsu | 4fb44e2 | 2012-06-13 16:29:47 +0900 | [diff] [blame] | 41 | ######################################################################### |
| 42 | |
| 43 | # defines $(obj).depend target |
| 44 | include $(SRCTREE)/rules.mk |
| 45 | |
| 46 | sinclude $(obj).depend |
| 47 | |
| 48 | ######################################################################### |
| 49 | |