re-enabling serial
[clinton/Smoothieware.git] / gcc4mbed / external / makefile
1 # Copyright 2011 Adam Green (http://mbed.org/users/AdamGreen/)
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 # http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14 #
15 # Makefile to install external dependencies like mbed and FATFileSystem
16 # libraries from mbed.
17 ifeq "$(MAKE)" "cs-make"
18 SVN=win32\svn
19 MOVE=@echo Skipping move
20 DELTREE=-rd /s /q
21 PATCH=win32\applydiff --binary
22 QUIET=>nul 2>nul & exit 0
23 SHELL=cmd.exe
24 else
25 SVN=svn
26 MOVE=mv
27 DELTREE=rm -f -r
28 PATCH=patch
29 QUIET=> /dev/null 2>&1 ; exit 0
30 endif
31
32 .PHONY: install install_mbed install_fat patch_mbed patch_fat strip_libs
33
34 install: install_mbed install_fat patch_mbed patch_fat strip_libs
35
36 install_mbed:
37 $(DELTREE) mbed $(QUIET)
38 $(SVN) checkout --revision 28 http://mbed.org/projects/libraries/svn/mbed/trunk mbed
39
40 install_fat:
41 $(DELTREE) FATFileSystem $(QUIET)
42 $(SVN) checkout --revision 28 http://mbed.org/projects/libraries/svn/FATFileSystem/trunk FATFileSystem
43
44 patch_mbed:
45 $(MOVE) mbed/LPC1768/LPC1768.sct mbed/LPC1768/LPC1768.scatter
46 $(MOVE) mbed/LPC2368/LPC2368.sct mbed/LPC2368/LPC2368.scatter
47 $(PATCH) -p1 <mbed.patch
48
49 patch_fat:
50 $(PATCH) -p1 <FATFileSystem.patch
51
52 strip_libs:
53 arm-none-eabi-objcopy -g mbed/LPC1768/mbed.ar
54 arm-none-eabi-objcopy -g mbed/LPC1768/capi.ar
55 arm-none-eabi-objcopy -g FATFileSystem/LPC1768/FATFileSystem.ar
56