view g23m/select_target.sh @ 15:118ecc51e1d2

support for multiple targets: gtamodem and fcdev3b
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 23 Sep 2016 05:45:46 +0000
parents
children
line wrap: on
line source

#!/bin/sh

if [ $# != 1 ]
then
	echo "usage: $0 target" 1>&2
	exit 1
fi

if [ ! -f "targets/$1.h" -o ! -f "targets/$1.inc" ]
then
	echo "Error: target $1 not known" 1>&2
	exit 1
fi

. "targets/$1.inc"

set -e

gsmlong=gsm_ac_gp_fd_pu_em_cph_ds_vc_cal35_ri_36_amd8_ts0

(cd __out__/$gsmlong/lib; ln -sf "main-$MAIN_variant.lib" main.lib)

mkdir -p __out__/$gsmlong/config

(cd __out__/$gsmlong/config; ln -sf "../../../targets/$1.h" fc-target.cfg)