Heiko Schocher | 499c498 | 2013-08-19 16:39:01 +0200 | [diff] [blame^] | 1 | # |
| 2 | # Makefile |
| 3 | # |
| 4 | # (C) Copyright 2013 Siemens Schweiz AG |
| 5 | # (C) Heiko Schocher, DENX Software Engineering, hs@denx.de. |
| 6 | # |
| 7 | # Based on: |
| 8 | # u-boot:/board/ti/am335x/Makefile |
| 9 | # Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/ |
| 10 | # |
| 11 | # SPDX-License-Identifier: GPL-2.0+ |
| 12 | # |
| 13 | |
| 14 | include $(TOPDIR)/config.mk |
| 15 | ifneq ($(OBJTREE),$(SRCTREE)) |
| 16 | $(shell mkdir -p $(obj)../common) |
| 17 | endif |
| 18 | |
| 19 | LIB = $(obj)lib$(BOARD).o |
| 20 | |
| 21 | ifdef CONFIG_SPL_BUILD |
| 22 | COBJS := mux.o |
| 23 | endif |
| 24 | |
| 25 | COBJS += board.o |
| 26 | ifndef CONFIG_SPL_BUILD |
| 27 | COBJS += ../common/factoryset.o |
| 28 | endif |
| 29 | SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) |
| 30 | OBJS := $(addprefix $(obj),$(COBJS)) |
| 31 | SOBJS := $(addprefix $(obj),$(SOBJS)) |
| 32 | |
| 33 | $(LIB): $(obj).depend $(OBJS) $(SOBJS) |
| 34 | $(call cmd_link_o_target, $(OBJS) $(SOBJS)) |
| 35 | |
| 36 | clean: |
| 37 | rm -f $(SOBJS) $(OBJS) |
| 38 | |
| 39 | distclean: clean |
| 40 | rm -f $(LIB) core *.bak $(obj).depend |
| 41 | |
| 42 | ######################################################################### |
| 43 | |
| 44 | # defines $(obj).depend target |
| 45 | include $(SRCTREE)/rules.mk |
| 46 | |
| 47 | sinclude $(obj).depend |
| 48 | |
| 49 | ######################################################################### |