* configure.in: added missing mcs51 in status output
[fw/sdcc] / device / lib / pic16 / libio / Makefile.in
1 ###########################################################
2 ### Makefile for the GNU PIC Library
3 ###
4 ### Copyright (C) 2005 by Raphael Neider <rneider AT 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 AT 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 top_builddir = @top_builddir@
20 top_srcdir   = @top_srcdir@
21 srcdir       = @srcdir@
22 VPATH        = @srcdir@
23
24 SUBDIRS = adc i2c usart
25
26 ifeq ($(origin IO_ARCH),undefined)
27 include $(top_builddir)/Makefile.common
28
29 .PHONY : all clean clean-intermediate install
30
31 # I create $(builddir)/$${arch} right here in order to prevent 
32 # the sub-make's `builddir´ rules from aborting if another sub-make
33 # already created the above directory (happened on Alpha).
34 all clean-intermediate install : libio-recurse
35
36 clean : libio-recurse
37         $(Q)-[ ! -d "$(top_builddir)/$(builddir)" ] || $(RMDIR) "$(top_builddir)/$(builddir)"
38
39 distclean : clean
40  
41 libio-recurse :
42         $(Q)+cat $(top_builddir)/pics.build \
43                 | $(SED) -e "s,[ \t]*#.*$$,," \
44                 | $(GREP) -v "^[ \t]*$$" \
45                 | while read arch; do \
46                         [ "x$${arch}" = "x" ] \
47                         || ( $(MKDIR) "$(top_builddir)/$(builddir)/$${arch}"; \
48                                 $(MAKE) MKLIB=libio18f$${arch}.lib builddir=$(builddir)/$${arch} ARCH=$${arch} IO_ARCH=$${arch} $(MAKECMDGOALS); ) \
49                         || exit 1; \
50         done
51
52 include $(top_srcdir)/Makefile.rules
53
54 else
55
56 include $(top_srcdir)/Makefile.subdir
57
58 # prevent library to be build in $(SUBDIRS) as well
59 unexport MKLIB
60
61 endif