blob: 9f248a441d7074bf5a25ecb3aa98ba3f4f2ae5f5 [file] [log] [blame]
Niklaus Giger13f9f1e2007-07-27 11:28:44 +02001#
2# (C) Copyright 2007 Netstal Maschinen AG
3# Niklaus Giger (ng@netstal.com)
4#
5# This program is free software; you can redistribute it and/or
6# modify it under the terms of the GNU General Public License as
7# published by the Free Software Foundation; either version 2 of
8# the License, or (at your option) any later version.
9#
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13# GNU General Public License for more details.
14#
15# You should have received a copy of the GNU General Public License
16# along with this program; if not, write to the Free Software
17# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
18# MA 02111-1307 USA
19#
20
21include $(TOPDIR)/config.mk
22
23LIB = $(obj)lib$(BOARD).a
24
Niklaus Gigerd6d48db2007-08-15 12:14:23 +020025vpath hcu_flash.c ../common
Niklaus Gigerc623bb02008-01-16 18:39:18 +010026vpath nm_bsp.c ../common
Niklaus Gigerd6d48db2007-08-15 12:14:23 +020027
28# NOBJS : Netstal common objects
Stefan Roese9153cd32008-01-17 14:29:04 +010029NOBJS = ../common/hcu_flash.o ../common/nm_bsp.o
Niklaus Gigerd6d48db2007-08-15 12:14:23 +020030COBJS = $(BOARD).o sdram.o
Niklaus Giger13f9f1e2007-07-27 11:28:44 +020031SOBJS = init.o
32
Stefan Roese9153cd32008-01-17 14:29:04 +010033SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) $(NOBJS:.o=.c)
Niklaus Giger13f9f1e2007-07-27 11:28:44 +020034OBJS := $(addprefix $(obj),$(COBJS))
Niklaus Gigerd6d48db2007-08-15 12:14:23 +020035NOBJS := $(addprefix $(obj),$(NOBJS))
Niklaus Giger13f9f1e2007-07-27 11:28:44 +020036SOBJS := $(addprefix $(obj),$(SOBJS))
37
Niklaus Gigerd6d48db2007-08-15 12:14:23 +020038$(LIB): $(OBJS) $(SOBJS) $(NOBJS)
39 $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS) $(NOBJS)
Niklaus Giger13f9f1e2007-07-27 11:28:44 +020040
41clean:
42 rm -f $(SOBJS) $(OBJS)
43
44distclean: clean
45 rm -f $(LIB) core *.bak .depend
46
47#########################################################################
48
49# defines $(obj).depend target
50include $(SRCTREE)/rules.mk
51
52sinclude $(obj).depend
53
54#########################################################################