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

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.lryc.cn/news/532244.html

相关文章:

  • 亚远景-从SPICE到ASPICE:汽车软件开发的标准化演进
  • vue3 + ElementPlus 封装列表表格组件包含分页
  • 挑战项目 --- 微服务编程测评系统(在线OJ系统)
  • Med-R2:基于循证医学的检索推理框架:提升大语言模型医疗问答能力的新方法
  • Oh3.2项目升级到Oh5.0(鸿蒙Next)具体踩坑记录(一)
  • 【自动化办公】批量图片PDF自定义指定多个区域识别重命名,批量识别铁路货物运单区域内容改名,基于WPF和飞桨ocr深度学习模型的解决方案
  • Spring Boot篇
  • Unity3D学习笔记(二)
  • 个人毕业设计--基于HarmonyOS的旅行助手APP的设计与实现(挖坑)
  • 游戏引擎 Unity - Unity 打开项目、Unity Editor 添加简体中文语言包模块、Unity 项目设置为简体中文
  • python开发:爬虫示例——GET和POST请求处理
  • 开源数据分析工具 RapidMiner
  • Vue canvas画图画线例子,数据回显与隔离,点拖拽修改
  • Python实现CAN FD 通信(基于PCAN开发CAN FD测试工具)
  • LeetCode--347. 前 K 个高频元素/Golang中的堆(container/heap)
  • 关于大数据
  • 9-收纳的知识
  • 堆的实现——堆的应用(堆排序)
  • 机器学习6-全连接神经网络2
  • 基于 SpringBoot 的电影购票系统
  • C++SLT(三)——list
  • C++ Primer 算术运算符
  • 数据结构-堆和PriorityQueue
  • 【玩转 Postman 接口测试与开发2_017】第13章:在 Postman 中实现契约测试(Contract Testing)与 API 接口验证(下)
  • R语言 | 使用 ComplexHeatmap 绘制热图,分区并给对角线分区加黑边框
  • React图标库: 使用React Icons实现定制化图标效果
  • Python sider-ai-api库 — 访问Claude、llama、ChatGPT、gemini、o1等大模型API
  • DeepSeek、哪吒和数据库:厚积薄发的力量
  • DDD - 微服务架构模型_领域驱动设计(DDD)分层架构 vs 整洁架构(洋葱架构) vs 六边形架构(端口-适配器架构)
  • 第 1 天:UE5 C++ 开发环境搭建,全流程指南