-# Makefile for UcSlugC
+#!/bin/make
+# Makefile for OpenEmbedded builds
# Licensed under the GPL v2 or later
#
+# conf/auto.conf must exist in the same directory as the Makefile (i.e.
+# the directory where Makefile is used - it may be a symbolic link to
+# this file). conf/auto.conf defines:
+#
+# DISTRO - the OpenEmbedded 'distro' to build
+# MACHINE - the OpenEmbedded build target machine
+# MAKE_TARGET - the target to pass to bitbake
+#
+# All of these values are (should be, must be) quoted in double quotes
+include conf/auto.conf
BUILD_DIRS = downloads
REQUIRED_DIRS = bitbake openembedded
# The default rule is to build the firmware in an unprotected environment.
firmware: $(FIRMWARE_DEPS)
- . ./setup-env; exec bitbake $${MAKE_TARGET}
+ . ./setup-env; exec bitbake $(MAKE_TARGET)
# This rule clobbers the environment (note that ccache uses '$HOME' by
# default, so the cache will end up there).
.PHONY: source
source: $(REQUIRED_DIRS)
- tar zcf $${DISTRO}.tar.gz --exclude=MT Makefile setup-env conf/site.conf conf/auto.conf \
+ tar zcf $(DISTRO).tar.gz --exclude=MT Makefile setup-env conf/site.conf conf/auto.conf \
conf/local.conf.sample $(REQUIRED_DIRS:=/.)
# This target probably isn't important any longer, because the -source
# it removes directories from the tarball).
.PHONY:
really-clean: distclean
- rm -rf $(REQUIRED_DIRS) $${DISTRO}-source.tar.gz
+ rm -rf $(REQUIRED_DIRS) $(DISTRO)-source.tar.gz
exit 1
}
-. ./conf/auto.conf
-export DISTRO
-export MAKE_TARGET
-
#
# the following must match the definitions in common/conf/site.conf
export PYTHONPATH="${TOPDIR}/bitbake/lib"
unset CXX
unset MFLAGS
unset MAKEFLAGS
+unset DISTRO
+unset MACHINE
+unset MAKE_TARGET
#
# make bb into a 'safe' bitbake
alias bb-safe="env -i \
- HOME='${TOPDIR}/home' \
+ HOME='${HOME}' \
PYTHONPATH='${PYTHONPATH}' \
BBPATH='${BBPATH}' \
PATH='${PATH}' \