* src/pic16/device.c (Pics16[]): added devices 18F2550, 18F4331,
[fw/sdcc] / device / lib / pic16 / libc / 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    =       ctype \
16                 delay \
17                 stdlib \
18                 stdio \
19                 string \
20                 utils
21
22 LOBJS   = $(patsubst %,%/*.o,$(DIRS))
23
24 LIB     = libc18f.lib
25
26 all: build-libraries
27
28 make-target: build-libraries
29
30 build-libraries:
31         for dir in $(DIRS) ; do  \
32                 $(MAKE) -C $$dir ; \
33         done;
34         gplib -c $(LIB) $(LOBJS)
35         mv -v $(LIB) ../bin
36         
37
38 clean-intermediate:
39         @for dir in $(DIRS) ; do \
40                 $(MAKE) -C $$dir clean-intermediate ; \
41         done ;
42         
43 clean:
44         for dir in $(DIRS) ; do \
45                 $(MAKE) -C $$dir clean; \
46         done ;
47         rm -fv $(LIB)
48
49
50 real-clean: clean
51         find -name *.adb -print | xargs -- rm -fv ;
52         find -name *.p -print | xargs -- rm -fv ;
53         find -name *.d -print | xargs -- rm -fv ;
54         find -name *.dump* -print | xargs -- rm -fv ;
55         
56
57 dep:
58         for dir in $(DIRS) ; do \
59                 $(MAKE) -C $$dir dep; \
60         done