* src/pic/device.c (pic14_assignConfigWordValue): remember assignments to
[fw/sdcc] / device / lib / pic16 / libio / Makefile
1 ###########################################################
2 ### Makefile for the GNU PIC Library
3 ###
4 ### Copyright (C) 2005 by Raphael Neider <rneider@web.de>
5 ###
6 ### The GNU PIC Library was originally designed and
7 ### implemented by
8 ###     Vangelis Rokas <vrokas@otenet.gr>
9 ###
10 ### It is currently maintained by
11 ###     Raphael Neider <rneider@web.de>
12 ###
13 ### This file may be distributed under the terms of the the
14 ### GNU General Public License (GPL). See COPYING for details.
15 ###
16 ### $Id$
17 ###
18
19 topsrcdir=..
20
21 SUBDIRS = adc i2c usart
22
23 ifeq ($(origin IO_ARCH),undefined)
24 include $(topsrcdir)/Makefile.common
25
26 .PHONY : all clean clean-intermediate install
27
28 # I create $(builddir)/$${arch} right here in order to prevent 
29 # the sub-make's `builddir´ rules from aborting if another sub-make
30 # already created the above directory (happened on Alpha).
31 all clean clean-intermediate install :
32         $(Q)+cat $(topsrcdir)/pics.build \
33                 | $(SED) -e "s,[ \t]*#.*$$,," \
34                 | $(GREP) -v "^[ \t]*$$" \
35                 | while read arch; do \
36                         [ "x$${arch}" = "x" ] \
37                         || ( [ -d "$(builddir)/$${arch}" ] || $(MKDIR) "$(builddir)/$${arch}"; \
38                                 $(MAKE) MKLIB=libio18f$${arch}.lib builddir=$(builddir)/$${arch} ARCH=$${arch} IO_ARCH=$${arch} $(MAKECMDGOALS); ) \
39                         || exit 1; \
40         done
41
42 include $(topsrcdir)/Makefile.rules
43
44 else
45
46 include $(topsrcdir)/Makefile.subdir
47
48 # prevent library to be build in $(SUBDIRS) as well
49 unexport MKLIB
50
51 endif