#!/bin/sh
# $Id$
originDir=`dirname $0`

flagList=`env | awk '/BLDFLAG/ || /SB_TARGET_ARCH/ { eqOff=index($0, "="); if (eqOff != 0) { var=substr($0, 1, eqOff-1); val=substr($0, eqOff+1); } else {var = $0; val = ""; }; list[var] = val; } END { for(v in list) printf("-D%s=%s ", v,list[v]); printf("\n")};' `
isSetList=`env | awk '/SB_TARGET_ARCH/ { eqOff=index($0, "="); val=substr($0, eqOff+1); printf("-DIS_FOR_TARGET_%s=1 ", val); }' | sed -e 's/[.,]/_/g'`
echo ${flagList} ${isSetList}
exit 0
defineList=""
for flag in ${flagList}
do
	equalOffset=`expr ${flag} : '.*='`
	if test ${equalOffset} -ne 0
	then
		var=`expr substr ${flag} 1 ${equalOffset}`
		val=`expr substr ${flag} '(' ${equalOffset} + 1 ')' '(' length ${flag} - ${equalOffset} ')'`
	else
		var="${flag}="
		val=0
	fi
	defineList="${defineList}${defineList:+ }-D${var}${val:-0}"
done
echo ${defineList}
exit 0
