Simon Guinot | 5628fb7 | 2011-11-21 19:25:46 +0530 | [diff] [blame] | 1 | # |
| 2 | # Copyright (C) 2011 Simon Guinot <sguinot@lacie.com> |
| 3 | # |
| 4 | # Based on Kirkwood support: |
| 5 | # (C) Copyright 2009 |
| 6 | # Marvell Semiconductor <www.marvell.com> |
| 7 | # Written-by: Prafulla Wadaskar <prafulla@marvell.com> |
| 8 | # |
Wolfgang Denk | 1a45966 | 2013-07-08 09:37:19 +0200 | [diff] [blame^] | 9 | # SPDX-License-Identifier: GPL-2.0+ |
Simon Guinot | 5628fb7 | 2011-11-21 19:25:46 +0530 | [diff] [blame] | 10 | # |
| 11 | |
| 12 | include $(TOPDIR)/config.mk |
Simon Guinot | 77ea071 | 2011-11-21 19:25:47 +0530 | [diff] [blame] | 13 | ifneq ($(OBJTREE),$(SRCTREE)) |
| 14 | $(shell mkdir -p $(obj)../common) |
| 15 | endif |
Simon Guinot | 5628fb7 | 2011-11-21 19:25:46 +0530 | [diff] [blame] | 16 | |
| 17 | LIB = $(obj)lib$(BOARD).o |
| 18 | |
Simon Guinot | 77ea071 | 2011-11-21 19:25:47 +0530 | [diff] [blame] | 19 | COBJS := $(BOARD).o ../common/common.o |
Simon Guinot | 7737c99 | 2013-06-18 15:14:50 +0200 | [diff] [blame] | 20 | ifneq ($(and $(CONFIG_KIRKWOOD_GPIO),$(CONFIG_NET2BIG_V2)),) |
| 21 | COBJS += ../common/cpld-gpio-bus.o |
| 22 | endif |
Simon Guinot | 5628fb7 | 2011-11-21 19:25:46 +0530 | [diff] [blame] | 23 | |
| 24 | SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) |
| 25 | OBJS := $(addprefix $(obj),$(COBJS)) |
| 26 | SOBJS := $(addprefix $(obj),$(SOBJS)) |
| 27 | |
| 28 | $(LIB): $(obj).depend $(OBJS) $(SOBJS) |
| 29 | $(call cmd_link_o_target, $(OBJS) $(SOBJS)) |
| 30 | |
| 31 | clean: |
| 32 | rm -f $(SOBJS) $(OBJS) |
| 33 | |
| 34 | distclean: clean |
| 35 | rm -f $(LIB) core *.bak .depend |
| 36 | |
| 37 | ######################################################################### |
| 38 | |
| 39 | # defines $(obj).depend target |
| 40 | include $(SRCTREE)/rules.mk |
| 41 | |
| 42 | sinclude $(obj).depend |
| 43 | |
| 44 | ######################################################################### |