Skip to content

Commit 6623bd6

Browse files
authored
build: enhance Emscripten configuration by adding SIMD support in SDL and linker flags (#4)
1 parent a369aab commit 6623bd6

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

configure.ac

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ AC_ARG_ENABLE(
2424

2525
AS_IF([test "x$enable_emscripten" = "xyes"],
2626
AC_MSG_NOTICE([auto-detected use of Emscripten])
27-
SDL_CFLAGS="-s USE_SDL=2"
27+
SDL_CFLAGS="-s USE_SDL=2 -msimd128"
2828
SDL_LIBS="-s USE_SDL=2"
2929
SDLMIXER_CFLAGS="-s USE_SDL=2 -s USE_SDL_MIXER=2"
3030
SDLMIXER_LIBS="-s USE_SDL=2 -s USE_SDL_MIXER=2"
3131
SDLNET_CFLAGS="-s USE_SDL=2 -s USE_SDL_NET=2"
3232
SDLNET_LIBS="-s USE_SDL=2 -s USE_SDL_NET=2"
33-
EM_LDFLAGS="-s ALLOW_MEMORY_GROWTH=1 -s ASYNCIFY=1 -s EXPORTED_RUNTIME_METHODS=[ccall,cwrap,FS,ENV,PATH,ERRNO_CODES] -s FORCE_FILESYSTEM"
33+
EM_LDFLAGS="-s ALLOW_MEMORY_GROWTH=1 -s ASYNCIFY=1 -s EXPORTED_RUNTIME_METHODS=[ccall,cwrap,FS,ENV,PATH,ERRNO_CODES] -s FORCE_FILESYSTEM -msimd128"
3434
)
3535

3636
AC_CONFIG_AUX_DIR(autotools)

src/Makefile.am

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ AM_CFLAGS = -I$(top_srcdir)/textscreen \
2222
-I$(top_srcdir)/opl \
2323
-I$(top_srcdir)/pcsound \
2424
-I$(top_srcdir)/win32 \
25-
@SDLMIXER_CFLAGS@ @SDLNET_CFLAGS@
25+
@SDL_CFLAGS@ @SDLMIXER_CFLAGS@ @SDLNET_CFLAGS@
26+
27+
AM_CXXFLAGS = $(AM_CFLAGS)
2628

2729
# Common source files used by absolutely everything:
2830

0 commit comments

Comments
 (0)