Xiangfu Liu | 80421fc | 2011-10-12 12:24:06 +0800 | [diff] [blame] | 1 | # |
| 2 | # Copyright (C) 2011 Xiangfu Liu <xiangfu@openmobilefree.net> |
| 3 | # |
Wolfgang Denk | 1a45966 | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 4 | # SPDX-License-Identifier: GPL-2.0+ |
Xiangfu Liu | 80421fc | 2011-10-12 12:24:06 +0800 | [diff] [blame] | 5 | # |
| 6 | |
| 7 | include $(TOPDIR)/config.mk |
| 8 | |
| 9 | LIB = $(obj)lib$(CPU).o |
| 10 | |
| 11 | START = start.o |
| 12 | SOBJS-y = |
| 13 | COBJS-y = cpu.o timer.o jz_serial.o |
| 14 | |
| 15 | COBJS-$(CONFIG_JZ4740) += jz4740.o |
| 16 | |
| 17 | SRCS := $(START:.o=.S) $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c) |
| 18 | OBJS := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y)) |
| 19 | START := $(addprefix $(obj),$(START)) |
| 20 | |
| 21 | all: $(obj).depend $(START) $(LIB) |
| 22 | |
| 23 | $(LIB): $(OBJS) |
| 24 | $(call cmd_link_o_target, $(OBJS)) |
| 25 | |
| 26 | ######################################################################### |
| 27 | |
| 28 | # defines $(obj).depend target |
| 29 | include $(SRCTREE)/rules.mk |
| 30 | |
| 31 | sinclude $(obj).depend |
| 32 | |
| 33 | ######################################################################### |