forked from AndrewD/prex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathallconfig
executable file
·46 lines (36 loc) · 1.14 KB
/
allconfig
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
#!/bin/bash
# sanity
if [ "x$1" == x ]; then
echo no base directory specified
exit 1
fi
# create folders
base=$1
shift
# configure arm targets
targets="arm-gba arm-integrator arm-integrator-nommu arm-beagle"
./configure --build=$base/arm-gba --target=arm-gba $* || exit 1
./configure --build=$base/arm-integrator --target=arm-integrator $* || exit 1
./configure --build=$base/arm-integrator-nommu --target=arm-integrator \
--profile=nommu $* || exit 1
./configure --build=$base/arm-beagle --target=arm-beagle $* || exit 1
./configure --build=$base/arm-at91x40 --target=arm-at91x40 $* || exit 1
# configure i386 targets
targets="$targets i386-pc i386-pc-tiny"
./configure --build=$base/i386-pc --target=i386-pc $* || exit 1
./configure --build=$base/i386-pc-tiny --target=i386-pc \
--profile=tiny $* || exit 1
# create top level make file
echo "# Autogenerated by allconfig" > $base/Makefile
echo "SRCDIR = `pwd`" >> $base/Makefile
echo "TARGETS = $targets" >> $base/Makefile
cat >> $base/Makefile <<"MAKEFILE"
ifdef MAKECMDGOALS
$(MAKECMDGOALS): $(TARGETS)
else
all: $(TARGETS)
endif
.PHONY: $(TARGETS)
$(TARGETS):
$(MAKE) -C $@ $(MAKECMDGOALS)
MAKEFILE