Enabled VPATH feature: changed nearly all Makefiles (149 files).
[fw/sdcc] / device / lib / pic16 / 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 top_pic16builddir = .
25
26 include $(top_pic16builddir)/Makefile.common
27
28 ifeq (:,$(findstring :,$(LD) $(AS) $(LIB)))
29
30 .PHONY : all
31
32 all % : 
33         @echo "gputils not found -- PIC16 library not built!"
34
35 else
36
37 SUBDIRS    = debug libc libdev libio libm libsdcc startup
38 builddir   = build
39 installdir = bin
40 export installdir
41
42 C_SRC = $(notdir $(wildcard $(srcdir)/*.c))
43 S_SRC = $(notdir $(wildcard $(srcdir)/*.S))
44 OBJS = $(C_SRC:.c=.o) $(S_SRC:.S=.o)
45
46 .PHONY : all clean distclean clean-intermediate install
47
48 all : install
49
50 install : recurse
51
52 clean : recurse
53         $(Q)-$(RMDIR) "$(top_pic16builddir)/$(builddir)"
54
55 distclean: clean
56         $(RM) -f Makefile
57
58 clean-intermediate : recurse
59
60 include $(top_srcdir)/Makefile.rules
61
62 endif