aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2021-10-23 01:16:48 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2021-10-26 16:42:07 +0200
commitb292db8923e2b31db8dd6a99718bce09079512c5 (patch)
treeed780c5abbf23519a594a73713a8ef859e6dd928
parent861d9d2ebf81c7830277bca719f311191abc468a (diff)
src/*/Makefile.am: Use asn1c -R to avoid generating runtime code
-rw-r--r--src/hnbap/Makefile.am4
-rw-r--r--src/ranap/Makefile.am6
-rw-r--r--src/rua/Makefile.am4
-rw-r--r--src/sabp/Makefile.am4
4 files changed, 5 insertions, 13 deletions
diff --git a/src/hnbap/Makefile.am b/src/hnbap/Makefile.am
index 7835bcd..79c0ac4 100644
--- a/src/hnbap/Makefile.am
+++ b/src/hnbap/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:
diff --git a/src/ranap/Makefile.am b/src/ranap/Makefile.am
index 4ba3a79..d5dc4fc 100644
--- a/src/ranap/Makefile.am
+++ b/src/ranap/Makefile.am
@@ -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]
diff --git a/src/rua/Makefile.am b/src/rua/Makefile.am
index c848639..493a466 100644
--- a/src/rua/Makefile.am
+++ b/src/rua/Makefile.am
@@ -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:
diff --git a/src/sabp/Makefile.am b/src/sabp/Makefile.am
index 5e1b557..faace13 100644
--- a/src/sabp/Makefile.am
+++ b/src/sabp/Makefile.am
@@ -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]