mirror of
https://github.com/kichikuou/system3-sdl2.git
synced 2026-09-28 18:08:03 +03:00
31 lines
1.0 KiB
Makefile
31 lines
1.0 KiB
Makefile
# -*- Makefile -*-
|
|
|
|
OBJS := $(SYSOBJS) $(EMOBJS)
|
|
|
|
DEPS := $(OBJS:%.o=%.d)
|
|
|
|
# Whitelist generated by -s EMTERPRETIFY_ADVISE=1
|
|
EMTERPRETIFY_WHITELIST := -s EMTERPRETIFY_WHITELIST='["__ZN4NACT12cmd_open_objEi", "__ZN4NACT13cmd_open_menuEv", "__ZN4NACT13cmd_open_verbEv", "__ZN4NACT5cmd_aEv", "__ZN4NACT5cmd_kEv", "__ZN4NACT5cmd_rEv", "__ZN4NACT5cmd_yEv", "__ZN4NACT7executeEv", "__ZN4NACT8mainloopEv", "_main"]'
|
|
|
|
INCLUDES := -Isrc -Isrc/sys
|
|
DEFS := -D_SYSTEM3 -D_DEBUG_CONSOLE
|
|
EMFLAGS := -s USE_SDL=2 -s USE_SDL_TTF=2 -O1 -s EMTERPRETIFY=1 -s EMTERPRETIFY_ASYNC=1 -s SAFE_HEAP=1 -s TOTAL_MEMORY=33554432 $(EMTERPRETIFY_WHITELIST)
|
|
|
|
EXPORTS := -s EXPORTED_FUNCTIONS="['_main']"
|
|
|
|
CXX = em++
|
|
|
|
CXXFLAGS = $(DEFS) $(INCLUDES) $(EMFLAGS) -MMD
|
|
|
|
LFLAGS = $(EMFLAGS) $(EXPORTS)
|
|
PRELOADS = --preload-file gamedata@/
|
|
|
|
system3.html: system3.bc
|
|
$(CXX) $< $(LFLAGS) $(LIBS) -o $@ $(PRELOADS)
|
|
|
|
system3.bc: $(OBJS)
|
|
$(CXX) $(OBJS) $(LFLAGS) $(LIBS) -o $@
|
|
|
|
clean:
|
|
rm -f $(OBJS) $(DEPS) system3.js system3.bc system3.data system3.html $(DEPS)
|