1 ###########################################################
2 ### Makefile for the GNU PIC Library
4 ### Copyright (C) 2005 by Raphael Neider <rneider AT web.de>
6 ### The GNU PIC Library was originally designed and
8 ### Vangelis Rokas <vrokas@otenet.gr>
10 ### It is currently maintained by
11 ### Raphael Neider <rneider AT web.de>
13 ### This file may be distributed under the terms of the the
14 ### GNU General Public License (GPL). See COPYING for details.
19 top_builddir = @top_builddir@
20 top_srcdir = @top_srcdir@
24 SUBDIRS = adc i2c usart
26 ifeq ($(origin IO_ARCH),undefined)
27 include $(top_builddir)/Makefile.common
29 .PHONY : all clean clean-intermediate install
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
37 $(Q)-[ ! -d "$(top_builddir)/$(builddir)" ] || $(RMDIR) "$(top_builddir)/$(builddir)"
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); ) \
52 include $(top_srcdir)/Makefile.rules
56 include $(top_srcdir)/Makefile.subdir
58 # prevent library to be build in $(SUBDIRS) as well