bd6b60d36dceabed1acd0d996c65ea82670aaa71
[fw/sdcc] / device / lib / pic16 / libsdcc / Makefile
1 #
2 # Makefile - Makefile to build pic16 support libraries
3 #
4 # This file is part of the GNU PIC Library.
5 #
6 # January, 2004
7 # The GNU PIC Library is maintained by,
8 #       Vangelis Rokas <vrokas@otenet.gr>
9 #
10 # $Id$
11 #
12 #
13
14
15 DIRS    =       char \
16                 int \
17                 long \
18                 float \
19                 gptr
20
21
22 LIB     = libsdcc.lib
23
24 all: build-libraries
25
26 make-target: build-libraries
27
28 build-libraries:
29         for dir in $(DIRS) ; do  \
30                 $(MAKE) -C $$dir ; \
31         done;
32         gplib -c $(LIB) char/*.o int/*.o long/*.o float/*.o gptr/*.o
33         mv -v $(LIB) ../bin
34         
35
36 clean-intermediate:
37         @for dir in $(DIRS) ; do \
38                 $(MAKE) -C $$dir clean-intermediate ; \
39         done ;
40         
41 clean:
42         for dir in $(DIRS) ; do \
43                 $(MAKE) -C $$dir clean; \
44         done ;
45         rm -fv $(LIB)
46
47
48 real-clean: clean
49         find -name *.adb -print | xargs -- rm -fv ;
50         find -name *.p -print | xargs -- rm -fv ;
51         find -name *.d -print | xargs -- rm -fv ;
52         find -name *.dump* -print | xargs -- rm -fv ;
53         
54
55 dep:
56         for dir in $(DIRS) ; do \
57                 $(MAKE) -C $$dir dep; \
58         done