1
0
mirror of https://github.com/sehugg/8bitworkshop.git synced 2024-11-27 01:51:35 +00:00
8bitworkshop/emsrc/cc65/Makefile.emcc

46 lines
1.2 KiB
Makefile
Raw Normal View History

2017-04-04 13:09:48 +00:00
2019-03-14 15:20:50 +00:00
CC=emcc
2017-04-04 13:09:48 +00:00
2019-03-14 15:20:50 +00:00
all: js/cc65.js js/ca65.js js/ld65.js
js/%.js: bin/%.bc
emcc -O2 --memory-init-file 0 \
2017-04-04 13:09:48 +00:00
-s ASM_JS=1 \
-s MODULARIZE=1 \
-s EXPORT_NAME=\"'$*'\" \
-s 'EXTRA_EXPORTED_RUNTIME_METHODS=["FS"]' \
-s FORCE_FILESYSTEM=1 \
bin/$*.bc -o $@ $(ARGS_$*)
bin/%.bc:
mkdir -p bin js
2019-03-14 15:20:50 +00:00
emmake make $* CC=emcc
2017-04-04 13:09:48 +00:00
cp bin/$*.exe bin/$*.bc
2019-03-14 15:20:50 +00:00
FILE_PACKAGER=python $(EMSCRIPTEN)/tools/file_packager.py
fs65-all.js:
python $(EMSCRIPTEN)/tools/file_packager.py fs65.data \
--preload include asminc cfg lib target \
neslib/nes.cfg@cfg/neslib.cfg \
neslib/neslib.lib@lib/neslib.lib \
neslib/neslib.h@include/neslib.h \
--separate-metadata --js-output=fs65.js
fs65-nes.js:
$(FILE_PACKAGER) fs65-nes.data --separate-metadata --js-output=$@ \
--preload include asminc cfg/nes* lib/nes* target/nes* \
neslib/nes.cfg@cfg/neslib.cfg \
neslib/neslib.lib@lib/neslib.lib \
neslib/neslib.h@include/neslib.h \
fs65-atari8.js:
$(FILE_PACKAGER) fs65-atari8.data --separate-metadata --js-output=$@ \
--preload include asminc cfg/atari* lib/atari* target/atari*
fs65-%.js:
$(FILE_PACKAGER) fs65-$*.data --separate-metadata --js-output=$@ \
--preload include asminc cfg/$** lib/$** target/$**
filesystems: fs65-nes.js fs65-apple2.js fs65-c64.js fs65-atari8.js