Niklaus Giger | ac982ea | 2007-07-27 11:28:44 +0200 | [diff] [blame] | 1 | # |
| 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 | |
| 21 | include $(TOPDIR)/config.mk |
| 22 | |
| 23 | LIB = $(obj)lib$(BOARD).a |
| 24 | |
Niklaus Giger | 055606b | 2008-01-16 18:39:20 +0100 | [diff] [blame] | 25 | vpath fixed_sdram.c ../common |
Niklaus Giger | 0e19209 | 2007-08-15 12:14:23 +0200 | [diff] [blame] | 26 | vpath hcu_flash.c ../common |
Niklaus Giger | 055606b | 2008-01-16 18:39:20 +0100 | [diff] [blame] | 27 | vpath nm_bsp.c ../common |
Niklaus Giger | 0e19209 | 2007-08-15 12:14:23 +0200 | [diff] [blame] | 28 | |
| 29 | # NOBJS : Netstal common objects |
Stefan Roese | ba52be3 | 2008-01-17 14:29:04 +0100 | [diff] [blame] | 30 | NOBJS = ../common/fixed_sdram.o ../common/hcu_flash.o ../common/nm_bsp.o |
Niklaus Giger | 0e19209 | 2007-08-15 12:14:23 +0200 | [diff] [blame] | 31 | COBJS = $(BOARD).o |
Niklaus Giger | ac982ea | 2007-07-27 11:28:44 +0200 | [diff] [blame] | 32 | SOBJS = |
| 33 | |
Stefan Roese | ba52be3 | 2008-01-17 14:29:04 +0100 | [diff] [blame] | 34 | SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) $(NOBJS:.o=.c) |
Niklaus Giger | ac982ea | 2007-07-27 11:28:44 +0200 | [diff] [blame] | 35 | OBJS := $(addprefix $(obj),$(COBJS)) |
Niklaus Giger | 0e19209 | 2007-08-15 12:14:23 +0200 | [diff] [blame] | 36 | NOBJS := $(addprefix $(obj),$(NOBJS)) |
Niklaus Giger | ac982ea | 2007-07-27 11:28:44 +0200 | [diff] [blame] | 37 | SOBJS := $(addprefix $(obj),$(SOBJS)) |
| 38 | |
Niklaus Giger | 0e19209 | 2007-08-15 12:14:23 +0200 | [diff] [blame] | 39 | $(LIB): $(OBJS) $(SOBJS) $(NOBJS) |
| 40 | $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS) $(NOBJS) |
Niklaus Giger | ac982ea | 2007-07-27 11:28:44 +0200 | [diff] [blame] | 41 | |
| 42 | clean: |
| 43 | rm -f $(SOBJS) $(OBJS) |
| 44 | |
| 45 | distclean: clean |
| 46 | rm -f $(LIB) core *.bak .depend |
| 47 | |
| 48 | ######################################################################### |
| 49 | |
| 50 | # defines $(obj).depend target |
| 51 | include $(SRCTREE)/rules.mk |
| 52 | |
| 53 | sinclude $(obj).depend |
| 54 | |
| 55 | ######################################################################### |