2020-04-26 19:36:05 +00:00
|
|
|
# Copyright (C) 2019 by Sukchan Lee <acetcom@gmail.com>
|
|
|
|
|
|
|
|
# This file is part of Open5GS.
|
|
|
|
|
|
|
|
# This program is free software: you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU Affero General Public License as published by
|
|
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
smf_conf = configuration_data()
|
|
|
|
|
|
|
|
smf_headers = ('''
|
|
|
|
net/if.h
|
2021-03-15 01:01:55 +00:00
|
|
|
netinet/ip.h
|
|
|
|
netinet/ip6.h
|
|
|
|
netinet/ip_icmp.h
|
|
|
|
netinet/icmp6.h
|
2020-04-26 19:36:05 +00:00
|
|
|
'''.split())
|
|
|
|
|
|
|
|
foreach h : smf_headers
|
|
|
|
if cc.has_header(h)
|
|
|
|
define = 'HAVE_' + h.underscorify().to_upper()
|
|
|
|
smf_conf.set(define, 1)
|
|
|
|
endif
|
|
|
|
endforeach
|
|
|
|
|
|
|
|
configure_file(output : 'smf-config.h', configuration : smf_conf)
|
|
|
|
|
|
|
|
libsmf_sources = files('''
|
|
|
|
event.h
|
|
|
|
timer.h
|
|
|
|
context.h
|
|
|
|
smf-sm.h
|
|
|
|
gtp-path.h
|
|
|
|
s5c-build.h
|
|
|
|
s5c-handler.h
|
|
|
|
fd-path.h
|
|
|
|
gx-handler.h
|
|
|
|
pfcp-path.h
|
|
|
|
n4-build.h
|
|
|
|
n4-handler.h
|
2021-01-01 02:07:08 +00:00
|
|
|
binding.h
|
2021-03-08 12:25:09 +00:00
|
|
|
nnrf-build.h
|
2020-05-18 21:00:37 +00:00
|
|
|
nnrf-handler.h
|
2020-06-17 05:22:28 +00:00
|
|
|
nudm-build.h
|
|
|
|
nudm-handler.h
|
2020-07-02 05:50:23 +00:00
|
|
|
nsmf-handler.h
|
2020-06-17 05:22:28 +00:00
|
|
|
namf-build.h
|
2021-01-01 02:07:08 +00:00
|
|
|
namf-handler.h
|
2020-12-11 19:03:20 +00:00
|
|
|
npcf-build.h
|
|
|
|
npcf-handler.h
|
2020-05-18 21:00:37 +00:00
|
|
|
sbi-path.h
|
2020-06-17 05:22:28 +00:00
|
|
|
gsm-build.h
|
|
|
|
gsm-handler.h
|
|
|
|
nas-path.h
|
|
|
|
ngap-build.h
|
|
|
|
ngap-handler.h
|
|
|
|
ngap-path.h
|
2020-04-26 19:36:05 +00:00
|
|
|
|
|
|
|
init.c
|
|
|
|
event.c
|
|
|
|
timer.c
|
|
|
|
context.c
|
|
|
|
smf-sm.c
|
2020-06-17 05:22:28 +00:00
|
|
|
nf-sm.c
|
|
|
|
gsm-sm.c
|
2020-04-26 19:36:05 +00:00
|
|
|
pfcp-sm.c
|
|
|
|
gtp-path.c
|
|
|
|
s5c-build.c
|
2022-01-18 02:23:40 +00:00
|
|
|
s5c-handler.c
|
2020-04-26 19:36:05 +00:00
|
|
|
fd-path.c
|
2021-06-21 13:36:38 +00:00
|
|
|
gx-path.c
|
|
|
|
s6b-path.c
|
2022-01-18 02:23:40 +00:00
|
|
|
gx-handler.c
|
2020-04-26 19:36:05 +00:00
|
|
|
pfcp-path.c
|
|
|
|
n4-build.c
|
|
|
|
n4-handler.c
|
2021-01-01 02:07:08 +00:00
|
|
|
binding.c
|
2021-03-08 12:25:09 +00:00
|
|
|
nnrf-build.c
|
2020-05-18 21:00:37 +00:00
|
|
|
nnrf-handler.c
|
2020-06-17 05:22:28 +00:00
|
|
|
nudm-build.c
|
|
|
|
nudm-handler.c
|
|
|
|
nsmf-handler.c
|
|
|
|
namf-build.c
|
2021-01-01 02:07:08 +00:00
|
|
|
namf-handler.c
|
2020-12-11 19:03:20 +00:00
|
|
|
npcf-build.c
|
|
|
|
npcf-handler.c
|
2020-05-18 21:00:37 +00:00
|
|
|
sbi-path.c
|
2020-06-17 05:22:28 +00:00
|
|
|
gsm-build.c
|
|
|
|
gsm-handler.c
|
|
|
|
nas-path.c
|
|
|
|
ngap-build.c
|
|
|
|
ngap-handler.c
|
|
|
|
ngap-path.c
|
2020-04-26 19:36:05 +00:00
|
|
|
'''.split())
|
|
|
|
|
|
|
|
libsmf = static_library('smf',
|
|
|
|
sources : libsmf_sources,
|
2020-05-18 21:00:37 +00:00
|
|
|
dependencies : [libapp_dep,
|
|
|
|
libsbi_dep,
|
2020-06-17 05:22:28 +00:00
|
|
|
libngap_dep,
|
|
|
|
libnas_5gs_dep,
|
2020-05-18 21:00:37 +00:00
|
|
|
libdiameter_gx_dep,
|
2021-06-21 13:36:38 +00:00
|
|
|
libdiameter_s6b_dep,
|
2020-05-18 21:00:37 +00:00
|
|
|
libgtp_dep,
|
2021-02-08 19:25:40 +00:00
|
|
|
libpfcp_dep],
|
2020-04-26 19:36:05 +00:00
|
|
|
install : false)
|
|
|
|
|
|
|
|
libsmf_dep = declare_dependency(
|
|
|
|
link_with : libsmf,
|
2020-05-18 21:00:37 +00:00
|
|
|
dependencies : [libapp_dep,
|
|
|
|
libsbi_dep,
|
2020-06-17 05:22:28 +00:00
|
|
|
libngap_dep,
|
|
|
|
libnas_5gs_dep,
|
2020-05-18 21:00:37 +00:00
|
|
|
libdiameter_gx_dep,
|
2021-06-21 13:36:38 +00:00
|
|
|
libdiameter_s6b_dep,
|
2020-05-18 21:00:37 +00:00
|
|
|
libgtp_dep,
|
2021-02-08 19:25:40 +00:00
|
|
|
libpfcp_dep])
|
2020-04-26 19:36:05 +00:00
|
|
|
|
|
|
|
smf_sources = files('''
|
|
|
|
app.c
|
|
|
|
../main.c
|
|
|
|
'''.split())
|
|
|
|
|
|
|
|
executable('open5gs-smfd',
|
|
|
|
sources : smf_sources,
|
|
|
|
c_args : '-DDEFAULT_CONFIG_FILENAME="@0@/smf.yaml"'.format(open5gs_sysconfdir),
|
|
|
|
include_directories : srcinc,
|
2020-07-14 01:53:41 +00:00
|
|
|
dependencies : libsmf_dep,
|
2020-04-26 19:36:05 +00:00
|
|
|
install_rpath : libdir,
|
|
|
|
install : true)
|