blob: ad402318ff1a5d05332bf4992d66885294255f0e [file] [log] [blame]
Simon Guinot5628fb72011-11-21 19:25:46 +05301#
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 Denk1a459662013-07-08 09:37:19 +02009# SPDX-License-Identifier: GPL-2.0+
Simon Guinot5628fb72011-11-21 19:25:46 +053010#
11
12include $(TOPDIR)/config.mk
Simon Guinot77ea0712011-11-21 19:25:47 +053013ifneq ($(OBJTREE),$(SRCTREE))
14$(shell mkdir -p $(obj)../common)
15endif
Simon Guinot5628fb72011-11-21 19:25:46 +053016
17LIB = $(obj)lib$(BOARD).o
18
Simon Guinot77ea0712011-11-21 19:25:47 +053019COBJS := $(BOARD).o ../common/common.o
Simon Guinot7737c992013-06-18 15:14:50 +020020ifneq ($(and $(CONFIG_KIRKWOOD_GPIO),$(CONFIG_NET2BIG_V2)),)
21COBJS += ../common/cpld-gpio-bus.o
22endif
Simon Guinot5628fb72011-11-21 19:25:46 +053023
24SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
25OBJS := $(addprefix $(obj),$(COBJS))
26SOBJS := $(addprefix $(obj),$(SOBJS))
27
28$(LIB): $(obj).depend $(OBJS) $(SOBJS)
29 $(call cmd_link_o_target, $(OBJS) $(SOBJS))
30
31clean:
32 rm -f $(SOBJS) $(OBJS)
33
34distclean: clean
35 rm -f $(LIB) core *.bak .depend
36
37#########################################################################
38
39# defines $(obj).depend target
40include $(SRCTREE)/rules.mk
41
42sinclude $(obj).depend
43
44#########################################################################