forked from AdaCore/embedded-runtimes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
55 lines (51 loc) · 1.59 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
43
44
45
46
47
48
49
50
51
52
53
54
55
sfp = $(wildcard ravenscar-*/sfp)
full = $(wildcard ravenscar-*/full)
ROOT = $(shell dirname $(shell dirname $(shell which arm-eabi-gcc)))
INSTALL = $(ROOT)/arm-eabi/lib/gnat
all:
for d in $(sfp); do \
echo $$d; \
cd $$d/..; \
gprbuild -P ravenscar_build.gpr -XRTS=ravenscar-sfp -j0; \
echo \* > sfp/obj/.gitignore; \
echo \* > sfp/adalib/.gitignore; \
git add -f sfp/obj/.gitignore; \
git add -f sfp/adalib/.gitignore; \
cd ..; \
done
@for d in $(full); do \
echo $$d; \
cd $$d/..; \
gprbuild -P ravenscar_build.gpr -XRTS=ravenscar-full -j0; \
echo \* > full/obj/.gitignore; \
echo \* > full/adalib/.gitignore; \
git add -f full/obj/.gitignore; \
git add -f full/adalib/.gitignore; \
cd ..; \
done
install: all
@cp -r bsps $(INSTALL)/bsps
@cp -r base_runtimes $(INSTALL)/base_runtimes
@for d in $(sfp) $(full); do \
variant=$$(basename $$d); \
base=$$(basename $$(dirname $$d) | sed -e 's/ravenscar/ravenscar-'$$variant'/'); \
dest="$(INSTALL)/$$base"; \
echo "Installing $$d in $$dest"; \
if [ -d $$dest ]; then rm -rf $$dest; fi; \
cp -r $$d $$dest; \
cat $$dest/runtime.xml | sed -e 's,../bsps,bsps,g' > tmp; \
mv tmp $$dest/runtime.xml; \
cat $$dest/ada_source_path | sed -e 's,../bsps,bsps,g' -e 's,../base_runtimes,base_runtimes,g' > tmp; \
mv tmp $$dest/ada_source_path; \
done
clean:
for d in $(sfp); do \
echo $$d; \
rm -rf $$d/obj/*; \
rm -rf $$d/adalib/*; \
done
for d in $(full); do \
echo $$d; \
rm -rf $$d/obj/*; \
rm -rf $$d/adalib/*; \
done