* src/*.c, src/pic16/{gen.c,glue.c,main.c}: applied Vangelis
[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 all clean clean-intermediate install : builddir
27         $(Q)cat $(topsrcdir)/pics.build \
28                 | $(SED) -e "s,[ \t]*#.*$$,," \
29                 | $(GREP) -v "^[ \t]*$$" \
30                 | while read arch; do \
31                         [ "x$${arch}" = "x" ] \
32                         || MKLIB=libio18f$${arch}.lib $(MAKE) builddir=$(builddir)/$${arch} ARCH=$${arch} IO_ARCH=$${arch} $(MAKECMDGOALS) \
33                         || exit 1; \
34         done
35
36 include $(topsrcdir)/Makefile.rules
37
38 else
39
40 include $(topsrcdir)/Makefile.subdir
41
42 # prevent library to be build in $(SUBDIRS) as well
43 unexport MKLIB
44
45 endif