mirror of
https://github.com/kichikuou/xsystem35-sdl2.git
synced 2026-09-27 17:27:55 +03:00
31 lines
925 B
Makefile
31 lines
925 B
Makefile
# -*- Makefile -*-
|
|
|
|
EMPORTS := -s USE_ZLIB=1 -s USE_VORBIS=1 -s USE_FREETYPE=1 -s USE_SDL=2
|
|
EMFLAGS := $(EMPORTS)
|
|
|
|
#EMFLAGS += -O1 -s SAFE_HEAP=1
|
|
EMFLAGS += -O2
|
|
|
|
EMFLAGS += -s TOTAL_MEMORY=134217728
|
|
EMFLAGS += -s EMTERPRETIFY=1 -s EMTERPRETIFY_ASYNC=1
|
|
|
|
LFLAGS := $(EMFLAGS)
|
|
LFLAGS += -s EXPORTED_FUNCTIONS="['_main']"
|
|
|
|
docs/xsystem35.js: xsystem35.bc emterpretify_whitelist src/xsystem35
|
|
$(CC) $< $(LFLAGS) $(shell grep '^ *-s' emterpretify_whitelist) -o $@
|
|
|
|
xsystem35.bc:
|
|
ln -s src/xsystem35 $@
|
|
|
|
emterpretify_whitelist: xsystem35.bc
|
|
$(CC) $(EMPORTS) -s EMTERPRETIFY=1 -s EMTERPRETIFY_ADVISE=1 xsystem35.bc > $@
|
|
|
|
src/xsystem35: src src/Makefile
|
|
$(MAKE) -C src
|
|
|
|
src/Makefile:
|
|
emconfigure ./configure --disable-shared --enable-gtk=no --enable-sdl --enable-music-server=no --enable-cdrom=emscripten --disable-oggtest --disable-vorbistest CFLAGS='-s USE_ZLIB=1 -s USE_VORBIS=1' FT2_CONFIG=tools/freetype-config
|
|
|
|
.PHONY: src
|