blob: aeb75b24708957d68b048c02ff41243f5c1cd4b3 [file] [log] [blame]
Daniel Willmann29b9e002015-12-15 15:10:31 +01001SUBDIRS = hnbap rua ranap tests
2
Harald Weltea95d5a52016-01-03 16:22:16 +01003# Build {hnbap,rua,ranap}_{encoder,decoder}.c using asn1tostruct
Daniel Willmann29b9e002015-12-15 15:10:31 +01004ASN1_ROOT = $(top_builddir)/asn1/
5ASN1TOSTRUCT = $(ASN1_ROOT)/utils/asn1tostruct.py
Neels Hofmeyrc51f7352015-12-22 12:21:16 +01006BUILT_SOURCES = hnbap_decoder.c hnbap_encoder.c rua_decoder.c rua_encoder.c ranap_decoder.c ranap_encoder.c
7
Neels Hofmeyr0de6b942016-01-05 12:59:13 +01008hnbap_encoder.c hnbap_decoder.c hnbap_ies_defs.h: $(ASN1_ROOT)/hnbap/HNBAP-PDU-Contents.asn $(ASN1TOSTRUCT)
Daniel Willmann29b9e002015-12-15 15:10:31 +01009 $(ASN1TOSTRUCT) -f $<
10
Neels Hofmeyr0de6b942016-01-05 12:59:13 +010011rua_encoder.c rua_decoder.c rua_ies_defs.h: $(ASN1_ROOT)/rua/RUA-PDU-Contents.asn $(ASN1TOSTRUCT)
Daniel Willmann29b9e002015-12-15 15:10:31 +010012 $(ASN1TOSTRUCT) -p RUA_ -f $<
13
Neels Hofmeyr96979af2016-01-05 15:19:44 +010014ranap_encoder.c ranap_decoder.c: $(ASN1_ROOT)/ranap/RANAP-PDU-Contents.asn $(ASN1TOSTRUCT)
Daniel Willmann29b9e002015-12-15 15:10:31 +010015 $(ASN1TOSTRUCT) -p RANAP_ -f $<
Neels Hofmeyr96979af2016-01-05 15:19:44 +010016 mv ranap_ies_defs.h $(includedir)/osmocom/ranap/
17# this is ugly ^. ranap_ies_defs.h is generated from asn1tostruct.py here, but
18# it should live in include/osmocom/ranap/.
19# We also need to replace the include in the newly generated .c files:
20 sed -i 's,^#include "ranap_ies_defs.h",#include <osmocom/ranap/ranap_ies_defs.h>,' ranap_encoder.c ranap_decoder.c
Harald Weltea95d5a52016-01-03 16:22:16 +010021
Neels Hofmeyrc04a96c2016-01-04 18:03:31 +010022AM_CFLAGS = $(OSMOCORE_CFLAGS) $(OSMOVTY_CFLAGS) $(OSMOGSM_CFLAGS) $(OSMONETIF_CFLAGS) $(ASN1C_CFLAGS) $(OSMOSIGTRAN_CFLAGS) -I../include
Harald Weltea95d5a52016-01-03 16:22:16 +010023COMMON_LDADD = -lsctp
24
25# build the shared RANAP library
26#
27RANAP_LIBVERSION=0:0:0
28lib_LTLIBRARIES = libosmo-ranap.la
29libosmo_ranap_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(RANAP_LIBVERSION)
30libosmo_ranap_la_LIBADD = $(OSMOCORE_LIBS) $(OSMOGSM_LIBS) $(ASN1C_LIBS) $(COMMON_LDADD) ranap/libosmo-asn1-ranap.la
Harald Welte056984f2016-01-03 16:31:31 +010031libosmo_ranap_la_SOURCES = ranap_common.c ranap_encoder.c ranap_decoder.c ranap_msg_factory.c iu_helpers.c
Harald Weltea95d5a52016-01-03 16:22:16 +010032
Harald Weltea95d5a52016-01-03 16:22:16 +010033# build the actual HomeNodeB gateway
34#
35bin_PROGRAMS = osmo-hnbgw
36
37noinst_HEADERS = hnbap_common.h hnbap_ies_defs.h \
38 rua_common.h rua_ies_defs.h \
39 context_map.h hnbgw.h hnbgw_cn.h \
Harald Welte06bc5482016-01-03 17:54:24 +010040 hnbgw_hnbap.h hnbgw_rua.h hnbgw_ranap.h \
41 sccp_helpers.h
Harald Weltea95d5a52016-01-03 16:22:16 +010042
43osmo_hnbgw_SOURCES = hnbap_encoder.c hnbap_decoder.c hnbap_common.c \
44 rua_encoder.c rua_decoder.c rua_common.c \
Harald Welteb66c5d02016-01-03 18:04:28 +010045 rua_msg_factory.c sccp_helpers.c \
Harald Weltea95d5a52016-01-03 16:22:16 +010046 hnbgw.c hnbgw_hnbap.c hnbgw_rua.c hnbgw_ranap.c \
47 context_map.c hnbgw_cn.c
48
49osmo_hnbgw_LDADD = $(OSMOCORE_LIBS) $(OSMOVTY_LIBS) $(OSMOGSM_LIBS) \
50 $(ASN1C_LIBS) $(OSMOSIGTRAN_LIBS) $(COMMON_LDADD) \
51 hnbap/libosmo-asn1-hnbap.a rua/libosmo-asn1-rua.a \
52 libosmo-ranap.la
Neels Hofmeyr5aabad12016-01-04 15:23:09 +010053
54
55regen: regenerate-from-asn1-source
56
57regenerate-from-asn1-source:
58 make -C hnbap regen
59 make -C ranap regen
60 make -C rua regen