changeset 10:352f80da6813

ACI compiles!
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 27 Sep 2016 02:31:03 +0000
parents 05945a9b9dda
children f5c6ca078e2f
files components/aci-classic helpers/makeline.c scripts/make-version.sh scripts/mk-component.sh scripts/mkcomp-test.sh
diffstat 5 files changed, 523 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/aci-classic	Tue Sep 27 02:31:03 2016 +0000
@@ -0,0 +1,400 @@
+# Building the classic TCS211 version of aci.lib
+
+scripts/make-version.sh aci > $BUILD_DIR/$LIBNAME/aci_version.c
+
+CFLAGS="-me -mt -o -pw2 -x -mw"
+CPPFLAGS=
+
+cfile_plain aci_version.c
+
+# Defines
+
+CPPFLAGS=-DCCDTABLES_EXTERN
+CPPFLAGS="$CPPFLAGS -DOPTION_MULTITHREAD"
+CPPFLAGS="$CPPFLAGS -DNEW_FRAME"
+CPPFLAGS="$CPPFLAGS -DNEW_ENTITY"
+CPPFLAGS="$CPPFLAGS -D_TARGET_"
+CPPFLAGS="$CPPFLAGS -DSHARED_VSI"
+CPPFLAGS="$CPPFLAGS -DALR"
+CPPFLAGS="$CPPFLAGS -DFF_HOMEZONE"
+CPPFLAGS="$CPPFLAGS -DFF_MMI_SAT_ICON"
+CPPFLAGS="$CPPFLAGS -DFF_MMI_SMS_DYNAMIC"
+CPPFLAGS="$CPPFLAGS -DFF_CPHS"
+CPPFLAGS="$CPPFLAGS -D_TMS470"
+CPPFLAGS="$CPPFLAGS -DUART"
+CPPFLAGS="$CPPFLAGS -DFF_ATI"
+CPPFLAGS="$CPPFLAGS -DNWARN"
+CPPFLAGS="$CPPFLAGS -DFF_EM_MODE"
+CPPFLAGS="$CPPFLAGS -DVOCODER_FUNC_INTERFACE"
+CPPFLAGS="$CPPFLAGS -DAT_INTERPRETER"
+CPPFLAGS="$CPPFLAGS -DUSE_L1FD_FUNC_INTERFACE"
+
+if [ "$SRVC" != 0 ]
+then
+	CPPFLAGS="$CPPFLAGS -DFAX_AND_DATA"
+	if [ "$SRVC" = 1 ]
+	then
+		CPPFLAGS="$CPPFLAGS -DFF_FAX"
+	fi
+	CPPFLAGS="$CPPFLAGS -DUSE_L2FD_FUNC_INTERFACE"
+fi
+
+CPPFLAGS="$CPPFLAGS -DSRVC=$SRVC"
+CPPFLAGS="$CPPFLAGS -DMMI=$MMI"
+
+if [ "$MMI" = 0 ]
+then
+	CPPFLAGS="$CPPFLAGS -DACI"
+elif [ "$MMI" = 2 ]
+then
+	CPPFLAGS="$CPPFLAGS -DMFW"
+fi
+
+CPPFLAGS="$CPPFLAGS -DPHONEBOOK_EXTENSION"
+
+if [ "$GPRS" = 1 ]
+then
+	CPPFLAGS="$CPPFLAGS -DGPRS"
+fi
+
+CPPFLAGS="$CPPFLAGS -DSMS_PDU_SUPPORT"
+CPPFLAGS="$CPPFLAGS -DSIM_TOOLKIT"
+CPPFLAGS="$CPPFLAGS -DDTI2"
+CPPFLAGS="$CPPFLAGS -DDTI"
+CPPFLAGS="$CPPFLAGS -DUART"
+CPPFLAGS="$CPPFLAGS -DFF_ATI"
+
+# Includes
+
+CPPFLAGS="$CPPFLAGS -I$SRC/condat2/com/inc"
+CPPFLAGS="$CPPFLAGS -I$SRC/gpf2/inc"
+CPPFLAGS="$CPPFLAGS -I$SRC/condat2/com/include"
+CPPFLAGS="$CPPFLAGS -I../../cdg211/cdginc"
+
+if [ "$MMI" = 2 ]
+then
+	CPPFLAGS="$CPPFLAGS -I$SRC/aci2/mfw"
+fi
+
+CPPFLAGS="$CPPFLAGS -I$SRC/aci2/ksd"
+CPPFLAGS="$CPPFLAGS -I$SRC/aci2/ati_ext"
+CPPFLAGS="$CPPFLAGS -I$SRC/aci2/aci"
+CPPFLAGS="$CPPFLAGS -I$SRC/aci2/aci_ext"
+CPPFLAGS="$CPPFLAGS -I$SRC/aci2/aci_dti_mng"
+CPPFLAGS="$CPPFLAGS -I../../cdg211/prim"
+CPPFLAGS="$CPPFLAGS -I.."
+CPPFLAGS="$CPPFLAGS -I../config"
+CPPFLAGS="$CPPFLAGS -I$SRC/cs/riviera"
+CPPFLAGS="$CPPFLAGS -I$SRC/cs/drivers/drv_app"
+CPPFLAGS="$CPPFLAGS -I$SRC/cs/drivers/drv_core"
+CPPFLAGS="$CPPFLAGS -I$SRC/cs/drivers/drv_core/abb"
+CPPFLAGS="$CPPFLAGS -I$SRC/cs/drivers/drv_core/armio"
+CPPFLAGS="$CPPFLAGS -I$SRC/cs/drivers/drv_core/clkm"
+CPPFLAGS="$CPPFLAGS -I$SRC/cs/drivers/drv_core/conf"
+CPPFLAGS="$CPPFLAGS -I$SRC/cs/drivers/drv_core/dma"
+CPPFLAGS="$CPPFLAGS -I$SRC/cs/drivers/drv_core/dsp_dwnld"
+CPPFLAGS="$CPPFLAGS -I$SRC/cs/drivers/drv_core/inth"
+CPPFLAGS="$CPPFLAGS -I$SRC/cs/drivers/drv_core/memif"
+CPPFLAGS="$CPPFLAGS -I$SRC/cs/drivers/drv_core/rhea"
+CPPFLAGS="$CPPFLAGS -I$SRC/cs/drivers/drv_core/security"
+CPPFLAGS="$CPPFLAGS -I$SRC/cs/drivers/drv_core/spi"
+CPPFLAGS="$CPPFLAGS -I$SRC/cs/drivers/drv_core/timer"
+CPPFLAGS="$CPPFLAGS -I$SRC/cs/drivers/drv_core/uart"
+CPPFLAGS="$CPPFLAGS -I$SRC/cs/drivers/drv_core/ulpd"
+CPPFLAGS="$CPPFLAGS -I$SRC/cs/system"
+CPPFLAGS="$CPPFLAGS -I$SRC/cs/layer1/include"
+CPPFLAGS="$CPPFLAGS -I$SRC/cs/services"
+
+# ACI source modules
+
+SRCDIR=$SRC/aci2/aci
+
+# ATI stuff
+cfile_str2ind $SRCDIR/ati_sat.c
+cfile_str2ind $SRCDIR/ati_src_sat.c
+cfile_str2ind $SRCDIR/ati_pdu.c
+cfile_str2ind $SRCDIR/ati_bas.c
+cfile_str2ind $SRCDIR/ati_cc.c
+cfile_str2ind $SRCDIR/ati_cmd.c
+cfile_str2ind $SRCDIR/ati_csc.c
+cfile_str2ind $SRCDIR/ati_err.c
+
+if [ "$SRVC" != 0 ]
+then
+	cfile_str2ind $SRCDIR/ati_fd.c
+fi
+
+cfile_str2ind $SRCDIR/ati_io.c
+cfile_str2ind $SRCDIR/ati_mm.c
+cfile_str2ind $SRCDIR/ati_phb.c
+cfile_str2ind $SRCDIR/ati_prs.c
+cfile_str2ind $SRCDIR/ati_ret.c
+cfile_str2ind $SRCDIR/ati_sim.c
+cfile_str2ind $SRCDIR/ati_sms.c
+cfile_str2ind $SRCDIR/ati_ss.c
+
+if [ "$GPRS" = 1 ]
+then
+	cfile_str2ind $SRCDIR/ati_gprs.c
+fi
+
+cfile_str2ind $SRCDIR/ati_mmi.c
+cfile_str2ind $SRCDIR/ati_em.c
+cfile_str2ind $SRCDIR/ati_em_ret.c
+cfile_str2ind $SRCDIR/ati_cphs.c
+cfile_str2ind $SRCDIR/ati_dti.c
+
+cfile_str2ind $SRCDIR/ati_src_rvt.c
+cfile_str2ind $SRCDIR/ati_omcompat.c
+
+# ACI stuff
+cfile_str2ind $SRCDIR/aci_aci.c
+cfile_str2ind $SRCDIR/aci_mem.c
+cfile_str2ind $SRCDIR/aci_csf.c
+cfile_str2ind $SRCDIR/aci_pei.c
+cfile_str2ind $SRCDIR/aci_tim.c
+cfile_str2ind $SRCDIR/aci_util.c
+cfile_str2ind $SRCDIR/aci_lst.c
+cfile_str2ind $SRCDIR/dti_cntrl_mng.c
+cfile_str2ind $SRCDIR/phb.c
+cfile_str2ind $SRCDIR/aoc.c
+cfile_str2ind $SRCDIR/aci_mfw.c
+cfile_str2ind $SRCDIR/aci_slock.c
+cfile_str2ind $SRCDIR/aci_em.c
+
+if [ "$GPRS" = 1 ]
+then
+	cfile_str2ind $SRCDIR/gaci_srcc.c
+	cfile_str2ind $SRCDIR/gaci.c
+	cfile_str2ind $SRCDIR/gaci_ret.c
+fi
+
+cfile_str2ind $SRCDIR/hl_audio_drv.c
+
+# ATISRC stuff
+cfile_str2ind $SRCDIR/ati_src_uart.c
+cfile_str2ind $SRCDIR/ati_src_uart_io.c
+
+# CMH stuff (part 1)
+cfile_str2ind $SRCDIR/cmh_sats.c
+cfile_str2ind $SRCDIR/cmh_satr.c
+cfile_str2ind $SRCDIR/cmh_satq.c
+
+# CMH stuff (part 2)
+if [ "$SRVC" = 0 ]
+then
+	cfile_str2ind $SRCDIR/cmh_ccf.c
+	cfile_str2ind $SRCDIR/cmh_ccq.c
+	cfile_str2ind $SRCDIR/cmh_ccr.c
+	cfile_str2ind $SRCDIR/cmh_ccs.c
+	cfile_str2ind $SRCDIR/cmh_dmy.c
+	cfile_str2ind $SRCDIR/cmh_f.c
+	cfile_str2ind $SRCDIR/cmh_mmf.c
+	cfile_str2ind $SRCDIR/cmh_mmir.c
+	cfile_str2ind $SRCDIR/cmh_mmis.c
+	cfile_str2ind $SRCDIR/cmh_mmit.c
+	cfile_str2ind $SRCDIR/cmh_mmiq.c
+	cfile_str2ind $SRCDIR/cmh_mmq.c
+	cfile_str2ind $SRCDIR/cmh_mmr.c
+	cfile_str2ind $SRCDIR/cmh_mms.c
+	cfile_str2ind $SRCDIR/cmh_mmt.c
+	cfile_str2ind $SRCDIR/cmh_phbf.c
+	cfile_str2ind $SRCDIR/cmh_ssq.c
+	cfile_str2ind $SRCDIR/cmh_ssr.c
+	cfile_str2ind $SRCDIR/cmh_sss.c
+	cfile_str2ind $SRCDIR/cmh_phbq.c
+	cfile_str2ind $SRCDIR/cmh_phbs.c
+	cfile_str2ind $SRCDIR/cmh_phbt.c
+	cfile_str2ind $SRCDIR/cmh_phbr.c
+	cfile_str2ind $SRCDIR/cmh_simf.c
+	cfile_str2ind $SRCDIR/cmh_simq.c
+	cfile_str2ind $SRCDIR/cmh_simr.c
+	cfile_str2ind $SRCDIR/cmh_sims.c
+	cfile_str2ind $SRCDIR/cmh_smsf.c
+	cfile_str2ind $SRCDIR/cmh_smsq.c
+	cfile_str2ind $SRCDIR/cmh_smsr.c
+	cfile_str2ind $SRCDIR/cmh_smss.c
+	cfile_str2ind $SRCDIR/cmh_ssf.c
+	cfile_str2ind $SRCDIR/cmh_tsts.c
+	cfile_str2ind $SRCDIR/cmh_uartf.c
+    	cfile_str2ind $SRCDIR/cmh_uartr.c
+	cfile_str2ind $SRCDIR/cmh_uarts.c
+fi
+
+cfile_str2ind $SRCDIR/cmh_emq.c
+cfile_str2ind $SRCDIR/cmh_emr.c
+
+# CMH stuff (part 3)
+if [ "$SRVC" != 0 ]
+then
+	cfile_str2ind $SRCDIR/cmh_ccf.c
+	cfile_str2ind $SRCDIR/cmh_ccq.c
+	cfile_str2ind $SRCDIR/cmh_ccr.c
+	cfile_str2ind $SRCDIR/cmh_ccs.c
+	cfile_str2ind $SRCDIR/cmh_dmy.c
+	cfile_str2ind $SRCDIR/cmh_f.c
+	cfile_str2ind $SRCDIR/cmh_l2rf.c
+	cfile_str2ind $SRCDIR/cmh_l2rq.c
+	cfile_str2ind $SRCDIR/cmh_l2rr.c
+	cfile_str2ind $SRCDIR/cmh_l2rs.c
+	cfile_str2ind $SRCDIR/cmh_mmf.c
+	cfile_str2ind $SRCDIR/cmh_mmir.c
+	cfile_str2ind $SRCDIR/cmh_mmis.c
+	cfile_str2ind $SRCDIR/cmh_mmit.c
+	cfile_str2ind $SRCDIR/cmh_mmiq.c
+	cfile_str2ind $SRCDIR/cmh_mmq.c
+	cfile_str2ind $SRCDIR/cmh_mmr.c
+	cfile_str2ind $SRCDIR/cmh_mms.c
+	cfile_str2ind $SRCDIR/cmh_mmt.c
+	cfile_str2ind $SRCDIR/cmh_phbf.c
+	cfile_str2ind $SRCDIR/cmh_phbq.c
+	cfile_str2ind $SRCDIR/cmh_ssq.c
+	cfile_str2ind $SRCDIR/cmh_ssr.c
+	cfile_str2ind $SRCDIR/cmh_sss.c
+	cfile_str2ind $SRCDIR/cmh_phbs.c
+	cfile_str2ind $SRCDIR/cmh_phbt.c
+	cfile_str2ind $SRCDIR/cmh_phbr.c
+	cfile_str2ind $SRCDIR/cmh_raf.c
+	cfile_str2ind $SRCDIR/cmh_rar.c
+	cfile_str2ind $SRCDIR/cmh_ras.c
+	cfile_str2ind $SRCDIR/cmh_simf.c
+	cfile_str2ind $SRCDIR/cmh_simq.c
+	cfile_str2ind $SRCDIR/cmh_simr.c
+	cfile_str2ind $SRCDIR/cmh_sims.c
+	cfile_str2ind $SRCDIR/cmh_smsf.c
+	cfile_str2ind $SRCDIR/cmh_smsq.c
+	cfile_str2ind $SRCDIR/cmh_smsr.c
+	cfile_str2ind $SRCDIR/cmh_smss.c
+	cfile_str2ind $SRCDIR/cmh_ssf.c
+
+	if [ "$SRVC" = 1 ]
+	then
+		cfile_str2ind $SRCDIR/cmh_t30f.c
+		cfile_str2ind $SRCDIR/cmh_t30r.c
+		cfile_str2ind $SRCDIR/cmh_t30s.c
+		cfile_str2ind $SRCDIR/cmh_t30q.c
+	fi
+
+	cfile_str2ind $SRCDIR/cmh_tsts.c
+	cfile_str2ind $SRCDIR/cmh_uartf.c
+	cfile_str2ind $SRCDIR/cmh_uartr.c
+	cfile_str2ind $SRCDIR/cmh_uarts.c
+fi
+
+# CMH stuff (part 4)
+# all WAP/TCPIP/SATE stuff - not in FreeCalypso
+
+# CMH stuff (part 5)
+if [ "$GPRS" = 1 ]
+then
+	cfile_str2ind $SRCDIR/cmh_gmmf.c
+	cfile_str2ind $SRCDIR/cmh_gmmq.c
+	cfile_str2ind $SRCDIR/cmh_gmmr.c
+	cfile_str2ind $SRCDIR/cmh_gmms.c
+	cfile_str2ind $SRCDIR/cmh_gpppf.c
+	cfile_str2ind $SRCDIR/cmh_gpppr.c
+	cfile_str2ind $SRCDIR/cmh_gppps.c
+	cfile_str2ind $SRCDIR/cmh_snds.c
+	cfile_str2ind $SRCDIR/cmh_sndr.c
+	cfile_str2ind $SRCDIR/cmh_smf.c
+	cfile_str2ind $SRCDIR/cmh_smq.c
+	cfile_str2ind $SRCDIR/cmh_smr.c
+	cfile_str2ind $SRCDIR/cmh_sms.c
+	cfile_str2ind $SRCDIR/cmh_smt.c
+fi
+
+# CMH stuff (part 6)
+cfile_str2ind $SRCDIR/cmh_cphs.c
+cfile_str2ind $SRCDIR/cmh_dti.c
+
+# PSA stuff
+cfile_str2ind $SRCDIR/psa_satf.c
+cfile_str2ind $SRCDIR/psa_satp.c
+cfile_str2ind $SRCDIR/psa_sats.c
+cfile_str2ind $SRCDIR/cmh_satf.c
+
+cfile_str2ind $SRCDIR/psa_ccf.c
+cfile_str2ind $SRCDIR/psa_ccp.c
+cfile_str2ind $SRCDIR/psa_ccs.c
+cfile_str2ind $SRCDIR/psa_f.c
+
+if [ "$SRVC" != 0 ]
+then
+	cfile_str2ind $SRCDIR/psa_l2rf.c
+	cfile_str2ind $SRCDIR/psa_l2rp.c
+	cfile_str2ind $SRCDIR/psa_l2rs.c
+fi
+
+cfile_str2ind $SRCDIR/psa_mmf.c
+cfile_str2ind $SRCDIR/psa_mmif.c
+cfile_str2ind $SRCDIR/psa_mmip.c
+cfile_str2ind $SRCDIR/psa_mmis.c
+cfile_str2ind $SRCDIR/psa_mmp.c
+cfile_str2ind $SRCDIR/psa_mms.c
+
+if [ "$SRVC" != 0 ]
+then
+	cfile_str2ind $SRCDIR/psa_raf.c
+	cfile_str2ind $SRCDIR/psa_rap.c
+	cfile_str2ind $SRCDIR/psa_ras.c
+fi
+
+cfile_str2ind $SRCDIR/psa_simf.c
+cfile_str2ind $SRCDIR/psa_simp.c
+cfile_str2ind $SRCDIR/psa_sims.c
+cfile_str2ind $SRCDIR/psa_smsf.c
+cfile_str2ind $SRCDIR/psa_smsp.c
+cfile_str2ind $SRCDIR/psa_smss.c
+cfile_str2ind $SRCDIR/psa_ssf.c
+cfile_str2ind $SRCDIR/psa_ssp.c
+cfile_str2ind $SRCDIR/psa_sss.c
+
+if [ "$SRVC" = 1 ]
+then
+	cfile_str2ind $SRCDIR/psa_t30f.c
+	cfile_str2ind $SRCDIR/psa_t30p.c
+	cfile_str2ind $SRCDIR/psa_t30s.c
+fi
+
+cfile_str2ind $SRCDIR/psa_util.c
+cfile_str2ind $SRCDIR/psa_uartp.c
+cfile_str2ind $SRCDIR/psa_uarts.c
+
+if [ "$SRVC" != 0 ]
+then
+	cfile_str2ind $SRCDIR/psa_tras.c
+	cfile_str2ind $SRCDIR/psa_trap.c
+fi
+
+cfile_str2ind $SRCDIR/psa_mtst.c
+
+if [ "$GPRS" = 1 ]
+then
+	cfile_str2ind $SRCDIR/psa_gmmf.c
+	cfile_str2ind $SRCDIR/psa_gmmp.c
+	cfile_str2ind $SRCDIR/psa_gmms.c
+	cfile_str2ind $SRCDIR/psa_gpppf.c
+	cfile_str2ind $SRCDIR/psa_gpppp.c
+	cfile_str2ind $SRCDIR/psa_gppps.c
+	cfile_str2ind $SRCDIR/psa_sndp.c
+	cfile_str2ind $SRCDIR/psa_snds.c
+	cfile_str2ind $SRCDIR/psa_smf.c
+	cfile_str2ind $SRCDIR/psa_smp.c
+	cfile_str2ind $SRCDIR/psa_sms.c
+fi
+
+# miscellaneous stuff
+cfile_str2ind $SRCDIR/sap_dti.c
+
+if [ "$GPRS" = 1 ]
+then
+	cfile_str2ind $SRCDIR/sap_ppp.c
+fi
+
+cfile_str2ind $SRCDIR/sap_em.c
+cfile_str2ind $SRCDIR/conc_sms.c
+cfile_str2ind $SRCDIR/cphs.c
+cfile_str2ind $SRCDIR/cphs_aci.c
+cfile_str2ind $SRCDIR/line_edit.c
+cfile_str2ind $SRCDIR/line_split.c
+cfile_str2ind $SRCDIR/dcm_f.c
--- a/helpers/makeline.c	Mon Sep 26 20:53:13 2016 +0000
+++ b/helpers/makeline.c	Tue Sep 27 02:31:03 2016 +0000
@@ -72,4 +72,5 @@
 		linelen += strlen(*ap);
 	}
 	putchar('\n');
+	exit(0);
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/make-version.sh	Tue Sep 27 02:31:03 2016 +0000
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+if [ $# != 1 ]
+then
+	echo "usage: $0 component-name" 1>&2
+	exit 1
+fi
+
+echo "static char *verstring_$1 = \"$1 FreeCalypso Magnetite\";"
+echo
+echo "char *$1_version(void)"
+echo '{'
+echo "	return verstring_$1;"
+echo '}'
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/mk-component.sh	Tue Sep 27 02:31:03 2016 +0000
@@ -0,0 +1,97 @@
+#!/bin/sh
+
+if [ $# -lt 1 -o $# -gt 2 ]
+then
+	echo "usage: $0 component-lib [flavor]" 1>&2
+	exit 1
+fi
+
+LIBNAME="$1"
+
+if [ -n "$2" ]
+then
+	recipe_file="components/$1-$2"
+else
+	recipe_file="components/$1"
+fi
+
+if [ ! -f "$recipe_file" ]
+then
+	echo "Error: $recipe_file not found" 1>&2
+	exit 1
+fi
+
+if [ -z "$BUILD_DIR" ]
+then
+	echo "Error: BUILD_DIR= must be passed via environment" 1>&2
+	exit 1
+fi
+
+set -e
+
+mkdir -p $BUILD_DIR/$LIBNAME
+
+# beginning of the Makefile
+echo "all:	$LIBNAME.lib" > $BUILD_DIR/$LIBNAME/Makefile
+echo >> $BUILD_DIR/$LIBNAME/Makefile
+
+# shell functions to be used in the recipes
+
+cfile_plain() {
+	if [ $# != 1 ]
+	then
+		echo "Error: cfile_plain takes 1 argument" 1>&2
+		exit 1
+	fi
+	objname=`basename "$1" .c`.obj
+	helpers/makeline dep $objname "$1" >> $BUILD_DIR/$LIBNAME/Makefile
+	helpers/makeline cmd ../../toolwrap/cl470 -q -c ${CFLAGS} ${CPPFLAGS} \
+		"$1" >> $BUILD_DIR/$LIBNAME/Makefile
+	echo >> $BUILD_DIR/$LIBNAME/Makefile
+	OBJS="$OBJS $objname"
+}
+
+cfile_str2ind() {
+	if [ $# != 1 ]
+	then
+		echo "Error: cfile_str2ind takes 1 argument" 1>&2
+		exit 1
+	fi
+	if [ "$USE_STR2IND" = 1 ]
+	then
+		objname=`basename "$1" .c`.obj
+		pp_name=`echo $1 | sed -e s/.c\$/.pp/`
+		pp__name=`echo $1 | sed -e s/.c\$/.pp_/`
+		helpers/makeline dep $objname "$1" \
+			>> $BUILD_DIR/$LIBNAME/Makefile
+		helpers/makeline cmd ../../toolwrap/cl470 -q -po -p? -x \
+			${CPPFLAGS} "$1" >> $BUILD_DIR/$LIBNAME/Makefile
+		helpers/makeline cmd ../../toolwrap/str2ind -a \
+			-t ../str2ind.tab -l ../str2ind.log \
+			-f "$pp_name" >> $BUILD_DIR/$LIBNAME/Makefile
+		helpers/makeline cmd ../../toolwrap/cl470 -q -c ${CFLAGS} \
+			"$pp__name" >> $BUILD_DIR/$LIBNAME/Makefile
+		helpers/makeline cmd @rm -f "$pp_name" \
+			>> $BUILD_DIR/$LIBNAME/Makefile
+		helpers/makeline cmd @rm -f "$pp__name" \
+			>> $BUILD_DIR/$LIBNAME/Makefile
+		echo >> $BUILD_DIR/$LIBNAME/Makefile
+		OBJS="$OBJS $objname"
+	else
+		cfile_plain "$1"
+	fi
+}
+
+# invoke the recipe
+
+SRC=../../src
+OBJS=
+. "$recipe_file"
+
+# finish the Makefile
+
+helpers/makeline dep $LIBNAME.lib ${OBJS} >> $BUILD_DIR/$LIBNAME/Makefile
+echo '	../../toolwrap/ar470 r $@ $^' >> $BUILD_DIR/$LIBNAME/Makefile
+echo >> $BUILD_DIR/$LIBNAME/Makefile
+echo 'clean:' >> $BUILD_DIR/$LIBNAME/Makefile
+echo '	rm -f *.obj *.lib *.c' >> $BUILD_DIR/$LIBNAME/Makefile
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/mkcomp-test.sh	Tue Sep 27 02:31:03 2016 +0000
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+BUILD_DIR=build-sb
+GPRS=1
+MMI=0
+SRVC=1
+USE_STR2IND=0
+
+export BUILD_DIR GPRS MMI SRVC USE_STR2IND
+
+exec scripts/mk-component.sh "$@"