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 grep $(MMCU) "$${dir}.ignore" > /dev/null 2>&1 || $(MAKE) -C $$dir build-io-lib MCU=18f$(MMCU); \
45 # needed so that make updates the list of .o files correctly...
47 gplib -c $(LIB) $(foreach dir,$(DIRS),$(wildcard $(dir)/*.o))
50 @for dir in $(DIRS) ; do \
51 $(MAKE) -C $$dir clean-intermediate ; \
55 for dir in $(DIRS) ; do \
56 $(MAKE) -C $$dir clean; \
62 find -name *.adb -print | xargs -- rm -fv ;
63 find -name *.p -print | xargs -- rm -fv ;
64 find -name *.d -print | xargs -- rm -fv ;
65 find -name *.dump* -print | xargs -- rm -fv ;
69 for dir in $(DIRS) ; do \
70 $(MAKE) -C $$dir dep; \