src/*/Makefile.am: Use asn1c -R to avoid generating runtime code

Change-Id: I5666a6dc1ec9e56fe133642fb0054e913265c081
changes/59/25959/3
Pau Espin 1 year ago
parent 861d9d2ebf
commit b292db8923
  1. 4
      src/hnbap/Makefile.am
  2. 6
      src/ranap/Makefile.am
  3. 4
      src/rua/Makefile.am
  4. 4
      src/sabp/Makefile.am

@ -243,9 +243,7 @@ libosmo_asn1_hnbap_la_LIBADD=$(ASN1C_LDADD)
regen: regenerate-from-asn1-source
regenerate-from-asn1-source:
asn1c -gen-PER -fnative-types $(HNBAP_ASN1)/HNBAP-CommonDataTypes.asn $(HNBAP_ASN1)/HNBAP-Constants.asn $(HNBAP_ASN1)/HNBAP-IEs.asn $(HNBAP_ASN1)/HNBAP-PDU.asn
# remove the local copy of the runtime code
-rm ANY.* BOOLEAN.* INTEGER.* NativeEnumerated.* NativeInteger.* OBJECT_IDENTIFIER.* asn_* OCTET_STRING.* converter-sample.c per_* xer_* constr* der_* ber_* BIT_STRING.*
asn1c -R -gen-PER -fnative-types $(HNBAP_ASN1)/HNBAP-CommonDataTypes.asn $(HNBAP_ASN1)/HNBAP-Constants.asn $(HNBAP_ASN1)/HNBAP-IEs.asn $(HNBAP_ASN1)/HNBAP-PDU.asn
# change include style to `#include <dir/foo.h>'
$(top_srcdir)/move-asn1-header-files.sh osmocom/hnbap $(ASN_MODULE_INC)
# Finally copy *.c from buildir to srcdir:

@ -1169,10 +1169,8 @@ libosmo_asn1_ranap_la_LIBADD=$(ASN1C_LDADD)
regen: regenerate-from-asn1-source
regenerate-from-asn1-source:
ASN1C_PREFIX="RANAP_" asn1c -gen-PER $(top_srcdir)/asn1/ranap/RANAP-CommonDataTypes.asn $(top_srcdir)/asn1/ranap/RANAP-Constants.asn $(top_srcdir)/asn1/ranap/RANAP-IEs.asn $(top_srcdir)/asn1/ranap/RANAP-PDU.asn
@rm ANY.* BOOLEAN.* INTEGER.* NativeEnumerated.* NativeInteger.* NULL.* OBJECT_IDENTIFIER.* asn_* OCTET_STRING.* converter-sample.c per_* xer_* constr* der_* ber_* BIT_STRING.*
# some fixups in erroneous code that asn1c generates
sed -i '6i#include <constr_CHOICE.h>' RANAP_ChosenEncryptionAlgorithm.h RANAP_ChosenIntegrityProtectionAlgorithm.h RANAP_IMSI.h RANAP_PLMNidentity.h RANAP_RAB-ReleaseFailedList.c RANAP_RAB-ReleaseList.c RANAP_RAB-SetupOrModifyList.c RANAP_ResetResourceList.c RANAP_ResetResourceAckList.c
ASN1C_PREFIX="RANAP_" asn1c -R -gen-PER $(top_srcdir)/asn1/ranap/RANAP-CommonDataTypes.asn $(top_srcdir)/asn1/ranap/RANAP-Constants.asn $(top_srcdir)/asn1/ranap/RANAP-IEs.asn $(top_srcdir)/asn1/ranap/RANAP-PDU.asn
sed -i '7i#include <constr_CHOICE.h>' RANAP_ChosenEncryptionAlgorithm.h RANAP_ChosenIntegrityProtectionAlgorithm.h RANAP_IMSI.h RANAP_PLMNidentity.h RANAP_RAB-ReleaseFailedList.c RANAP_RAB-ReleaseList.c RANAP_RAB-SetupOrModifyList.c RANAP_ResetResourceList.c RANAP_ResetResourceAckList.c
sed -i 's/Member/MemberA/' RANAP_LA-LIST.[ch]
sed -i 's/Member/MemberB/' RANAP_RABParametersList.[ch]
sed -i 's/Member/MemberC/' RANAP_AuthorisedPLMNs.[ch]

@ -81,9 +81,7 @@ libosmo_asn1_rua_la_LIBADD=$(ASN1C_LDADD)
regen: regenerate-from-asn1-source
regenerate-from-asn1-source:
ASN1C_PREFIX="RUA_" asn1c -gen-PER $(top_srcdir)/asn1/rua/RUA-CommonDataTypes.asn $(top_srcdir)/asn1/rua/RUA-Constants.asn $(top_srcdir)/asn1/rua/RUA-IEs.asn $(top_srcdir)/asn1/rua/RUA-PDU.asn
# remove the local copy of the runtime code
@rm ANY.* BOOLEAN.* INTEGER.* NativeEnumerated.* NativeInteger.* OBJECT_IDENTIFIER.* asn_* OCTET_STRING.* converter-sample.c per_* xer_* constr* der_* ber_* BIT_STRING.*
ASN1C_PREFIX="RUA_" asn1c -R -gen-PER $(top_srcdir)/asn1/rua/RUA-CommonDataTypes.asn $(top_srcdir)/asn1/rua/RUA-Constants.asn $(top_srcdir)/asn1/rua/RUA-IEs.asn $(top_srcdir)/asn1/rua/RUA-PDU.asn
# change include style to `#include <dir/foo.h>'
$(top_srcdir)/move-asn1-header-files.sh osmocom/rua $(ASN_MODULE_INC)
# Finally copy *.c from buildir to srcdir:

@ -135,9 +135,7 @@ libosmo_asn1_sabp_la_LIBADD=$(ASN1C_LDADD)
regen: regenerate-from-asn1-source
regenerate-from-asn1-source:
ASN1C_PREFIX="SABP_" asn1c -gen-PER $(top_srcdir)/asn1/sabp/SABP-CommonDataTypes.asn $(top_srcdir)/asn1/sabp/SABP-Constants.asn $(top_srcdir)/asn1/sabp/SABP-IEs.asn $(top_srcdir)/asn1/sabp/SABP-PDU.asn
# remove the local copy of the runtime code
@rm ANY.* INTEGER.* NativeEnumerated.* NativeInteger.* asn_* OCTET_STRING.* converter-sample.c per_* xer_* constr* der_* ber_* BIT_STRING.*
ASN1C_PREFIX="SABP_" asn1c -R -gen-PER $(top_srcdir)/asn1/sabp/SABP-CommonDataTypes.asn $(top_srcdir)/asn1/sabp/SABP-Constants.asn $(top_srcdir)/asn1/sabp/SABP-IEs.asn $(top_srcdir)/asn1/sabp/SABP-PDU.asn
# change include style to `#include <dir/foo.h>'
sed -i 's/Member/MemberA/' SABP_MessageStructure.[ch]
sed -i 's/Member/MemberB/' SABP_Criticality-Diagnostics.[ch]

Loading…
Cancel
Save