IPA_Emulation: Make dependencies to RSL/MGCP/SCCP/GSUP conditional
Let's use the preprocessor to avoid IPA_Emulation pulling *all*
dependencies into each and any of our projects. The code readability
suffers a bit from the many #ifdefs, but compilation speed increases
if we don't have to pull in all those (recursive) dependencies.
After all, a BTS test case will never need SCCP, GSUP or MGCP.
Change-Id: Ic0231adbd2171214de133d26b3fbf36130ee8aa0
diff --git a/selftest/Selftest.ttcn b/selftest/Selftest.ttcn
index 1c340b7..1ff17fe 100644
--- a/selftest/Selftest.ttcn
+++ b/selftest/Selftest.ttcn
@@ -5,7 +5,6 @@
import from GSM_Types all;
import from IPL4asp_Types all;
import from IPL4asp_PortType all;
-import from MTP3asp_PortType all;
import from BSSAP_Types all;
//import from BSSAP_Adapter all;
@@ -25,8 +24,6 @@
type component IPA_selftest_CT {
/* upper end of IPA_Emulation */
- port MTP3asp_PT IPA_MTP3;
- port IPA_MGCP_PT IPA_MGCP;
port IPA_RSL_PT IPA_RSL;
port IPA_CTRL_PT IPA_CTRL;
port IPA_SP_PT IPA_SP;
@@ -42,10 +39,8 @@
function f_ipa_srv_init() runs on IPA_selftest_CT {
vc_IPA := IPA_Emulation_CT.create("IPA_Emulation");
map(vc_IPA:IPA_PORT, system: IPA_CODEC_PT);
- connect(vc_IPA:IPA_MGCP_PORT, self:IPA_MGCP);
connect(vc_IPA:IPA_RSL_PORT, self:IPA_RSL);
connect(vc_IPA:IPA_CTRL_PORT, self:IPA_CTRL);
- connect(vc_IPA:MTP3_SP_PORT, self:IPA_MTP3);
vc_IPA.start(IPA_Emulation.main_server("127.0.0.1", 55555));
}
diff --git a/selftest/gen_links.sh b/selftest/gen_links.sh
index 611ba5c..b0b2688 100755
--- a/selftest/gen_links.sh
+++ b/selftest/gen_links.sh
@@ -46,11 +46,6 @@
FILES="MobileL3_CC_Types.ttcn MobileL3_CommonIE_Types.ttcn MobileL3_GMM_SM_Types.ttcn MobileL3_MM_Types.ttcn MobileL3_RRM_Types.ttcn MobileL3_SMS_Types.ttcn MobileL3_SS_Types.ttcn MobileL3_Types.ttcn"
gen_links $DIR $FILES
-DIR=$BASEDIR/titan.ProtocolModules.SDP/src
-FILES="SDP_EncDec.cc SDP_Types.ttcn SDP_parse_.tab.c SDP_parse_.tab.h SDP_parse_parser.h SDP_parser.l
-SDP_parser.y lex.SDP_parse_.c"
-gen_links $DIR $FILES
-
DIR=../library
-FILES="General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcn L3_Templates.ttcn BSSMAP_Templates.ttcn RLCMAC_CSN1_Types.ttcn GSM_RR_Types.ttcn RSL_Types.ttcn MGCP_Types.ttcn MGCP_Templates.ttcn BSSAP_CodecPort.ttcn Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn GSUP_Types.ttcn"
+FILES="General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcnpp L3_Templates.ttcn BSSMAP_Templates.ttcn RLCMAC_CSN1_Types.ttcn GSM_RR_Types.ttcn RSL_Types.ttcn BSSAP_CodecPort.ttcn Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn GSUP_Types.ttcn"
gen_links $DIR $FILES
diff --git a/selftest/regen_makefile.sh b/selftest/regen_makefile.sh
index eefda49..d79b921 100755
--- a/selftest/regen_makefile.sh
+++ b/selftest/regen_makefile.sh
@@ -2,6 +2,8 @@
MAIN=Selftest.ttcn
-FILES="*.ttcn IPA_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc SDP_EncDec.cc *.c"
+FILES="*.ttcn *.ttcnpp IPA_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc"
+
+export CPPFLAGS_TTCN3="-DIPA_EMULATION_RSL"
../regen-makefile.sh $MAIN $FILES