client/Makefile.wasm (22251B)
1 CC := ../toolchains/emsdk/upstream/emscripten/emcc 2 CPPFLAGS := -Iruntime -Igame -Idata -DRECOMP_PORTABLE 3 # Guest exception landing pads use Wasm longjmp support. 4 CFLAGS := -Oz -flto=thin -fno-strict-aliasing -pthread -sSUPPORT_LONGJMP=wasm 5 PORT_FLAGS := -sUSE_SDL=2 -sUSE_FREETYPE=1 -sUSE_ZLIB=1 6 RUNTIME_SOURCES := runtime/linux_host.c runtime/linux_imports.c runtime/linux_gdi.c runtime/linux_audio.c runtime/linux_music.c runtime/browser_audio.c runtime/linux_window.c runtime/linux_graphics.c runtime/gl_renderer.c runtime/linux_platform.c runtime/linux_diagnostics.c runtime/linux_sync.c runtime/linux_file.c runtime/linux_tls.c runtime/linux_thread.c runtime/linux_snapshot.c runtime/browser_network.c runtime/browser_asset_cache.c runtime/guest_memory.c runtime/guest_heap.c runtime/guest_crt.c runtime/guest_stdio.c runtime/guest_exception.c runtime/guest_rtti.c runtime/guest_format.c runtime/guest_msvcp.c runtime/recomp_state.c runtime/eh32.c runtime/linux_path.c runtime/browser_host.c runtime/browser_loop.c runtime/browser_resolution.c runtime/browser_profile.c 7 GAME_SOURCES := $(wildcard game/*/*.c) game/dispatch.c 8 RUNTIME_SOURCES += runtime/browser_testing.c runtime/browser_png.c 9 DATA_SOURCES := $(wildcard data/*.c) 10 VENDOR_SOURCES := $(wildcard vendor/msvcp60/source/*.c) $(wildcard vendor/ace/source/*.c) 11 OBJECTS := $(patsubst %.c,build/wasm/objects/%.o,$(GAME_SOURCES) $(DATA_SOURCES) $(VENDOR_SOURCES) $(RUNTIME_SOURCES)) 12 13 .DEFAULT_GOAL := all 14 include Makefile.portable 15 16 build/wasm/browser-testing.js: tests/browser_testing.c runtime/browser_testing.c runtime/guest_memory.c runtime/recomp_state.c 17 @mkdir -p $(@D) 18 $(CC) $(CPPFLAGS) $(CFLAGS) $^ -o $@ 19 20 # Compiler flag changes must rebuild objects as well as relink the client. 21 $(OBJECTS): Makefile.wasm 22 23 build/wasm/resolved-calls.js: build/portable/tests/resolved_calls.c runtime/guest_memory.c runtime/recomp_state.c runtime/recomp_types.h runtime/guest_memory.h 24 @mkdir -p $(@D) 25 $(CC) $(CPPFLAGS) $(CFLAGS) $(filter %.c,$^) -o $@ 26 27 $(patsubst %.c,build/wasm/objects/%.o,$(wildcard game/*/*.c)): build/wasm/objects/%.o: build/wasm/shared/%.c 28 @mkdir -p $(@D) 29 $(CC) $(CPPFLAGS) $(CFLAGS) -MMD -MP -c $< -o $@ 30 31 # Share equivalent guest entry bodies only in the full Wasm compiler inputs. 32 build/wasm/shared/%.c: %.c ../tools/client/share_guest_bodies.py 33 @mkdir -p $(@D) 34 python3 ../tools/client/share_guest_bodies.py $< $@ 35 36 $(addprefix build/wasm/shared/,$(RESOLVED_CALL_SOURCES)): build/wasm/shared/%.c: build/portable/%.c ../tools/client/share_guest_bodies.py 37 @mkdir -p $(@D) 38 python3 ../tools/client/share_guest_bodies.py $< $@ 39 40 build/wasm/guest-heap.js: tests/guest_heap.c runtime/guest_heap.c runtime/guest_memory.c runtime/guest_heap.h runtime/guest_memory.h Makefile.wasm 41 @mkdir -p $(@D) 42 $(CC) $(CPPFLAGS) $(CFLAGS) $(filter %.c,$^) -o $@ 43 44 build/wasm/resource-budget.js: tests/resource_budget.c game/ppr.dll/lifted-0000.c runtime/guest_crt.c runtime/guest_heap.c runtime/guest_memory.c runtime/recomp_state.c runtime/recomp_types.h runtime/guest_memory.h runtime/guest_crt.h 45 @mkdir -p $(@D) 46 $(CC) $(CPPFLAGS) $(CFLAGS) -ffunction-sections -fdata-sections $(filter %.c,$^) -Wl,--gc-sections -lm -o $@ 47 48 build/wasm/terrain-occlusion.js: tests/terrain_occlusion.c game/bbr.dll/lifted-0064.c runtime/guest_memory.c runtime/recomp_state.c runtime/recomp_types.h runtime/guest_memory.h 49 @mkdir -p $(@D) 50 $(CC) $(CPPFLAGS) $(CFLAGS) -DRECOMP_YIELD_EVERY=16 $(filter %.c,$^) -o $@ 51 52 .PHONY: all objects 53 all: build/wasm/web/game.js build/wasm/web/game.wasm build/wasm/web/index.html build/wasm/web/profile-worker.js build/wasm/web/audio-worklet.js 54 55 build/wasm/web/profile-worker.js: browser/profile-worker.js 56 @mkdir -p $(@D) 57 cp $< $@ 58 59 build/wasm/web/audio-worklet.js: browser/audio-worklet.js 60 @mkdir -p $(@D) 61 cp $< $@ 62 63 build/wasm/web/resource-dispatch-test.html: tests/browser_resource_queue.c runtime/browser_host.c 64 @mkdir -p $(@D) 65 $(CC) $(CPPFLAGS) $(CFLAGS) $^ -sWASMFS -sPROXY_TO_PTHREAD -sPTHREAD_POOL_SIZE=2 -sALLOW_BLOCKING_ON_MAIN_THREAD=0 -o $@ 66 67 build/wasm/browser-resolution.js: tests/browser_resolution.c runtime/browser_resolution.c runtime/guest_memory.c runtime/recomp_state.c 68 @mkdir -p $(@D) 69 $(CC) $(CPPFLAGS) $(CFLAGS) $^ -o $@ 70 71 build/wasm/browser-network-timeout.js: tests/browser_network_timeout.c game/er.dll/lifted-0003.c runtime/guest_memory.c runtime/recomp_state.c Makefile.wasm 72 @mkdir -p $(@D) 73 $(CC) $(CPPFLAGS) $(CFLAGS) $(filter %.c,$^) -o $@ 74 75 build/wasm/web/devices-test.html: tests/devices.c runtime/linux_graphics.c runtime/linux_window.c runtime/gl_renderer.c runtime/guest_heap.c runtime/guest_memory.c runtime/recomp_state.c runtime/browser_profile.c runtime/browser_host.js runtime/browser_profile.js Makefile.wasm 76 @mkdir -p $(@D) 77 $(CC) -sUSE_ZLIB=1 $(CPPFLAGS) $(CFLAGS) $(filter %.c,$^) -sUSE_SDL=2 -sPROXY_TO_PTHREAD -sPTHREAD_POOL_SIZE=2 -sALLOW_BLOCKING_ON_MAIN_THREAD=0 -sALLOW_MEMORY_GROWTH -sOFFSCREENCANVAS_SUPPORT -sOFFSCREEN_FRAMEBUFFER -sMIN_WEBGL_VERSION=2 -sMAX_WEBGL_VERSION=2 -sEXIT_RUNTIME --js-library runtime/browser_host.js --js-library runtime/browser_profile.js -o $@ 78 79 build/wasm/web/context-test.html: tests/browser_context.html build/wasm/web/context-test.js 80 cp $< $@ 81 82 build/wasm/web/context-test.js: tests/browser_context.c runtime/linux_graphics.c runtime/linux_window.c runtime/gl_renderer.c runtime/guest_heap.c runtime/guest_memory.c runtime/recomp_state.c runtime/browser_profile.c runtime/browser_host.js runtime/browser_profile.js Makefile.wasm 83 @mkdir -p $(@D) 84 $(CC) -sUSE_ZLIB=1 $(CPPFLAGS) $(CFLAGS) $(filter %.c,$^) -sUSE_SDL=2 -sPROXY_TO_PTHREAD -sPTHREAD_POOL_SIZE=2 -sALLOW_BLOCKING_ON_MAIN_THREAD=0 -sALLOW_MEMORY_GROWTH -sOFFSCREENCANVAS_SUPPORT -sOFFSCREEN_FRAMEBUFFER -sMIN_WEBGL_VERSION=2 -sMAX_WEBGL_VERSION=2 -sEXIT_RUNTIME --js-library runtime/browser_host.js --js-library runtime/browser_profile.js -o $@ 85 86 build/wasm/web/game.js build/wasm/web/game.wasm &: $(OBJECTS) runtime/browser_network.js runtime/browser_host.js runtime/browser_fetch.js runtime/browser_audio.js runtime/browser_profile.js ../local/wasm/deps/lib/libsndfile.a ../local/wasm/deps/lib/libmp3lame.a Makefile.wasm 87 @mkdir -p $(@D) 88 $(CC) $(CFLAGS) $(PORT_FLAGS) -sUSE_LIBPNG=1 $(OBJECTS) ../local/wasm/deps/lib/libsndfile.a ../local/wasm/deps/lib/libmp3lame.a -sUSE_MPG123=1 -sWASMFS -sPROXY_TO_PTHREAD -sPTHREAD_POOL_SIZE=8 -sALLOW_BLOCKING_ON_MAIN_THREAD=0 -sMIN_WEBGL_VERSION=2 -sMAX_WEBGL_VERSION=2 -sOFFSCREENCANVAS_SUPPORT -sOFFSCREEN_FRAMEBUFFER -sALLOW_MEMORY_GROWTH -sINITIAL_MEMORY=268435456 -sSTACK_SIZE=1048576 --js-library runtime/browser_network.js --js-library runtime/browser_host.js --js-library runtime/browser_fetch.js --js-library runtime/browser_audio.js --js-library runtime/browser_profile.js -sBINARYEN_EXTRA_PASSES=merge-similar-functions -Wl,--thinlto-jobs=8 -Wl,--thinlto-cache-dir=build/wasm/lto-cache --emit-symbol-map -o build/wasm/web/game.js 89 90 build/wasm/web/index.html: browser/index.html 91 @mkdir -p $(@D) 92 cp $< $@ 93 94 build/wasm/objects/runtime/linux_audio.o: CPPFLAGS += -I../local/wasm/deps/include 95 build/wasm/objects/runtime/linux_gdi.o: CFLAGS += $(PORT_FLAGS) 96 build/wasm/objects/runtime/gl_renderer.o: CFLAGS += -sUSE_ZLIB=1 97 build/wasm/objects/runtime/browser_png.o: CFLAGS += -O2 -sUSE_LIBPNG=1 98 build/wasm/objects/runtime/linux_graphics.o build/wasm/objects/runtime/linux_window.o build/wasm/objects/runtime/linux_audio.o build/wasm/objects/runtime/browser_audio.o: CFLAGS += -sUSE_SDL=2 99 100 objects: $(OBJECTS) 101 102 build/wasm/objects/%.o: %.c 103 @mkdir -p $(@D) 104 $(CC) $(CPPFLAGS) $(CFLAGS) -MMD -MP -c $< -o $@ 105 106 -include $(OBJECTS:.o=.d) 107 108 build/wasm/web/runtime-test.html: tests/browser_runtime.c runtime/browser_host.c runtime/browser_asset_cache.c runtime/browser_network.c runtime/linux_sync.c runtime/guest_memory.c runtime/recomp_state.c runtime/browser_host.js runtime/browser_fetch.js runtime/browser_network.js runtime/browser_profile.c runtime/browser_profile.js Makefile.wasm 109 @mkdir -p $(@D) 110 $(CC) $(CPPFLAGS) $(CFLAGS) $(filter %.c,$^) -sWASMFS -sPROXY_TO_PTHREAD -sPTHREAD_POOL_SIZE=4 -sALLOW_BLOCKING_ON_MAIN_THREAD=0 -sALLOW_MEMORY_GROWTH --js-library runtime/browser_host.js --js-library runtime/browser_fetch.js --js-library runtime/browser_network.js -o $@ --js-library runtime/browser_profile.js 111 112 build/wasm/socket-events.js: tests/browser_socket_events.c runtime/browser_network.c runtime/linux_sync.c runtime/guest_memory.c runtime/guest_heap.c runtime/recomp_state.c runtime/browser_network.js Makefile.wasm 113 @mkdir -p $(@D) 114 $(CC) $(CPPFLAGS) $(CFLAGS) -Dpthread_mutex_trylock=test_mutex_trylock $(filter %.c,$^) --js-library runtime/browser_network.js -sPROXY_TO_PTHREAD -sPTHREAD_POOL_SIZE=2 -sALLOW_BLOCKING_ON_MAIN_THREAD=0 -sEXIT_RUNTIME -o $@ 115 116 build/wasm/web/files-test.html: tests/files.c runtime/linux_file.c runtime/guest_memory.c runtime/recomp_state.c runtime/linux_path.c runtime/linux_file.h runtime/guest_memory.h runtime/recomp_types.h runtime/linux_path.h runtime/browser_profile.c runtime/browser_profile.js 117 @mkdir -p $(@D) 118 $(CC) $(CPPFLAGS) $(CFLAGS) $(filter %.c,$^) -sWASMFS -sPROXY_TO_PTHREAD -sPTHREAD_POOL_SIZE=2 -sALLOW_BLOCKING_ON_MAIN_THREAD=0 -sALLOW_MEMORY_GROWTH -o $@ --js-library runtime/browser_profile.js 119 120 build/wasm/web/storage-test.html: tests/browser_storage.c runtime/browser_host.c runtime/browser_asset_cache.c runtime/browser_host.js runtime/browser_fetch.js Makefile.wasm runtime/browser_profile.c runtime/browser_profile.js 121 @mkdir -p $(@D) 122 $(CC) $(CFLAGS) $(filter %.c,$^) -sWASMFS -sPROXY_TO_PTHREAD -sPTHREAD_POOL_SIZE=2 -sALLOW_BLOCKING_ON_MAIN_THREAD=0 -sALLOW_MEMORY_GROWTH --js-library runtime/browser_host.js --js-library runtime/browser_fetch.js -o $@ --js-library runtime/browser_profile.js 123 124 build/wasm/web/loop-test.html: tests/browser_loop.c runtime/browser_loop.c runtime/browser_loop.h runtime/guest_memory.c runtime/recomp_state.c runtime/browser_host.js Makefile.wasm 125 @mkdir -p $(@D) 126 $(CC) $(CPPFLAGS) $(CFLAGS) $(filter %.c,$^) -sPROXY_TO_PTHREAD -sPTHREAD_POOL_SIZE=2 -sALLOW_BLOCKING_ON_MAIN_THREAD=0 -sOFFSCREENCANVAS_SUPPORT --js-library runtime/browser_host.js -o $@ 127 128 build/wasm/web/pacing-test.html: tests/browser_pacing.c runtime/linux_graphics.c runtime/linux_window.c runtime/gl_renderer.c runtime/guest_heap.c runtime/guest_memory.c runtime/recomp_state.c runtime/browser_host.js Makefile.wasm runtime/browser_profile.c runtime/browser_profile.js 129 @mkdir -p $(@D) 130 $(CC) -sUSE_ZLIB=1 $(CPPFLAGS) $(CFLAGS) $(filter %.c,$^) --js-library runtime/browser_host.js -sUSE_SDL=2 -sPROXY_TO_PTHREAD -sPTHREAD_POOL_SIZE=2 -sALLOW_BLOCKING_ON_MAIN_THREAD=0 -sALLOW_MEMORY_GROWTH -sOFFSCREENCANVAS_SUPPORT -sOFFSCREEN_FRAMEBUFFER -sMIN_WEBGL_VERSION=2 -sMAX_WEBGL_VERSION=2 -Wl,--wrap=clock_nanosleep -o $@ --js-library runtime/browser_profile.js 131 132 build/wasm/web/audio-output-test.html: tests/browser_audio.html build/wasm/web/audio-output-test.js build/wasm/web/audio-worklet.js 133 cp $< $@ 134 135 build/wasm/web/camera-test.html: tests/browser_camera.c runtime/linux_window.c runtime/guest_heap.c runtime/guest_memory.c runtime/recomp_state.c runtime/browser_host.js Makefile.wasm 136 @mkdir -p $(@D) 137 $(CC) $(CPPFLAGS) $(CFLAGS) $(filter %.c,$^) -sUSE_SDL=2 -sPROXY_TO_PTHREAD -sPTHREAD_POOL_SIZE=2 -sALLOW_BLOCKING_ON_MAIN_THREAD=0 -sALLOW_MEMORY_GROWTH --js-library runtime/browser_host.js -o $@ 138 139 build/wasm/web/audio-output-test.js: tests/browser_audio.c runtime/browser_audio.c runtime/browser_audio.h runtime/browser_audio.js Makefile.wasm runtime/browser_profile.c runtime/browser_profile.js 140 @mkdir -p $(@D) 141 $(CC) $(CPPFLAGS) $(CFLAGS) -sUSE_SDL=2 $(filter %.c,$^) --js-library runtime/browser_audio.js -sPROXY_TO_PTHREAD -sPTHREAD_POOL_SIZE=2 -sALLOW_BLOCKING_ON_MAIN_THREAD=0 -o $@ --js-library runtime/browser_profile.js 142 143 build/wasm/web/mixer-test.html: tests/browser_mixer.html build/wasm/web/mixer-test.js 144 cp $< $@ 145 146 build/wasm/web/mixer-test.js: tests/audio.c runtime/linux_audio.c runtime/browser_audio.c runtime/guest_heap.c runtime/guest_memory.c runtime/recomp_state.c runtime/linux_path.c runtime/browser_audio.h runtime/browser_audio.js runtime/linux_audio.h runtime/guest_heap.h runtime/guest_memory.h runtime/recomp_types.h runtime/linux_path.h Makefile.wasm runtime/browser_profile.c runtime/browser_profile.js 147 @mkdir -p $(@D) 148 $(CC) $(CPPFLAGS) $(CFLAGS) -I../local/wasm/deps/include -sUSE_SDL=2 $(filter %.c,$^) ../local/wasm/deps/lib/libsndfile.a ../local/wasm/deps/lib/libmp3lame.a -sUSE_MPG123=1 -sWASMFS --js-library runtime/browser_audio.js -sPROXY_TO_PTHREAD -sPTHREAD_POOL_SIZE=4 -sALLOW_BLOCKING_ON_MAIN_THREAD=0 -sALLOW_MEMORY_GROWTH -Wl,--wrap=audio_output_open,--wrap=sf_open -o $@ --js-library runtime/browser_profile.js 149 150 build/wasm/terrain-line.js: tests/terrain_line.c game/llr.dll/lifted-0023.c runtime/guest_memory.c runtime/recomp_state.c runtime/recomp_types.h runtime/guest_memory.h 151 @mkdir -p $(@D) 152 $(CC) $(CPPFLAGS) $(CFLAGS) -ffunction-sections -fdata-sections $(filter %.c,$^) -Wl,--gc-sections -lm -o $@ 153 154 build/wasm/skinning.js: tests/skinning.c game/bbr.dll/lifted-0061.c runtime/guest_memory.c runtime/recomp_state.c runtime/recomp_types.h runtime/guest_memory.h 155 @mkdir -p $(@D) 156 $(CC) $(CPPFLAGS) $(CFLAGS) -ffunction-sections -fdata-sections $(filter %.c,$^) -Wl,--gc-sections -lm -o $@ 157 158 build/wasm/ground-height.js: tests/ground_height.c game/bbr.dll/lifted-0013.c runtime/guest_memory.c runtime/recomp_state.c runtime/recomp_types.h runtime/guest_memory.h 159 @mkdir -p $(@D) 160 $(CC) $(CPPFLAGS) $(CFLAGS) -ffunction-sections -fdata-sections $(filter %.c,$^) -Wl,--gc-sections -lm -o $@ 161 162 build/wasm/native-input.js: tests/native_input.c game/ccr.dll/lifted-0000.c game/ccr.dll/lifted-0001.c data/ccr_dll.c runtime/guest_memory.c runtime/recomp_state.c runtime/recomp_types.h runtime/guest_memory.h 163 @mkdir -p $(@D) 164 $(CC) $(CPPFLAGS) $(CFLAGS) -ffunction-sections -fdata-sections $(filter %.c,$^) -Wl,--gc-sections -lm -o $@ 165 166 build/wasm/weapon-range.js: tests/weapon_range.c game/kkr.dll/lifted-0050.c runtime/guest_memory.c runtime/recomp_state.c runtime/recomp_types.h runtime/guest_memory.h 167 @mkdir -p $(@D) 168 $(CC) $(CPPFLAGS) $(CFLAGS) -ffunction-sections -fdata-sections $(filter %.c,$^) -Wl,--gc-sections -lm -o $@ 169 170 build/wasm/web/capture-test.html: tests/browser_capture.html build/wasm/web/capture-test.js 171 cp $< $@ 172 173 build/wasm/web/capture-test.js: tests/browser_capture.c runtime/gl_renderer.c runtime/gl_renderer.h Makefile.wasm 174 @mkdir -p $(@D) 175 $(CC) -sUSE_ZLIB=1 $(CPPFLAGS) $(CFLAGS) $(filter %.c,$^) -sPROXY_TO_PTHREAD -sPTHREAD_POOL_SIZE=1 -sOFFSCREENCANVAS_SUPPORT -sMIN_WEBGL_VERSION=2 -sMAX_WEBGL_VERSION=2 -o $@ 176 177 build/wasm/web/mip-storage.html: tests/mip_storage.c runtime/gl_renderer.c runtime/gl_renderer.h Makefile.wasm 178 @mkdir -p $(@D) 179 $(CC) -sUSE_ZLIB=1 $(CPPFLAGS) $(CFLAGS) $(filter %.c,$^) -sUSE_SDL=2 -sPROXY_TO_PTHREAD -sPTHREAD_POOL_SIZE=2 -sALLOW_BLOCKING_ON_MAIN_THREAD=0 -sOFFSCREENCANVAS_SUPPORT -sMIN_WEBGL_VERSION=2 -sMAX_WEBGL_VERSION=2 -sEXIT_RUNTIME -o $@ 180 181 build/wasm/vertex-initialization.js: tests/vertex_initialization.c game/bbr.dll/lifted-0061.c runtime/guest_memory.c runtime/recomp_state.c runtime/recomp_types.h runtime/guest_memory.h 182 @mkdir -p $(@D) 183 $(CC) $(CPPFLAGS) $(CFLAGS) -ffunction-sections -fdata-sections $(filter %.c,$^) -Wl,--gc-sections -lm -o $@ 184 185 build/wasm/tile-corners.js: tests/tile_corners.c game/llr.dll/lifted-0021.c game/llr.dll/lifted-0022.c game/bbr.dll/lifted-0013.c runtime/guest_memory.c runtime/recomp_state.c runtime/recomp_types.h runtime/guest_memory.h 186 @mkdir -p $(@D) 187 $(CC) $(CPPFLAGS) $(CFLAGS) -ffunction-sections -fdata-sections $(filter %.c,$^) -Wl,--gc-sections -lm -o $@ 188 189 build/wasm/terrain-tile.js: tests/terrain_tile.c game/llr.dll/lifted-0023.c game/mr.dll/lifted-0000.c game/mr.dll/lifted-0001.c runtime/guest_memory.c runtime/recomp_state.c runtime/recomp_types.h runtime/guest_memory.h 190 @mkdir -p $(@D) 191 $(CC) $(CPPFLAGS) $(CFLAGS) -ffunction-sections -fdata-sections $(filter %.c,$^) -Wl,--gc-sections -lm -o $@ 192 193 build/wasm/shadow-contact.js: tests/shadow_contact.c game/kkr.dll/lifted-0081.c runtime/guest_memory.c runtime/recomp_state.c runtime/recomp_types.h runtime/guest_memory.h 194 mkdir -p $(@D) 195 $(CC) $(CPPFLAGS) $(CFLAGS) -ffunction-sections -fdata-sections $(filter %.c,$^) -Wl,--gc-sections -lm -o $@ 196 197 build/wasm/animation-initialization.js: tests/animation_initialization.c game/bbr.dll/lifted-0032.c runtime/guest_memory.c runtime/recomp_state.c runtime/recomp_types.h runtime/guest_memory.h 198 @mkdir -p $(@D) 199 $(CC) $(CPPFLAGS) $(CFLAGS) -ffunction-sections -fdata-sections $(filter %.c,$^) -Wl,--gc-sections -lm -o $@ 200 201 build/wasm/effect-attachment.js: tests/effect_attachment.c game/kkr.dll/lifted-0086.c game/kkr.dll/lifted-0087.c game/bbr.dll/lifted-0069.c game/mr.dll/lifted-0001.c runtime/guest_memory.c runtime/recomp_state.c runtime/recomp_types.h runtime/guest_memory.h 202 @mkdir -p $(@D) 203 $(CC) $(CPPFLAGS) $(CFLAGS) -ffunction-sections -fdata-sections $(filter %.c,$^) -Wl,--gc-sections -lm -o $@ 204 205 build/wasm/dynel-lookup.js: tests/dynel_lookup.c game/llr.dll/lifted-0008.c runtime/guest_memory.c runtime/recomp_state.c runtime/recomp_types.h runtime/guest_memory.h 206 @mkdir -p $(@D) 207 $(CC) $(CPPFLAGS) $(CFLAGS) -ffunction-sections -fdata-sections $(filter %.c,$^) -Wl,--gc-sections -lm -o $@ 208 209 build/wasm/rtti.js: tests/rtti.c runtime/guest_rtti.c runtime/guest_memory.c runtime/recomp_state.c runtime/recomp_types.h runtime/guest_rtti.h runtime/guest_memory.h 210 @mkdir -p $(@D) 211 $(CC) $(CPPFLAGS) $(CFLAGS) $(filter %.c,$^) -lm -o $@ 212 213 build/wasm/texture-resampling.js: tests/texture_resampling.c game/bbr.dll/lifted-0082.c game/bbr.dll/lifted-0083.c runtime/guest_memory.c runtime/recomp_state.c runtime/recomp_types.h runtime/guest_memory.h 214 mkdir -p $(@D) 215 $(CC) $(CPPFLAGS) $(CFLAGS) -ffunction-sections -fdata-sections $(filter %.c,$^) -Wl,--gc-sections -lm -o $@ 216 217 build/wasm/loading-fade.js: tests/loading_fade.c game/ddr.dll/lifted-0014.c runtime/guest_memory.c runtime/recomp_state.c runtime/recomp_types.h runtime/guest_memory.h 218 mkdir -p $(@D) 219 $(CC) $(CPPFLAGS) $(CFLAGS) -ffunction-sections -fdata-sections $(filter %.c,$^) -Wl,--gc-sections -lm -o $@ 220 221 build/wasm/team-header.js: tests/team_header.c game/ddr.dll/lifted-0019.c runtime/guest_memory.c runtime/recomp_state.c runtime/recomp_types.h runtime/guest_memory.h 222 @mkdir -p $(@D) 223 $(CC) $(CPPFLAGS) $(CFLAGS) -ffunction-sections -fdata-sections $(filter %.c,$^) -Wl,--gc-sections -lm -o $@ 224 225 226 build/wasm/web/music-test.html: tests/music.c runtime/linux_music.c runtime/linux_thread.c runtime/guest_heap.c runtime/guest_memory.c runtime/recomp_state.c game/mmr.dll/lifted-0001.c runtime/linux_music.h runtime/linux_thread.h 227 @mkdir -p $(@D) 228 $(CC) $(CPPFLAGS) $(CFLAGS) $(filter %.c,$^) -sPROXY_TO_PTHREAD -sPTHREAD_POOL_SIZE=2 -sALLOW_BLOCKING_ON_MAIN_THREAD=0 -sALLOW_MEMORY_GROWTH -o $@ 229 230 build/wasm/web/stdio-concurrency-test.html: tests/stdio_concurrency.c runtime/guest_stdio.c runtime/guest_crt.c runtime/guest_format.c runtime/guest_heap.c runtime/guest_memory.c runtime/recomp_state.c runtime/linux_path.c runtime/guest_stdio.h runtime/browser_profile.c runtime/browser_profile.js 231 @mkdir -p $(@D) 232 $(CC) $(CPPFLAGS) $(CFLAGS) $(filter %.c,$^) -sWASMFS -sPROXY_TO_PTHREAD -sPTHREAD_POOL_SIZE=2 -sALLOW_BLOCKING_ON_MAIN_THREAD=0 -sALLOW_MEMORY_GROWTH -Wl,--wrap=read -o $@ --js-library runtime/browser_profile.js 233 234 build/wasm/png-filter.js: tests/png_filter.c game/bbr.dll/lifted-0047.c runtime/guest_memory.c runtime/recomp_state.c runtime/recomp_types.h runtime/guest_memory.h 235 @mkdir -p $(@D) 236 $(CC) $(CPPFLAGS) $(CFLAGS) -ffunction-sections -fdata-sections $(filter %.c,$^) -Wl,--gc-sections -lm -o $@ 237 238 build/wasm/jpeg-idct.js: tests/jpeg_idct.c game/bbr.dll/lifted-0042.c runtime/guest_memory.c runtime/recomp_state.c runtime/recomp_types.h runtime/guest_memory.h 239 @mkdir -p $(@D) 240 $(CC) $(CPPFLAGS) $(CFLAGS) -ffunction-sections -fdata-sections $(filter %.c,$^) -Wl,--gc-sections -lm -o $@ 241 242 build/wasm/bitmap-clear.js: tests/bitmap_clear.c game/bbr.dll/lifted-0040.c runtime/guest_memory.c runtime/recomp_state.c runtime/recomp_types.h runtime/guest_memory.h 243 @mkdir -p $(@D) 244 $(CC) $(CPPFLAGS) $(CFLAGS) -ffunction-sections -fdata-sections $(filter %.c,$^) -Wl,--gc-sections -o $@ 245 246 build/wasm/bulk-fill.js: tests/bulk_fill.c game/bbr.dll/lifted-0041.c vendor/msvcp60/source/lifted-0004.c runtime/guest_memory.c runtime/recomp_state.c runtime/recomp_types.h runtime/guest_memory.h 247 @mkdir -p $(@D) 248 $(CC) $(CPPFLAGS) $(CFLAGS) -ffunction-sections -fdata-sections $(filter %.c,$^) -Wl,--gc-sections -lm -o $@ 249 250 build/wasm/inflate-fast.js: tests/inflate_fast.c game/bbr.dll/lifted-0044.c runtime/guest_memory.c runtime/recomp_state.c runtime/recomp_types.h runtime/guest_memory.h 251 @mkdir -p $(@D) 252 $(CC) $(CPPFLAGS) $(CFLAGS) -ffunction-sections -fdata-sections $(filter %.c,$^) -Wl,--gc-sections -lm -o $@ 253 254 build/wasm/character-reference.js: tests/character_reference.c game/ddr.dll/lifted-0030.c runtime/guest_memory.c runtime/recomp_state.c runtime/recomp_types.h runtime/guest_memory.h 255 @mkdir -p $(@D) 256 $(CC) $(CPPFLAGS) $(CFLAGS) -ffunction-sections -fdata-sections $(filter %.c,$^) -Wl,--gc-sections -lm -o $@ 257 258 build/wasm/reference-persistence.js: tests/reference_persistence.c game/or.dll/lifted-0000.c runtime/guest_msvcp.c runtime/guest_heap.c runtime/guest_memory.c runtime/recomp_state.c runtime/recomp_types.h runtime/guest_memory.h runtime/guest_msvcp.h runtime/guest_heap.h 259 @mkdir -p $(@D) 260 $(CC) $(CPPFLAGS) $(CFLAGS) -ffunction-sections -fdata-sections $(filter %.c,$^) -Wl,--gc-sections -lm -o $@ 261 262 build/wasm/player-voice.js: tests/player_voice.c game/mmr.dll/lifted-0000.c game/mmr.dll/lifted-0002.c runtime/guest_memory.c runtime/recomp_state.c runtime/recomp_types.h runtime/guest_memory.h 263 @mkdir -p $(@D) 264 $(CC) $(CPPFLAGS) $(CFLAGS) -ffunction-sections -fdata-sections $(filter %.c,$^) -Wl,--gc-sections -lm -o $@ 265 266 # Exercise the browser decoder's guest stream, pixel layout and ownership. 267 build/wasm/png-decoding.js: tests/browser_png.c runtime/browser_png.c runtime/browser_png.h runtime/guest_heap.c runtime/guest_memory.c runtime/recomp_state.c 268 @mkdir -p $(@D) 269 $(CC) $(CPPFLAGS) $(CFLAGS) -sUSE_LIBPNG=1 $(filter %.c,$^) -o $@