blob: a0c0ec1e720e8f0ca90e9436dff0388eb638d531 (
plain)
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
|
# Makefile for OpenSlug
# Licensed under the GPL v2 or later
openslug-firmware: setup-env conf/local.conf
( source setup-env ; bitbake openslug-packages )
# This does the same thing but with a clean environment
# The HOME setting prevents user environment settings
# from changing the build. CCACHE_DIR is necessary to
# prevent ccache (if installed) attempting to use a
# .cache in the home directory.
openslug-firmware-safe: setup-env conf/local.conf
env -i CCACHE_DISABLE=1 CCACHE_DIR="`pwd`/tmp/ccache" HOME=/dev/null \
sh -c 'source setup-env; bitbake openslug-packages'
setup-env:
[ -e bitbake ] || ( ln -s ../bitbake . )
[ -e downloads ] || ( ln -s ../downloads . )
[ -e openembedded ] || ( ln -s ../openembedded . )
[ -e oe-symlinks ] || ( ln -s ../oe-symlinks . )
echo 'OEROOT='`pwd` > setup-env
echo 'OESYS=$$OEROOT/bitbake/' >> setup-env
echo 'PKGDIR=$$OEROOT/openembedded/' >> setup-env
echo 'OEBUILD=$$OEROOT' >> setup-env
echo 'export PYTHONPATH=$$OESYS/lib' >>setup-env
echo 'export BBPATH=$$OEBUILD:$$PKGDIR:$$OESYS' >> setup-env
echo 'export PATH=$$OESYS/bin/:$$PATH' >> setup-env
echo 'export LD_LIBRARY_PATH=' >> setup-env
echo 'export LANG=C' >> setup-env
echo 'unset LC_CTYPE' >> setup-env
echo 'unset CC' >> setup-env
echo 'unset CXX' >> setup-env
echo 'alias bb=bitbake' >> setup-env
echo 'echo Environment set up for OpenSlug development.' >> setup-env
conf/local.conf:
sed -e "s|%%%OEROOT%%%|`pwd`|" conf/local.conf.template > conf/local.conf
clobber:
rm -rf tmp
openslug-source:
tar zcvf openslug-source.tar.gz --exclude=MT Makefile bitbake conf openembedded oe-symlinks
distclean: clobber
rm -rf setup-env conf/local.conf bitbake downloads openembedded oe-symlinks
# End of Makefile
|