-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathMakefile
32 lines (22 loc) · 1 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
# This makefile is actually for emscripten, but you could probably adapt it for Linux
TARGET = rvmscd
CFLAGS = -DLINUX -DSDL_DISABLE_IMMINTRIN_H -DSDL_DISABLE_MMINTRIN_H -Irvm/Core/ -std=c99 -s USE_SDL=2 -s USE_SDL_MIXER=2
CSRC := rvm/main_linux.c rvm/Core/AnimationSystem.c rvm/Core/GifLoader.c rvm/Core/ObjectSystem.c \
rvm/Core/StageSystem.c rvm/Core/AudioPlayback.c rvm/Core/GlobalAppDefinitions.c rvm/Core/PlayerSystem.c \
rvm/Core/TextSystem.c rvm/Core/EngineCallbacks.c rvm/Core/GraphicsSystem.c rvm/Core/RenderDevice.c \
rvm/Core/FileIO.c rvm/Core/InputSystem.c rvm/Core/Scene3D.c
COBJ = $(patsubst %.c, %.o, $(CSRC))
OBJS = $(COBJ)
all: rm-elf $(TARGET)
clean:
-rm -f $(TARGET) $(OBJS)
rm-elf:
-rm -f $(TARGET)
$(TARGET): $(OBJS)
mkdir -p webOut
emcc -o webOut/$(TARGET).html $(OBJS) $(OBJEXTRA) -lSDL2 -lSDL2_Mixer -lGL -lm -s USE_OGG=1 -s USE_VORBIS=1 -s LEGACY_GL_EMULATION=1 -s ALLOW_MEMORY_GROWTH=1 -s --preload-file ../[email protected]
run: $(TARGET)
$(TARGET)
dist:
rm -f $(OBJS)
$(TARGET)