-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile-sdl1-em
102 lines (86 loc) · 3.48 KB
/
Makefile-sdl1-em
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# make file generated by gryphel build system
CC = emcc
ifeq ($(EMSCRIPTEN_ROOT),)
#Set it yourself if EMSCRIPTEN_ROOT not there
EMSCRIPTEN_ROOT=c:/emsdk/emscripten/1.38.12
endif
#WebAssembly seemed to be a bit faster than asm.js
WASM=1
#Set maximum RAM that Emscripten use (in bytes).
EMSCRIPTEN_TOTAL_MEMORY=67108864
TARGET = minivmac.bc
mk_COptionsCommon = -c -Wall -Wmissing-prototypes -Wno-uninitialized -Wundef -Wstrict-prototypes -Icfgsdl1/ -Isrc/
mk_COptionsOSGLU = $(mk_COptionsCommon) -O3
mk_COptions = $(mk_COptionsCommon) -O3
mk_COptions += -s USE_SDL=1
LIBS = -lm -s USE_SDL=1
ifeq ($(EMULARITY), 1)
mk_COptions += -DUSE_EMULARITY_MVMACDIR
endif
.PHONY: TheDefaultOutput clean
TheDefaultOutput : $(TARGET)
bld/OSGLUSDL.o : src/OSGLUSDL.c src/STRCNENG.h cfgsdl1/STRCONST.h src/INTLCHAR.h src/COMOSGLU.h src/CONTROLM.h cfgsdl1/CNFGGLOB.h
$(CC) "src/OSGLUSDL.c" -o "bld/OSGLUSDL.o" $(mk_COptions)
bld/GLOBGLUE.o : src/GLOBGLUE.c cfgsdl1/CNFGGLOB.h
$(CC) "src/GLOBGLUE.c" -o "bld/GLOBGLUE.o" $(mk_COptions)
bld/M68KITAB.o : src/M68KITAB.c cfgsdl1/CNFGGLOB.h
$(CC) "src/M68KITAB.c" -o "bld/M68KITAB.o" $(mk_COptions)
bld/MINEM68K.o : src/MINEM68K.c cfgsdl1/CNFGGLOB.h
$(CC) "src/MINEM68K.c" -o "bld/MINEM68K.o" $(mk_COptions)
bld/VIAEMDEV.o : src/VIAEMDEV.c cfgsdl1/CNFGGLOB.h
$(CC) "src/VIAEMDEV.c" -o "bld/VIAEMDEV.o" $(mk_COptions)
bld/IWMEMDEV.o : src/IWMEMDEV.c cfgsdl1/CNFGGLOB.h
$(CC) "src/IWMEMDEV.c" -o "bld/IWMEMDEV.o" $(mk_COptions)
bld/SCCEMDEV.o : src/SCCEMDEV.c cfgsdl1/CNFGGLOB.h
$(CC) "src/SCCEMDEV.c" -o "bld/SCCEMDEV.o" $(mk_COptions)
bld/RTCEMDEV.o : src/RTCEMDEV.c cfgsdl1/CNFGGLOB.h
$(CC) "src/RTCEMDEV.c" -o "bld/RTCEMDEV.o" $(mk_COptions)
bld/ROMEMDEV.o : src/ROMEMDEV.c cfgsdl1/CNFGGLOB.h
$(CC) "src/ROMEMDEV.c" -o "bld/ROMEMDEV.o" $(mk_COptions)
bld/SCSIEMDV.o : src/SCSIEMDV.c cfgsdl1/CNFGGLOB.h
$(CC) "src/SCSIEMDV.c" -o "bld/SCSIEMDV.o" $(mk_COptions)
bld/SONYEMDV.o : src/SONYEMDV.c cfgsdl1/CNFGGLOB.h
$(CC) "src/SONYEMDV.c" -o "bld/SONYEMDV.o" $(mk_COptions)
bld/SCRNEMDV.o : src/SCRNEMDV.c cfgsdl1/CNFGGLOB.h
$(CC) "src/SCRNEMDV.c" -o "bld/SCRNEMDV.o" $(mk_COptions)
bld/MOUSEMDV.o : src/MOUSEMDV.c cfgsdl1/CNFGGLOB.h
$(CC) "src/MOUSEMDV.c" -o "bld/MOUSEMDV.o" $(mk_COptions)
bld/KBRDEMDV.o : src/KBRDEMDV.c cfgsdl1/CNFGGLOB.h
$(CC) "src/KBRDEMDV.c" -o "bld/KBRDEMDV.o" $(mk_COptions)
bld/SNDEMDEV.o : src/SNDEMDEV.c cfgsdl1/CNFGGLOB.h
$(CC) "src/SNDEMDEV.c" -o "bld/SNDEMDEV.o" $(mk_COptions)
bld/PROGMAIN.o : src/PROGMAIN.c cfgsdl1/CNFGGLOB.h
$(CC) "src/PROGMAIN.c" -o "bld/PROGMAIN.o" $(mk_COptions)
ObjFiles = \
bld/MINEM68K.o \
bld/OSGLUSDL.o \
bld/GLOBGLUE.o \
bld/M68KITAB.o \
bld/VIAEMDEV.o \
bld/IWMEMDEV.o \
bld/SCCEMDEV.o \
bld/RTCEMDEV.o \
bld/ROMEMDEV.o \
bld/SCSIEMDV.o \
bld/SONYEMDV.o \
bld/SCRNEMDV.o \
bld/MOUSEMDV.o \
bld/KBRDEMDV.o \
bld/SNDEMDEV.o \
bld/PROGMAIN.o \
$(TARGET) : $(ObjFiles)
$(CC) \
-o "$(TARGET)" \
$(ObjFiles) $(LIBS)
clean :
rm -f $(ObjFiles)
rm -f "$(TARGET)"
html: $(TARGET)
ifeq ($(PRELOAD), 1)
$(CC) -O3 -s USE_SDL=1 -s WASM=$(WASM) -s TOTAL_MEMORY=$(EMSCRIPTEN_TOTAL_MEMORY) -s EMTERPRETIFY=1 -s EMTERPRETIFY_ASYNC=1 \
-s EMTERPRETIFY_WHITELIST=@em.txt $(TARGET) --memory-init-file 0 \
--preload-file $(PREFILE) --profiling-funcs -o $(basename $(TARGET)).html
else
$(CC) -O3 -s USE_SDL=1 -s WASM=$(WASM) -s TOTAL_MEMORY=$(EMSCRIPTEN_TOTAL_MEMORY) -s EMTERPRETIFY=1 -s EMTERPRETIFY_ASYNC=1 \
-s EMTERPRETIFY_WHITELIST=@em.txt $(TARGET) --memory-init-file 0 --profiling-funcs -o $(basename $(TARGET)).html
endif