Sonic Zhang | 320ec9d | 2012-08-16 12:08:31 +0800 | [diff] [blame] | 1 | # |
| 2 | # U-boot - Makefile |
| 3 | # |
| 4 | # Copyright (c) 2005-2008 Analog Device Inc. |
| 5 | # |
| 6 | # (C) Copyright 2000-2006 |
| 7 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
| 8 | # |
Wolfgang Denk | 1a45966 | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 9 | # SPDX-License-Identifier: GPL-2.0+ |
Sonic Zhang | 320ec9d | 2012-08-16 12:08:31 +0800 | [diff] [blame] | 10 | # |
| 11 | |
| 12 | include $(TOPDIR)/config.mk |
| 13 | |
| 14 | LIB = $(obj)lib$(BOARD).o |
| 15 | |
| 16 | COBJS-y := $(BOARD).o |
| 17 | COBJS-$(CONFIG_BFIN_SOFT_SWITCH) += soft_switch.o |
| 18 | |
| 19 | SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c) |
| 20 | OBJS := $(addprefix $(obj),$(COBJS-y)) |
| 21 | SOBJS := $(addprefix $(obj),$(SOBJS-y)) |
| 22 | |
| 23 | $(LIB): $(obj).depend $(OBJS) $(SOBJS) |
| 24 | $(call cmd_link_o_target, $(OBJS) $(SOBJS)) |
| 25 | |
| 26 | clean: |
| 27 | rm -f $(SOBJS) $(OBJS) |
| 28 | |
| 29 | distclean: clean |
| 30 | rm -f $(LIB) core *.bak $(obj).depend |
| 31 | |
| 32 | ######################################################################### |
| 33 | |
| 34 | # defines $(obj).depend target |
| 35 | include $(SRCTREE)/rules.mk |
| 36 | |
| 37 | sinclude $(obj).depend |
| 38 | |
| 39 | ######################################################################### |