aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2015-12-16 13:07:10 +0100
committerHarald Welte <laforge@gnumonks.org>2015-12-16 13:14:10 +0100
commitfd5db064cb094ed5b0837dbdf7d5f9c2ed7d9819 (patch)
tree4b7859c616c7a91efc8ab0761c3504a9056d790d /src
parent3297dbaaa7519a5eed95c6acdbf63974b08e9b0e (diff)
Re-add the 'regen' targets lost in the automake transition
This might need a lot of cleanup for out-of-source-tree builds and the like, but let's not spend time on this now. The old Makefile also didn't support that. But loosing the ability to regenerate the C source is not an option either.
Diffstat (limited to 'src')
-rw-r--r--src/hnbap/Makefile.am7
-rw-r--r--src/ranap/Makefile.am9
-rw-r--r--src/rua/Makefile.am7
3 files changed, 23 insertions, 0 deletions
diff --git a/src/hnbap/Makefile.am b/src/hnbap/Makefile.am
index 920b8fc..a9e8163 100644
--- a/src/hnbap/Makefile.am
+++ b/src/hnbap/Makefile.am
@@ -238,3 +238,10 @@ noinst_LIBRARIES=libosmo-asn1-hnbap.a
libosmo_asn1_hnbap_a_SOURCES=$(ASN_MODULE_SOURCES)
include_HEADERS = $(ASN_MODULE_INC)
libosmo_asn1_hnbap_a_LIBADD=$(ASN1C_LDADD)
+
+regen: regenerate-from-asn1-source
+
+regenerate-from-asn1-source:
+ asn1c -gen-PER -fnative-types ../../asn1/hnbap/HNBAP-CommonDataTypes.asn ../../asn1/hnbap/HNBAP-Constants.asn ../../asn1/hnbap/HNBAP-IEs.asn ../../asn1/hnbap/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.*
diff --git a/src/ranap/Makefile.am b/src/ranap/Makefile.am
index 59575ed..ad86020 100644
--- a/src/ranap/Makefile.am
+++ b/src/ranap/Makefile.am
@@ -1044,3 +1044,12 @@ noinst_LIBRARIES=libosmo-asn1-ranap.a
libosmo_asn1_ranap_a_SOURCES=$(ASN_MODULE_SRC)
include_HEADERS=$(ASN_MODULE_INC)
libosmo_asn1_ranap_a_LIBADD=$(ASN1C_LDADD)
+
+regen: regenerate-from-asn1-source
+
+regenerate-from-asn1-source:
+ ASN1C_PREFIX="RANAP_" asn1c -gen-PER ../../asn1/ranap/RANAP-CommonDataTypes.asn ../../asn1/ranap/RANAP-Constants.asn ../../asn1/ranap/RANAP-IEs.asn ../../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
+ sed -i 's/Member/MemberA/' RANAP_LA-LIST.[ch] RANAP_SDU-Parameters.[ch] RANAP_RABParametersList.[ch] RANAP_AuthorisedPLMNs.[ch]
diff --git a/src/rua/Makefile.am b/src/rua/Makefile.am
index 2690252..c93b801 100644
--- a/src/rua/Makefile.am
+++ b/src/rua/Makefile.am
@@ -79,3 +79,10 @@ libosmo_asn1_rua_a_SOURCES=$(ASN_MODULE_SOURCES)
include_HEADERS=$(ASN_MODULES_INC)
libosmo_asn1_rua_a_LIBADD=$(ASN1C_LDADD)
+regen: regenerate-from-asn1-source
+
+regenerate-from-asn1-source:
+ ASN1C_PREFIX="RUA_" asn1c -gen-PER ../../asn1/rua/RUA-CommonDataTypes.asn ../../asn1/rua/RUA-Constants.asn ../../asn1/rua/RUA-IEs.asn ../../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.*
+