2 # Makefile - Makefile to build pic16 support libraries
4 # This file is part of the GNU PIC Library.
7 # The GNU PIC Library is maintained by,
8 # Vangelis Rokas <vrokas@otenet.gr>
14 MCUS = $(shell cat ../pics.build)
21 LOBJS = $(patsubst %,%/*.o,$(DIRS))
23 # library name example libio18f8720.lib
24 LIB = libio18f$(MMCU).lib
28 make-target: build-libraries
31 for proc in $(PROCESSORS) ; do \
32 echo "Building libraries for processor pic18f $$proc" ; \
33 $(MAKE) -C . build-processor-library MMCU=$$proc ; \
36 # Should have externally specified PROC
37 build-processor-library:
38 for dir in $(DIRS) ; do \
39 $(MAKE) -C $$dir clean ; \
40 $(MAKE) -C $$dir build-mcu-library MCU=18f$(MMCU); \
42 gplib -c $(LIB) $(LOBJS)
47 @for dir in $(DIRS) ; do \
48 $(MAKE) -C $$dir clean-intermediate ; \
52 for dir in $(DIRS) ; do \
53 $(MAKE) -C $$dir clean; \
59 find -name *.adb -print | xargs -- rm -fv ;
60 find -name *.p -print | xargs -- rm -fv ;
61 find -name *.d -print | xargs -- rm -fv ;
62 find -name *.dump* -print | xargs -- rm -fv ;
66 for dir in $(DIRS) ; do \
67 $(MAKE) -C $$dir dep; \