Add VES stndDefined PM and subscription for O-DU.
[sim/o1-interface.git] / ntsimulator / deploy / base / build_ntsim-ng.sh
1 #!/bin/bash
2
3 # /*************************************************************************
4 # *
5 # * Copyright 2020 highstreet technologies GmbH and others
6 # *
7 # * Licensed under the Apache License, Version 2.0 (the "License");
8 # * you may not use this file except in compliance with the License.
9 # * You may obtain a copy of the License at
10 # *
11 # *     http://www.apache.org/licenses/LICENSE-2.0
12 # *
13 # * Unless required by applicable law or agreed to in writing, software
14 # * distributed under the License is distributed on an "AS IS" BASIS,
15 # * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # * See the License for the specific language governing permissions and
17 # * limitations under the License.
18 # ***************************************************************************/
19
20 files=(
21     "core/container.c"
22     "core/context.c"
23     "core/docker.c"
24     "core/framework.c"
25     "core/test.c"
26     "core/session.c"
27     "core/nc_config.c"
28     "core/app/supervisor.c"
29     "core/app/app_common.c"
30     "core/app/manager.c"
31     "core/app/manager_context.c"
32     "core/app/manager_operations.c"
33     "core/app/manager_actions.c"
34     "core/app/manager_sysrepo.c"
35     "core/app/network_function.c"
36     "core/app/nf_oran_du.c"
37     "core/app/blank.c"
38     "core/datastore/schema.c"
39     "core/datastore/operations.c"
40     "core/datastore/populate.c"
41     "core/datastore/populate_aux.c"
42     "core/datastore/populate_late_resolve.c"
43     "core/datastore/populate_recursive.c"
44     "core/datastore/populate_validation.c"
45     "core/faults/faults.c"
46     "core/faults/faults_counters.c"
47     "core/faults/faults_processing.c"
48     "core/faults/faults_logic.c"
49     "core/faults/faults_ves.c"
50     "utils/debug_utils.c"
51     "utils/log_utils.c"
52     "utils/rand_utils.c"
53     "utils/type_utils.c"
54     "utils/sys_utils.c"
55     "utils/http_client.c"
56     "utils/nts_utils.c"
57     "utils/nc_client.c"
58     "utils/network_emulation.c"
59     "features/ves_pnf_registration/ves_pnf_registration.c"
60     "features/ves_heartbeat/ves_heartbeat.c"
61     "features/ves_file_ready/ves_file_ready.c"
62     "features/manual_notification/manual_notification.c"
63     "features/netconf_call_home/netconf_call_home.c"
64     "features/web_cut_through/web_cut_through.c"
65     "main.c"
66 )
67
68 libs=(
69     "argp"
70     "m"
71     "yang"
72     "sysrepo"
73     "netconf2"
74     "cjson"
75     "curl"
76     "pthread"
77 )
78
79 sources=""
80 for i in ${files[@]}
81 do
82     sources="$sources source/$i"
83 done
84
85 libraries=""
86 for i in ${libs[@]}
87 do
88     libraries="$libraries -l$i"
89 done
90
91 output="ntsim-ng"
92
93 build="gcc -Wall -pedantic -Isource $sources $libraries -o$output"
94 if [[ -n "${BUILD_WITH_DEBUG}" ]]; then
95     build="gcc -g -Wall -pedantic -Isource $sources $libraries -o$output"
96 fi
97
98 echo "Building with command: $build"
99 $build
100 if [ "$?" -ne "0" ]; then
101   echo "Build failed"
102   exit 1
103 fi