forked from jasonkajita/pic32-part-support
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
43 lines (31 loc) · 1.1 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#
# Global makefile for libraries
#
include defines.mk
SHELL=/bin/bash
SUBDIRS = proc peripheral libpic32
# We ship with source code for some libraries
SRCINSTALL_SUBDIRS = peripheral debugsupport
all: $(SUBDIRS)
install: $(SUBDIRS) install-headers
install-src: $(SUBDIRS)
cp Makefile $(TGTLIBSRC)
cp defines.mk $(TGTLIBSRC)
cp HOWTO-build-libraries-from-windows.txt $(TGTLIBSRC)
$(foreach dir,$(shell find include -type d | grep -v .svn), \
mkdir -p $(TGTLIBSRC)/$(dir); \
cp $(dir)/* ${TGTLIBSRC}/$(dir) 2>>/dev/null; )
cd $(TGTLIBSRC)/include && rm -rf machine && cp -RL mips machine && cd -
install-baseline: $(SUBDIRS) install-headers
install-proc: proc
clean: $(SUBDIRS)
# Each subdirectory is optional, so only build the ones that are present
$(SUBDIRS):
@if [[ -d $@ ]] ; then $(MAKE) -C $@ $(MAKECMDGOALS) ; fi
install-headers:
$(foreach dir,$(shell find include -type d | grep -v .svn), \
mkdir -p $(TGTDESTDIR)/$(dir); \
cp $(dir)/* ${TGTDESTDIR}/$(dir) 2>>/dev/null; )
cd $(INCDESTDIR) && cd -
.PHONY: all install clean install-headers install-baseline install-proc
.PHONY: $(SUBDIRS)