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 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); ) \
45 include $(top_srcdir)/Makefile.rules
49 include $(top_srcdir)/Makefile.subdir
51 # prevent library to be build in $(SUBDIRS) as well