当前位置: 首页 > article >正文

kamailio源文件modules.lst的内容解释

在执行make cfg 后,在kamailio/src目录下有一个文件modules.lst,内容如下:

# this file is autogenerated by make modules-cfg

# the list of sub-directories with modules
modules_dirs:=modules

# the list of module groups to compile
cfg_group_include=

# the list of extra modules to compile
include_modules= 

# the list of static modules
static_modules= 

# the list of modules to skip from compile list
skip_modules= 

# the list of modules to exclude from compile list
exclude_modules= acc_json acc_radius app_java app_lua app_perl app_python app_python3 app_python3s app_ruby app_ruby_proc auth_ephemeral auth_radius cdp cdp_avp cnxcc cplc crypto db2_ldap db_berkeley db_cassandra db_mongodb db_mysql db_oracle db_perlvdb db_postgres db_redis db_sqlite db_unixodbc dialplan dnssec erlang evapi gcrypt geoip geoip2 gzcompress h350 http_async_client http_client ims_auth ims_charging ims_dialog ims_diameter_server ims_icscf ims_ipsec_pcscf ims_isc ims_ocs ims_qos ims_qos_npn ims_registrar_pcscf ims_registrar_scscf ims_usrloc_pcscf ims_usrloc_scscf jansson janssonrpcc json jsonrpcc jwt kafka kazoo lcr ldap log_systemd lost lwsc memcached microhttpd misc_radius mqtt nats ndb_cassandra ndb_mongodb ndb_redis nghttp2 nsq outbound peering phonenum presence presence_conference presence_dfks presence_dialoginfo presence_mwi presence_profile presence_reginfo presence_xml pua pua_bla pua_dialoginfo pua_json pua_reginfo pua_rpc pua_usrloc pua_xmpp rabbitmq regex rls rtp_media_server ruxc sctp secsipid secsipid_proc slack snmpstats stirshaken systemdops tls tls_wolfssl tlsa topos_redis utils uuid websocket xcap_client xcap_server xhttp_pi xmlops xmlrpc xmpp $(skip_modules)

modules_all= $(filter-out modules/CVS modules/CMakeLists.txt, $(wildcard modules/*))
modules_noinc= $(filter-out $(addprefix modules/, $(exclude_modules) $(static_modules)), $(modules_all)) 
modules= $(filter-out $(modules_noinc), $(addprefix modules/, $(include_modules) )) $(modules_noinc) 
modules_configured:=1

这段代码是一个Makefile片段,用于配置和选择要编译的模块。它定义了一些变量和规则,用于控制哪些模块应该被编译,哪些模块应该被排除。以下是对代码的详细解释:

1. 模块目录

modules_dirs:=modules
  • modules_dirs 变量指定了包含模块的子目录。这里只有一个目录 modules

2. 模块组

cfg_group_include=
  • cfg_group_include 变量用于指定要编译的模块组。这里为空,表示没有特定的模块组被包含。

3. 额外模块

include_modules= 
  • include_modules 变量用于指定额外的模块,这些模块将被包含在编译列表中。这里为空,表示没有额外的模块被包含。

4. 静态模块

static_modules= 
  • static_modules 变量用于指定静态模块。静态模块通常是必须包含的模块。这里为空,表示没有静态模块。

5. 跳过模块

skip_modules= 
  • skip_modules 变量用于指定要跳过的模块。这些模块将不会被编译。这里为空,表示没有模块被跳过。

6. 排除模块

exclude_modules= acc_json acc_radius app_java app_lua app_perl app_python app_python3 app_python3s app_ruby app_ruby_proc auth_ephemeral auth_radius cdp cdp_avp cnxcc cplc crypto db2_ldap db_berkeley db_cassandra db_mongodb db_mysql db_oracle db_perlvdb db_postgres db_redis db_sqlite db_unixodbc dialplan dnssec erlang evapi gcrypt geoip geoip2 gzcompress h350 http_async_client http_client ims_auth ims_charging ims_dialog ims_diameter_server ims_icscf ims_ipsec_pcscf ims_isc ims_ocs ims_qos ims_qos_npn ims_registrar_pcscf ims_registrar_scscf ims_usrloc_pcscf ims_usrloc_scscf jansson janssonrpcc json jsonrpcc jwt kafka kazoo lcr ldap log_systemd lost lwsc memcached microhttpd misc_radius mqtt nats ndb_cassandra ndb_mongodb ndb_redis nghttp2 nsq outbound peering phonenum presence presence_conference presence_dfks presence_dialoginfo presence_mwi presence_profile presence_reginfo presence_xml pua pua_bla pua_dialoginfo pua_json pua_reginfo pua_rpc pua_usrloc pua_xmpp rabbitmq regex rls rtp_media_server ruxc sctp secsipid secsipid_proc slack snmpstats stirshaken systemdops tls tls_wolfssl tlsa topos_redis utils uuid websocket xcap_client xcap_server xhttp_pi xmlops xmlrpc xmpp $(skip_modules)
  • exclude_modules 变量列出了所有要排除的模块。这些模块将不会被编译。列表中包含了许多模块名称,并且还包含了 $(skip_modules),这意味着 skip_modules 中的模块也会被排除。

7. 所有模块

modules_all= $(filter-out modules/CVS modules/CMakeLists.txt, $(wildcard modules/*))
  • modules_all 变量列出了 modules 目录下的所有模块,但排除了 CVSCMakeLists.txt 文件。

8. 不包含的模块

modules_noinc= $(filter-out $(addprefix modules/, $(exclude_modules) $(static_modules)), $(modules_all)) 
  • modules_noinc 变量列出了所有不被包含的模块。它从 modules_all 中排除了 exclude_modulesstatic_modules 中指定的模块。

9. 最终模块列表

modules= $(filter-out $(modules_noinc), $(addprefix modules/, $(include_modules) )) $(modules_noinc) 
  • modules 变量是最终的模块列表。它包含了 include_modules 中指定的模块,并且排除了 modules_noinc 中的模块。

10. 配置标志

modules_configured:=1
  • modules_configured 变量被设置为 1,表示模块配置已经完成。

总结

这段代码的主要目的是根据配置变量(如 include_modulesexclude_modulesstatic_modules 等)来生成最终的模块列表 modules,以便在编译时只编译需要的模块。通过这种方式,可以灵活地控制哪些模块被包含在编译过程中,哪些模块被排除。

如果要编译所有模块,进行如下操作

如果你想要编译所有模块,可以按照以下步骤操作:

1. 修改 exclude_modules 变量

将所有需要排除的模块都从 exclude_modules 中移除,确保没有模块被排除。你可以直接清空 exclude_modules 变量,或者确保没有任何模块在其中。

exclude_modules = 

2. 清空 include_modulesstatic_modules

确保没有在 include_modulesstatic_modules 中指定特定的模块,这样所有模块都会按照默认的设置进行编译。

include_modules = 
static_modules = 

3. 保持 modules_all 变量

保持原样,不需要做任何修改。modules_all 会列出所有的模块。

modules_all = $(filter-out modules/CVS modules/CMakeLists.txt, $(wildcard modules/*))

4. 重新生成配置文件

完成上述修改后,重新运行 make modules-cfg 来重新生成配置文件。所有模块应该都包含在内。

5. 编译 Kamailio

最后,运行 make 来开始编译,所有模块都会被编译。

make

通过这些步骤,你可以确保编译所有的模块。如果之前已经修改过配置文件,只需清空排除和特定包含的模块设置,默认情况下会编译所有模块。

最终的内容

如果你想要编译所有模块,最终的配置文件内容应该类似于以下内容:

# this file is autogenerated by make modules-cfg

# the list of sub-directories with modules
modules_dirs := modules

# the list of module groups to compile
cfg_group_include =

# the list of extra modules to compile
include_modules = 

# the list of static modules
static_modules = 

# the list of modules to skip from compile list
skip_modules = 

# the list of modules to exclude from compile list
exclude_modules = 

# the list of modules that will be compiled
modules_all = $(filter-out modules/CVS modules/CMakeLists.txt, $(wildcard modules/*))

# the list of modules to compile (no exclusions or specific includes)
modules_noinc = $(modules_all) 

modules = $(modules_noinc)

modules_configured := 1

解释:

  1. include_modules = static_modules = :这两个变量是空的,意味着没有额外指定要包含或静态编译的模块。
  2. exclude_modules = :这个变量是空的,意味着没有模块被排除。
  3. modules_noinc = $(modules_all):这个变量包含了所有模块,因为没有排除任何模块。
  4. modules = $(modules_noinc):最终的 modules 变量包含了所有模块,即所有模块都会被编译。

结果:

通过这些修改,Kamailio 将编译所有模块,没有任何排除或指定的模块。你只需要执行 make 来编译所有模块了。


http://www.kler.cn/a/531522.html

相关文章:

  • 读书笔记 | 《最小阻力之路》:用结构思维重塑人生愿景
  • PyTorch数据建模
  • 给AI加知识库
  • 【实战篇】Android安卓本地离线实现视频检测人脸
  • Java手写简单Merkle树
  • 【Linux系统】信号:信号保存 / 信号处理、内核态 / 用户态、操作系统运行原理(中断)
  • 通信方式、点对点通信、集合通信
  • SpringBoot中关于knife4j 中的一些相关注解
  • 鸢尾花书《编程不难》01---基本介绍和Jupyterlab的上手
  • 无人机PX4飞控 | PX4源码添加自定义uORB消息并保存到日志
  • Codeforces Round 1002 (Div. 2)(A-D)
  • FBX SDK的使用:读取Mesh
  • centos stream 9 安装 libstdc++-static静态库
  • 【优先算法】专题——前缀和
  • 洛谷[USACO08DEC] Patting Heads S
  • 详解Linux系统的终端(Terminal)以及分类(各种tty开头的设备文件)
  • 蓝桥杯python基础算法(2-1)——排序
  • PHP Composer:高效依赖管理工具详解
  • 鲸鱼算法 matlab pso
  • Python基础-字符串和编码
  • 8266使用websocket库
  • SpringCloud篇 微服务架构
  • Leetcode 3444. Minimum Increments for Target Multiples in an Array
  • OSCP - Proving Grounds - Roquefort
  • 基于物联网技术的实时数据流可视化研究(论文+源码)
  • 高效接口限流:基于自定义注解与RateLimiter的实践