2017-09-30 07:59:11 +02:00
|
|
|
################################################################################
|
2017-09-08 11:32:49 +02:00
|
|
|
#
|
2017-09-30 07:59:11 +02:00
|
|
|
# IRCd Modules
|
2017-09-08 11:32:49 +02:00
|
|
|
#
|
|
|
|
|
2017-09-30 07:59:11 +02:00
|
|
|
AM_CXXFLAGS = \
|
|
|
|
###
|
|
|
|
|
2016-07-20 20:55:46 +02:00
|
|
|
AM_CPPFLAGS = \
|
|
|
|
-I$(top_srcdir)/include \
|
2016-10-16 04:09:38 +02:00
|
|
|
@JS_CPPFLAGS@ \
|
2016-08-15 04:44:16 +02:00
|
|
|
@BOOST_CPPFLAGS@ \
|
MAPI IV. This iteration leverages the C++11 standardized RTTI.
* Simplifies the export declarations for module developers. While
MAPI III utilized a flexible key-value vector to eliminate positional
arguments in a header initializer, now the developer simply makes
a list of pointers to what they want to export for injection into
IRCd. Example:
mapi::header IRCD_MODULE
{
"mymod",
"My module adds a command, a hook, and a CLICAP",
&my_cmdtab,
&some_hook,
&clicaptab
};
* Distributes the handlers for items passed to the above vector.
Anyone can add a type-handler to the module system from anywhere in IRCd
(and other modules?) When your type is encountered a handler is called
providing the symbol name to read out of the module. Example in parser.cc:
mods::add_loader<Message>([]
(mod &loading, const std::string &symbol)
{
auto &msg(get<Message>(loading, symbol));
add_command(msg.name, msg);
});
2016-08-29 21:09:59 +02:00
|
|
|
-include $(top_srcdir)/include/ircd/ircd.h \
|
2017-08-23 22:55:58 +02:00
|
|
|
-include $(top_srcdir)/include/ircd/mapi.h \
|
2017-09-08 11:43:23 +02:00
|
|
|
###
|
2016-07-25 08:50:26 +02:00
|
|
|
|
2016-07-20 20:55:46 +02:00
|
|
|
AM_LDFLAGS = \
|
|
|
|
-L$(top_srcdir)/ircd \
|
2016-11-08 01:28:12 +01:00
|
|
|
@JS_LDFLAGS@ \
|
2017-09-08 11:43:23 +02:00
|
|
|
@BOOST_LDFLAGS@ \
|
|
|
|
###
|
2016-07-20 20:55:46 +02:00
|
|
|
|
|
|
|
AM_LDFLAGS += \
|
|
|
|
-avoid-version \
|
2016-11-08 01:28:12 +01:00
|
|
|
-module \
|
|
|
|
-Wl,-fuse-ld=gold \
|
|
|
|
-Wl,--shared \
|
|
|
|
-Wl,--export-dynamic \
|
2017-03-31 00:58:36 +02:00
|
|
|
-Wl,--no-gnu-unique \
|
2017-04-03 06:04:46 +02:00
|
|
|
-Wl,--no-allow-shlib-undefined \
|
2017-09-08 11:43:23 +02:00
|
|
|
$(PLATFORM_LDFLAGS) \
|
|
|
|
# -Wl,--no-undefined \
|
|
|
|
# -export-symbols-regex IRCD_MODULE* \
|
|
|
|
# -export-symbols-regex * \
|
|
|
|
###
|
2016-07-20 20:55:46 +02:00
|
|
|
|
2016-09-06 01:10:30 +02:00
|
|
|
moduledir=@moduledir@
|
2017-08-23 23:10:28 +02:00
|
|
|
root_la_SOURCES = root.cc
|
2016-09-10 23:58:50 +02:00
|
|
|
module_LTLIBRARIES = \
|
2017-08-23 23:39:41 +02:00
|
|
|
root.la \
|
|
|
|
###
|
|
|
|
|
2017-08-18 20:19:13 +02:00
|
|
|
# This puts the source in db/ but the installed
|
2017-10-01 12:11:54 +02:00
|
|
|
# library is db_X.so in the main modules dir.
|
2017-08-18 20:19:13 +02:00
|
|
|
db_moduledir = @moduledir@
|
|
|
|
db_db_events_la_SOURCES = db/events.cc
|
|
|
|
db_module_LTLIBRARIES = \
|
|
|
|
db/db_events.la \
|
|
|
|
###
|
|
|
|
|
2017-08-23 23:39:41 +02:00
|
|
|
# This puts the source in client/ but the installed
|
|
|
|
# library is client_X.so in the main modules dir.
|
|
|
|
client_moduledir = @moduledir@
|
|
|
|
client_client_versions_la_SOURCES = client/versions.cc
|
|
|
|
client_client_events_la_SOURCES = client/events.cc
|
|
|
|
client_client_account_la_SOURCES = client/account.cc
|
|
|
|
client_client_register_la_SOURCES = client/register.cc
|
|
|
|
client_client_login_la_SOURCES = client/login.cc
|
|
|
|
client_client_logout_la_SOURCES = client/logout.cc
|
|
|
|
client_client_sync_la_SOURCES = client/sync.cc
|
|
|
|
client_client_rooms_la_SOURCES = client/rooms.cc
|
|
|
|
client_client_publicrooms_la_SOURCES = client/publicrooms.cc
|
|
|
|
client_client_createroom_la_SOURCES = client/createroom.cc
|
|
|
|
client_client_pushrules_la_SOURCES = client/pushrules.cc
|
|
|
|
client_client_user_la_SOURCES = client/user.cc
|
|
|
|
client_client_voip_turnserver_la_SOURCES = client/voip/turnserver.cc
|
|
|
|
client_module_LTLIBRARIES = \
|
|
|
|
client/client_versions.la \
|
|
|
|
client/client_events.la \
|
|
|
|
client/client_account.la \
|
|
|
|
client/client_register.la \
|
|
|
|
client/client_login.la \
|
|
|
|
client/client_logout.la \
|
|
|
|
client/client_sync.la \
|
|
|
|
client/client_rooms.la \
|
|
|
|
client/client_publicrooms.la \
|
|
|
|
client/client_createroom.la \
|
|
|
|
client/client_pushrules.la \
|
|
|
|
client/client_user.la \
|
|
|
|
client/client_voip_turnserver.la \
|
|
|
|
###
|
|
|
|
|
2017-10-03 13:12:54 +02:00
|
|
|
# This puts the source in key/ but the installed
|
|
|
|
# library is key_X.so in the main modules dir.
|
|
|
|
key_moduledir = @moduledir@
|
|
|
|
key_key_server_la_SOURCES = key/server.cc
|
|
|
|
key_key_query_la_SOURCES = key/query.cc
|
|
|
|
key_module_LTLIBRARIES = \
|
|
|
|
key/key_server.la \
|
|
|
|
key/key_query.la \
|
|
|
|
###
|
|
|
|
|
2017-08-23 23:39:41 +02:00
|
|
|
if JS
|
|
|
|
server_moduledir = @moduledir@
|
|
|
|
server_server_console_la_SOURCES = server/console.cc
|
|
|
|
server_server_listener_la_SOURCES = server/listener.cc
|
|
|
|
server_module_LTLIBRARIES = \
|
|
|
|
server/server_console.la \
|
|
|
|
server/server_listener.la \
|
|
|
|
###
|
|
|
|
endif
|
|
|
|
|
|
|
|
if JS
|
|
|
|
module_LTLIBRARIES += \
|
|
|
|
kernel.la \
|
|
|
|
###
|
|
|
|
endif
|