build: use $top_srcdir instead of ../

This commit is contained in:
Neels Hofmeyr 2016-02-29 14:28:00 +01:00
parent 92b13bc875
commit f67803684f
4 changed files with 10 additions and 10 deletions

View File

@ -20,7 +20,7 @@ ranap_encoder.c ranap_decoder.c: $(ASN1_ROOT)/ranap/RANAP-PDU-Contents.asn $(ASN
# this is ugly ^. ranap_ies_defs.h is generated from asn1tostruct.py here, but
# it should live in include/osmocom/ranap/.
AM_CFLAGS = -I../include $(OSMOCORE_CFLAGS) $(OSMOVTY_CFLAGS) $(OSMOGSM_CFLAGS) $(OSMONETIF_CFLAGS) $(ASN1C_CFLAGS) $(OSMOSIGTRAN_CFLAGS)
AM_CFLAGS = -I$(top_srcdir)/include $(OSMOCORE_CFLAGS) $(OSMOVTY_CFLAGS) $(OSMOGSM_CFLAGS) $(OSMONETIF_CFLAGS) $(ASN1C_CFLAGS) $(OSMOSIGTRAN_CFLAGS)
COMMON_LDADD = -lsctp
# build the shared RANAP library

View File

@ -232,7 +232,7 @@ ASN_MODULE_INC= \
PrivateMessage.h \
IE.h
AM_CFLAGS = -I../../include $(ASN1C_CFLAGS) $(OSMOCORE_CFLAGS)
AM_CFLAGS = -I$(top_srcdir)/include $(ASN1C_CFLAGS) $(OSMOCORE_CFLAGS)
noinst_LIBRARIES=libosmo-asn1-hnbap.a
libosmo_asn1_hnbap_a_SOURCES=$(ASN_MODULE_SOURCES)
@ -241,8 +241,8 @@ 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
asn1c -gen-PER -fnative-types $(top_srcdir)/asn1/hnbap/HNBAP-CommonDataTypes.asn $(top_srcdir)/asn1/hnbap/HNBAP-Constants.asn $(top_srcdir)/asn1/hnbap/HNBAP-IEs.asn $(top_srcdir)/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.*
# change include style to `#include <dir/foo.h>'
../../move-asn1-header-files.sh osmocom/hnbap $(ASN_MODULE_INC)
$(top_srcdir)/move-asn1-header-files.sh osmocom/hnbap $(ASN_MODULE_INC)

View File

@ -1160,7 +1160,7 @@ ASN_MODULE_INC= \
RANAP_LeftMBMSBearerService-IEs.h \
RANAP_UnsuccessfulLinking-IEs.h
AM_CFLAGS = -I../../include $(ASN1C_CFLAGS) $(OSMOCORE_CFLAGS)
AM_CFLAGS = -I$(top_srcdir)/include $(ASN1C_CFLAGS) $(OSMOCORE_CFLAGS)
noinst_LTLIBRARIES=libosmo-asn1-ranap.la
libosmo_asn1_ranap_la_SOURCES=$(ASN_MODULE_SRC)
@ -1169,7 +1169,7 @@ libosmo_asn1_ranap_la_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
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
@ -1187,5 +1187,5 @@ regenerate-from-asn1-source:
sed -i 's/Member/MemberM/' RANAP_PLMNs-in-shared-network.[ch]
sed -i 's/Member/MemberN/' RANAP_RABDataVolumeReport.[ch]
# change include style to `#include <dir/foo.h>'
../../move-asn1-header-files.sh osmocom/ranap $(ASN_MODULE_INC)
$(top_srcdir)/move-asn1-header-files.sh osmocom/ranap $(ASN_MODULE_INC)

View File

@ -72,7 +72,7 @@ ASN_MODULE_INC= \
RUA_PrivateMessage.h \
RUA_IE.h
AM_CFLAGS = -I../../include $(ASN1C_CFLAGS) $(OSMOCORE_CFLAGS)
AM_CFLAGS = -I$(top_srcdir)/include $(ASN1C_CFLAGS) $(OSMOCORE_CFLAGS)
noinst_LIBRARIES=libosmo-asn1-rua.a
libosmo_asn1_rua_a_SOURCES=$(ASN_MODULE_SOURCES)
@ -81,9 +81,9 @@ 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
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.*
# change include style to `#include <dir/foo.h>'
../../move-asn1-header-files.sh osmocom/rua $(ASN_MODULE_INC)
$(top_srcdir)/move-asn1-header-files.sh osmocom/rua $(ASN_MODULE_INC)