Enabled VPATH feature: changed nearly all Makefiles (149 files).
[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@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 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 clean-intermediate install :
35         $(Q)+cat $(top_builddir)pics.build \
36                 | $(SED) -e "s,[ \t]*#.*$$,," \
37                 | $(GREP) -v "^[ \t]*$$" \
38                 | while read arch; do \
39                         [ "x$${arch}" = "x" ] \
40                         || ( $(MKDIR) "$(top_builddir)$(builddir)/$${arch}"; \
41                                 $(MAKE) MKLIB=libio18f$${arch}.lib builddir=$(builddir)/$${arch} ARCH=$${arch} IO_ARCH=$${arch} $(MAKECMDGOALS); ) \
42                         || exit 1; \
43         done
44
45 include $(top_srcdir)/Makefile.rules
46
47 else
48
49 include $(top_srcdir)/Makefile.subdir
50
51 # prevent library to be build in $(SUBDIRS) as well
52 unexport MKLIB
53
54 endif