Niklaus Giger | ac982ea | 2007-07-27 11:28:44 +0200 | [diff] [blame] | 1 | # |
Niklaus Giger | b7f6193 | 2008-02-05 10:26:42 +0100 | [diff] [blame] | 2 | # (C) Copyright 2007-2008 Netstal Maschinen AG |
Niklaus Giger | ac982ea | 2007-07-27 11:28:44 +0200 | [diff] [blame] | 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 | |
| 21 | include $(TOPDIR)/config.mk |
Wolfgang Denk | 1339657 | 2010-10-24 16:49:12 +0200 | [diff] [blame] | 22 | ifneq ($(OBJTREE),$(SRCTREE)) |
| 23 | $(shell mkdir -p $(obj)../common) |
| 24 | endif |
Niklaus Giger | ac982ea | 2007-07-27 11:28:44 +0200 | [diff] [blame] | 25 | |
Sebastien Carlier | 6d8962e | 2010-11-05 15:48:07 +0100 | [diff] [blame^] | 26 | LIB = $(obj)lib$(BOARD).o |
Niklaus Giger | ac982ea | 2007-07-27 11:28:44 +0200 | [diff] [blame] | 27 | |
Wolfgang Denk | 1339657 | 2010-10-24 16:49:12 +0200 | [diff] [blame] | 28 | COBJS = $(BOARD).o \ |
| 29 | sdram.o \ |
| 30 | ../common/nm_bsp.o |
Niklaus Giger | ac982ea | 2007-07-27 11:28:44 +0200 | [diff] [blame] | 31 | SOBJS = init.o |
| 32 | |
Wolfgang Denk | 1339657 | 2010-10-24 16:49:12 +0200 | [diff] [blame] | 33 | SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) |
Niklaus Giger | ac982ea | 2007-07-27 11:28:44 +0200 | [diff] [blame] | 34 | OBJS := $(addprefix $(obj),$(COBJS)) |
| 35 | SOBJS := $(addprefix $(obj),$(SOBJS)) |
| 36 | |
Wolfgang Denk | 1339657 | 2010-10-24 16:49:12 +0200 | [diff] [blame] | 37 | $(LIB): $(OBJS) $(SOBJS) |
Sebastien Carlier | 6d8962e | 2010-11-05 15:48:07 +0100 | [diff] [blame^] | 38 | $(call cmd_link_o_target, $^) |
Niklaus Giger | ac982ea | 2007-07-27 11:28:44 +0200 | [diff] [blame] | 39 | |
| 40 | clean: |
| 41 | rm -f $(SOBJS) $(OBJS) |
| 42 | |
| 43 | distclean: clean |
Wolfgang Denk | c8a3b10 | 2008-07-02 23:49:18 +0200 | [diff] [blame] | 44 | rm -f $(LIB) core *.bak $(obj).depend |
Niklaus Giger | ac982ea | 2007-07-27 11:28:44 +0200 | [diff] [blame] | 45 | |
| 46 | ######################################################################### |
| 47 | |
| 48 | # defines $(obj).depend target |
| 49 | include $(SRCTREE)/rules.mk |
| 50 | |
| 51 | sinclude $(obj).depend |
| 52 | |
| 53 | ######################################################################### |