mirror of
https://github.com/irssi/irssi.git
synced 2026-08-08 19:30:15 +02:00
Merge pull request #1578 from ailin-nemui/cygwin
make compilation work on cygwin
This commit is contained in:
commit
d5be7d7756
20 changed files with 76 additions and 48 deletions
|
|
@ -13,10 +13,15 @@ rootinc = include_directories('.')
|
|||
dep = []
|
||||
textui_dep = []
|
||||
need_dl_cross_link = false
|
||||
need_dl_cross_link_main = false
|
||||
dl_cross_irssi_main = []
|
||||
# The Android environment requires that all modules are linked to each other.
|
||||
# See https://github.com/android/ndk/issues/201
|
||||
if host_machine.system() == 'android'
|
||||
need_dl_cross_link = true
|
||||
elif host_machine.system() == 'cygwin'
|
||||
need_dl_cross_link = true
|
||||
need_dl_cross_link_main = true
|
||||
endif
|
||||
|
||||
includedir = get_option('includedir')
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ static char *module_get_name(const char *path, int *start, int *end)
|
|||
if (name == NULL)
|
||||
name = path;
|
||||
|
||||
if (strncmp(name, "lib", 3) == 0)
|
||||
if (strncmp(name, "lib", 3) == 0 || strncmp(name, "cyg", 3) == 0)
|
||||
name += 3;
|
||||
|
||||
module_name = g_strdup(name);
|
||||
|
|
|
|||
|
|
@ -17,12 +17,13 @@ libfe_irc_dcc_a = static_library('fe_irc_dcc',
|
|||
def_sysconfdir,
|
||||
],
|
||||
dependencies : dep)
|
||||
shared_module('fe_irc_dcc',
|
||||
shared_library('fe_irc_dcc',
|
||||
name_suffix : module_suffix,
|
||||
install : true,
|
||||
install_dir : moduledir,
|
||||
link_with : dl_cross_irc_dcc,
|
||||
link_whole : libfe_irc_dcc_a)
|
||||
link_with : dl_cross_irc_dcc + dl_cross_irc_core + dl_cross_irssi_main,
|
||||
link_whole : libfe_irc_dcc_a,
|
||||
override_options : ['b_lundef=false'])
|
||||
|
||||
install_headers(
|
||||
files(
|
||||
|
|
|
|||
|
|
@ -28,12 +28,13 @@ libfe_common_irc_a = static_library('fe_common_irc',
|
|||
def_themesdir,
|
||||
],
|
||||
dependencies : dep)
|
||||
shared_module('fe_common_irc',
|
||||
shared_library('fe_common_irc',
|
||||
name_suffix : module_suffix,
|
||||
install : true,
|
||||
install_dir : moduledir,
|
||||
link_with : dl_cross_irc_core,
|
||||
link_whole : libfe_common_irc_a)
|
||||
link_with : dl_cross_irc_core + dl_cross_irssi_main,
|
||||
link_whole : libfe_common_irc_a,
|
||||
override_options : ['b_lundef=false'])
|
||||
|
||||
install_headers(
|
||||
files(
|
||||
|
|
|
|||
|
|
@ -12,12 +12,13 @@ libfe_irc_notifylist_a = static_library('fe_irc_notifylist',
|
|||
def_sysconfdir,
|
||||
],
|
||||
dependencies : dep)
|
||||
shared_module('fe_irc_notifylist',
|
||||
shared_library('fe_irc_notifylist',
|
||||
name_suffix : module_suffix,
|
||||
install : true,
|
||||
install_dir : moduledir,
|
||||
link_with : dl_cross_irc_notifylist,
|
||||
link_whole : libfe_irc_notifylist_a)
|
||||
link_with : dl_cross_irc_notifylist + dl_cross_irssi_main,
|
||||
link_whole : libfe_irc_notifylist_a,
|
||||
override_options : ['b_lundef=false'])
|
||||
|
||||
install_headers(
|
||||
files(
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
# this file is part of irssi
|
||||
|
||||
subdir('core')
|
||||
foreach s : chat_modules
|
||||
subdir(s)
|
||||
endforeach
|
||||
# intentionally empty
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,13 @@
|
|||
# this file is part of irssi
|
||||
|
||||
executable('botti',
|
||||
fe_none_irssi = executable('botti',
|
||||
files(
|
||||
'irssi.c',
|
||||
),
|
||||
include_directories : rootinc,
|
||||
implicit_include_directories : false,
|
||||
export_dynamic : true,
|
||||
implib : true,
|
||||
link_with : [
|
||||
libconfig_a,
|
||||
libcore_a,
|
||||
|
|
@ -14,6 +15,9 @@ executable('botti',
|
|||
install : true,
|
||||
dependencies : dep
|
||||
)
|
||||
if need_dl_cross_link_main
|
||||
dl_cross_irssi_main = [ fe_none_irssi ]
|
||||
endif
|
||||
|
||||
# noinst_headers = files(
|
||||
# 'module.h',
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# this file is part of irssi
|
||||
|
||||
executable('irssi',
|
||||
fe_text_irssi = executable('irssi',
|
||||
files(
|
||||
#### terminfo_sources ####
|
||||
'term-terminfo.c',
|
||||
|
|
@ -35,6 +35,7 @@ executable('irssi',
|
|||
include_directories : rootinc,
|
||||
implicit_include_directories : false,
|
||||
export_dynamic : true,
|
||||
implib : true,
|
||||
link_with : [
|
||||
libconfig_a,
|
||||
libcore_a,
|
||||
|
|
@ -44,6 +45,9 @@ executable('irssi',
|
|||
dependencies : dep
|
||||
+ textui_dep
|
||||
)
|
||||
if need_dl_cross_link_main
|
||||
dl_cross_irssi_main = [ fe_text_irssi ]
|
||||
endif
|
||||
|
||||
install_headers(
|
||||
files(
|
||||
|
|
|
|||
|
|
@ -39,11 +39,13 @@ libirc_core_a = static_library('irc_core',
|
|||
def_sysconfdir,
|
||||
],
|
||||
dependencies : dep)
|
||||
libirc_core_sm = shared_module('irc_core',
|
||||
libirc_core_sm = shared_library('irc_core',
|
||||
name_suffix : module_suffix,
|
||||
install : true,
|
||||
install_dir : moduledir,
|
||||
link_whole : libirc_core_a)
|
||||
link_whole : libirc_core_a,
|
||||
link_with : dl_cross_irssi_main,
|
||||
override_options : ['b_lundef=false'])
|
||||
|
||||
dl_cross_irc_core = []
|
||||
if need_dl_cross_link
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# this file is part of irssi
|
||||
|
||||
libirc_dcc_sm = shared_module('irc_dcc',
|
||||
libirc_dcc_sm = shared_library('irc_dcc',
|
||||
files(
|
||||
'dcc-autoget.c',
|
||||
'dcc-chat.c',
|
||||
|
|
@ -16,8 +16,9 @@ libirc_dcc_sm = shared_module('irc_dcc',
|
|||
name_suffix : module_suffix,
|
||||
install : true,
|
||||
install_dir : moduledir,
|
||||
link_with : dl_cross_irc_core,
|
||||
dependencies : dep)
|
||||
link_with : dl_cross_irc_core + dl_cross_irssi_main,
|
||||
dependencies : dep,
|
||||
override_options : ['b_lundef=false'])
|
||||
|
||||
dl_cross_irc_dcc = []
|
||||
if need_dl_cross_link
|
||||
|
|
|
|||
|
|
@ -8,12 +8,13 @@ libirc_flood_a = static_library('irc_flood',
|
|||
include_directories : rootinc,
|
||||
implicit_include_directories : false,
|
||||
dependencies : dep)
|
||||
shared_module('irc_flood',
|
||||
shared_library('irc_flood',
|
||||
name_suffix : module_suffix,
|
||||
install : true,
|
||||
install_dir : moduledir,
|
||||
link_with : dl_cross_irc_core,
|
||||
link_whole : libirc_flood_a)
|
||||
link_with : dl_cross_irc_core + dl_cross_irssi_main,
|
||||
link_whole : libirc_flood_a,
|
||||
override_options : ['b_lundef=false'])
|
||||
|
||||
install_headers(
|
||||
files('module.h'),
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# this file is part of irssi
|
||||
|
||||
libirc_notifylist_sm = shared_module('irc_notifylist',
|
||||
libirc_notifylist_sm = shared_library('irc_notifylist',
|
||||
files(
|
||||
'notify-commands.c',
|
||||
'notify-ison.c',
|
||||
|
|
@ -13,8 +13,9 @@ libirc_notifylist_sm = shared_module('irc_notifylist',
|
|||
name_suffix : module_suffix,
|
||||
install : true,
|
||||
install_dir : moduledir,
|
||||
link_with : dl_cross_irc_core,
|
||||
dependencies : dep)
|
||||
link_with : dl_cross_irc_core + dl_cross_irssi_main,
|
||||
dependencies : dep,
|
||||
override_options : ['b_lundef=false'])
|
||||
|
||||
dl_cross_irc_notifylist = []
|
||||
if need_dl_cross_link
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# this file is part of irssi
|
||||
|
||||
shared_module('irc_proxy',
|
||||
shared_library('irc_proxy',
|
||||
files(
|
||||
'dump.c',
|
||||
'listen.c',
|
||||
|
|
@ -13,6 +13,7 @@ shared_module('irc_proxy',
|
|||
install : true,
|
||||
install_dir : moduledir,
|
||||
dependencies : dep,
|
||||
override_options : ['b_lundef=false'],
|
||||
)
|
||||
|
||||
# noinst_headers = files(
|
||||
|
|
|
|||
|
|
@ -2,22 +2,23 @@
|
|||
|
||||
subdir('lib-config')
|
||||
subdir('core')
|
||||
foreach s : chat_modules
|
||||
subdir(s)
|
||||
endforeach
|
||||
subdir('fe-common')
|
||||
if have_perl
|
||||
subdir('perl')
|
||||
endif
|
||||
if have_otr
|
||||
subdir('otr')
|
||||
endif
|
||||
subdir('fe-common' / 'core')
|
||||
if want_bot
|
||||
subdir('fe-none')
|
||||
endif
|
||||
if want_textui
|
||||
subdir('fe-text')
|
||||
endif
|
||||
foreach s : chat_modules
|
||||
subdir(s)
|
||||
subdir('fe-common' / s)
|
||||
endforeach
|
||||
if have_perl
|
||||
subdir('perl')
|
||||
endif
|
||||
if have_otr
|
||||
subdir('otr')
|
||||
endif
|
||||
if want_fuzzer
|
||||
subdir('fe-fuzz')
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# this file is part of irssi
|
||||
|
||||
shared_module('otr_core',
|
||||
shared_library('otr_core',
|
||||
files(
|
||||
'key.c',
|
||||
'otr-fe.c',
|
||||
|
|
@ -15,6 +15,7 @@ shared_module('otr_core',
|
|||
install : true,
|
||||
install_dir : moduledir,
|
||||
dependencies : dep,
|
||||
override_options : ['b_lundef=false'],
|
||||
)
|
||||
|
||||
# noinst_headers = files(
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
shared_module('Irssi',
|
||||
shared_library('Irssi',
|
||||
[ xsubpp.process(
|
||||
files(
|
||||
'Channel.xs',
|
||||
|
|
@ -26,7 +26,8 @@ shared_module('Irssi',
|
|||
include_directories : rootinc,
|
||||
implicit_include_directories : true,
|
||||
dependencies : dep + [ perl_dep ],
|
||||
link_with : dl_cross_perl_core,
|
||||
link_with : dl_cross_perl_core + dl_cross_irssi_main,
|
||||
override_options : ['b_lundef=false'],
|
||||
)
|
||||
|
||||
install_headers(
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
shared_module('Irc',
|
||||
shared_library('Irc',
|
||||
[ xsubpp.process(
|
||||
files(
|
||||
'Channel.xs',
|
||||
|
|
@ -27,7 +27,8 @@ shared_module('Irc',
|
|||
include_directories : rootinc,
|
||||
implicit_include_directories : true,
|
||||
dependencies : dep + [ perl_dep ],
|
||||
link_with : dl_cross_perl_core + dl_cross_irc_dcc + dl_cross_irc_notifylist,
|
||||
link_with : dl_cross_perl_core + dl_cross_irc_dcc + dl_cross_irc_notifylist + dl_cross_irc_core + dl_cross_irssi_main,
|
||||
override_options : ['b_lundef=false'],
|
||||
)
|
||||
|
||||
install_headers(
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ irssi_core_pl_h = custom_target('irssi-core.pl.h',
|
|||
# required as of Meson 0.58.0
|
||||
generated_files_inc = include_directories('.')
|
||||
|
||||
libperl_core_sm = shared_module('perl_core',
|
||||
libperl_core_sm = shared_library('perl_core',
|
||||
files(
|
||||
'perl-common.c',
|
||||
'perl-core.c',
|
||||
|
|
@ -39,7 +39,8 @@ libperl_core_sm = shared_module('perl_core',
|
|||
install_rpath : perl_rpath,
|
||||
build_rpath : perl_rpath,
|
||||
dependencies : dep_cflagsonly + [ perl_dep ] + dl_cross_dep,
|
||||
override_options : ['b_asneeded=false'],
|
||||
override_options : ['b_asneeded=false', 'b_lundef=false'],
|
||||
link_with : dl_cross_irssi_main,
|
||||
)
|
||||
|
||||
dl_cross_perl_core = []
|
||||
|
|
@ -47,7 +48,7 @@ if need_dl_cross_link
|
|||
dl_cross_perl_core += libperl_core_sm
|
||||
endif
|
||||
|
||||
shared_module('fe_perl',
|
||||
shared_library('fe_perl',
|
||||
files(
|
||||
'module-formats.c',
|
||||
'perl-fe.c',
|
||||
|
|
@ -61,7 +62,8 @@ shared_module('fe_perl',
|
|||
install : true,
|
||||
install_dir : moduledir,
|
||||
dependencies : dep,
|
||||
link_with : dl_cross_perl_core,
|
||||
link_with : dl_cross_perl_core + dl_cross_irssi_main,
|
||||
override_options : ['b_lundef=false'],
|
||||
)
|
||||
|
||||
subdir('common')
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
shared_module('TextUI',
|
||||
shared_library('TextUI',
|
||||
[ xsubpp.process(
|
||||
files(
|
||||
'Statusbar.xs',
|
||||
|
|
@ -23,7 +23,8 @@ shared_module('TextUI',
|
|||
include_directories : rootinc,
|
||||
implicit_include_directories : true,
|
||||
dependencies : dep + [ perl_dep ],
|
||||
link_with : dl_cross_perl_core,
|
||||
link_with : dl_cross_perl_core + dl_cross_irssi_main,
|
||||
override_options : ['b_lundef=false'],
|
||||
)
|
||||
|
||||
install_headers(
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
shared_module('UI',
|
||||
shared_library('UI',
|
||||
[ xsubpp.process(
|
||||
files(
|
||||
'Formats.xs',
|
||||
|
|
@ -21,7 +21,8 @@ shared_module('UI',
|
|||
include_directories : rootinc,
|
||||
implicit_include_directories : true,
|
||||
dependencies : dep + [ perl_dep ],
|
||||
link_with : dl_cross_perl_core,
|
||||
link_with : dl_cross_perl_core + dl_cross_irssi_main,
|
||||
override_options : ['b_lundef=false'],
|
||||
)
|
||||
|
||||
install_headers(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue