1 ###########################################################
2 ### Makefile for the GNU PIC Library
4 ### Copyright (C) 2005 by Raphael Neider <rneider@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@web.de>
13 ### This file may be distributed under the terms of the the
14 ### GNU General Public License (GPL). See COPYING for details.
21 SUBDIRS = adc i2c usart
23 ifeq ($(origin IO_ARCH),undefined)
24 include $(topsrcdir)/Makefile.common
26 .PHONY : all clean clean-intermediate install
28 # I create $(builddir)/$${arch} right here in order to prevent
29 # the sub-make's `builddir´ rules from aborting if another sub-make
30 # already created the above directory (happened on Alpha).
31 all clean clean-intermediate install :
32 $(Q)+cat $(topsrcdir)/pics.build \
33 | $(SED) -e "s,[ \t]*#.*$$,," \
34 | $(GREP) -v "^[ \t]*$$" \
35 | while read arch; do \
36 [ "x$${arch}" = "x" ] \
37 || ( [ -d "$(builddir)/$${arch}" ] || $(MKDIR) "$(builddir)/$${arch}"; \
38 $(MAKE) MKLIB=libio18f$${arch}.lib builddir=$(builddir)/$${arch} ARCH=$${arch} IO_ARCH=$${arch} $(MAKECMDGOALS); ) \
42 include $(topsrcdir)/Makefile.rules
46 include $(topsrcdir)/Makefile.subdir
48 # prevent library to be build in $(SUBDIRS) as well