[make] add feature to allow multiple parallel build dirs

Using environment variables LKROOT and LKINC you can specify multiple
parallel top level directories (outside of the lk root) that are overlayed
on top of the build system. This allows for a structure like

lk/
testproject/
someotherfirmware/

Where each of these subdirs has an entire overlayed tree of libraries, platforms,
targets, and projects.

To accomplish this, copy makefile into the root dir and build a lk_inc.mk that
sets LKROOT and LKINC.
This commit is contained in:
Travis Geiselbrecht
2013-03-12 03:12:24 -07:00
parent 4b63f75ff3
commit eaa673169e
4 changed files with 239 additions and 199 deletions

View File

@@ -20,7 +20,7 @@ define MAKECONFIGHEADER
echo \#ifndef __$${LDEF}_H > $1.tmp; \
echo \#define __$${LDEF}_H >> $1.tmp; \
for d in `echo $($2) | tr '[:lower:]' '[:upper:]'`; do \
echo "#define $$d" | sed "s/=/\ /g;s/-/_/g;s/\//_/g" >> $1.tmp; \
echo "#define $$d" | sed "s/=/\ /g;s/-/_/g;s/\//_/g;s/\./_/g;s/\//_/g" >> $1.tmp; \
done; \
echo \#endif >> $1.tmp; \
if [ -f "$1" ]; then \