forked from Spritetm/plexus_20_emu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
39 lines (29 loc) · 1.02 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
SRC = Musashi/m68kcpu.c Musashi/softfloat/softfloat.c Musashi/m68kops.c Musashi/m68kdasm.c
SRC += main.c uart.c csr.c ramrom.c mapper.c scsi.c mbus.c rtc.c log.c
SRC += emu.c scsi_dev_hd.c rtcram.c
SRC += sysvr2-strace.c
DEPFLAGS = -MT $@ -MMD -MP
CFLAGS=-ggdb -Og -Wall $(DEPFLAGS)
default: emu
Musashi/m68kcpu.o: Musashi/m68kops.h
Musashi/m68kops.h:
make -C Musashi
emu: $(SRC:.c=.o)
$(CC) $(CFLAGS) -o $@ $^ -lm
# Note that PROXY_TO_PTHREAD doesn't generally work as the needed
# SharedArrayBuffer needs some pretty specific server settings.
EMCC_ARGS = -s ASYNCIFY
#EMCC_ARGS = -s PROXY_TO_PTHREAD -pthread
EMCC_ARGS += --js-library xterm-pty/emscripten-pty.js
EMCC_ARGS += --preload-file plexus-sanitized.img
EMCC_ARGS += --preload-file U15-MERGED.BIN
EMCC_ARGS += --preload-file U17-MERGED.BIN
EMCC_ARGS += -lidbfs.js
EMCC_ARGS += -O2 -gsource-map --source-map-base=./
plexem.mjs: $(SRC)
emcc -o $@ $(EMCC_ARGS) $^ emscripten_env.c -lm
clean:
rm -f $(SRC:.c=.o)
rm -f emu
rm -f Musashi/m68kops.h
-include $(SRC:.c=.d)