|
|
@ -58,12 +58,8 @@ def configure(conf): |
|
|
|
if not conf.env.HAVE_SDL2: |
|
|
|
if not conf.env.HAVE_SDL2: |
|
|
|
conf.fatal('SDL2 not availiable! Install switch-sdl2!') |
|
|
|
conf.fatal('SDL2 not availiable! Install switch-sdl2!') |
|
|
|
conf.define('XASH_SDL', 2) |
|
|
|
conf.define('XASH_SDL', 2) |
|
|
|
# HACK: now link in the entirety of libstdc++ so that dynamic libs could use all of it without manual exporting |
|
|
|
|
|
|
|
# we can't do this right away because std::filesystem will complain about not having pathconf(), |
|
|
|
|
|
|
|
# which we have defined in sys_nswitch.c |
|
|
|
|
|
|
|
conf.env.LDFLAGS.remove('-lstdc++') |
|
|
|
conf.env.LDFLAGS.remove('-lstdc++') |
|
|
|
conf.env.LDFLAGS.remove('-lm') |
|
|
|
conf.env.LDFLAGS.remove('-lm') |
|
|
|
conf.env.LDFLAGS += ['-Wl,--whole-archive', '-lstdc++', '-Wl,--no-whole-archive', '-lm'] |
|
|
|
|
|
|
|
elif conf.options.FBDEV_SW: |
|
|
|
elif conf.options.FBDEV_SW: |
|
|
|
# unused, XASH_LINUX without XASH_SDL gives fbdev & alsa support |
|
|
|
# unused, XASH_LINUX without XASH_SDL gives fbdev & alsa support |
|
|
|
# conf.define('XASH_FBDEV', 1) |
|
|
|
# conf.define('XASH_FBDEV', 1) |
|
|
@ -195,6 +191,10 @@ def build(bld): |
|
|
|
|
|
|
|
|
|
|
|
# Switch has custom parameters |
|
|
|
# Switch has custom parameters |
|
|
|
if bld.env.DEST_OS == 'nswitch': |
|
|
|
if bld.env.DEST_OS == 'nswitch': |
|
|
|
|
|
|
|
# HACK: link in the entirety of libstdc++ so that dynamic libs could use all of it without manual exporting |
|
|
|
|
|
|
|
# we can't do this right away because std::filesystem will complain about not having pathconf(), |
|
|
|
|
|
|
|
# which we have defined in sys_nswitch.c |
|
|
|
|
|
|
|
bld.env.LDFLAGS += ['-Wl,--whole-archive', '-lstdc++', '-Wl,--no-whole-archive', '-lm'] |
|
|
|
bld(source = source, |
|
|
|
bld(source = source, |
|
|
|
target = 'xash', |
|
|
|
target = 'xash', |
|
|
|
features = 'c cxxprogram', |
|
|
|
features = 'c cxxprogram', |
|
|
|