forked from RSDKModding/RSDKv2-Decompilation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
76 lines (61 loc) · 1.74 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
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
RETRO_USE_MOD_LOADER ?= 1
FORCE_CASE_INSENSITIVE ?= 1
USE_HW_REN ?= 1
RETRO_USE_ORIGINAL_CODE ?= 0
ifeq ($(STATIC),1)
PKG_CONFIG_STATIC_FLAG = --static
CXXFLAGS_ALL += -static
endif
CXXFLAGS_ALL += -MMD -MP -MF objects/$*.d $(shell pkg-config --cflags $(PKG_CONFIG_STATIC_FLAG) sdl2 vorbisfile vorbis) $(CXXFLAGS)
LDFLAGS_ALL += $(LDFLAGS)
LIBS_ALL += $(shell pkg-config --libs $(PKG_CONFIG_STATIC_FLAG) sdl2 vorbisfile vorbis) -pthread $(LIBS)
SOURCES = \
Nexus/Animation.cpp \
Nexus/Audio.cpp \
Nexus/Collision.cpp \
Nexus/Debug.cpp \
Nexus/Drawing.cpp \
Nexus/Ini.cpp \
Nexus/Input.cpp \
Nexus/main.cpp \
Nexus/Math.cpp \
Nexus/Object.cpp \
Nexus/Palette.cpp \
Nexus/Player.cpp \
Nexus/Reader.cpp \
Nexus/RetroEngine.cpp \
Nexus/Scene.cpp \
Nexus/Script.cpp \
Nexus/Sprite.cpp \
Nexus/String.cpp \
Nexus/Text.cpp \
Nexus/Userdata.cpp \
Nexus/Video.cpp
ifeq ($(RETRO_USE_MOD_LOADER),1)
CXXFLAGS_ALL += -DRETRO_USE_MOD_LOADER
endif
ifeq ($(USE_HW_REN),1)
CXXFLAGS_ALL += -DUSE_HW_REN
LIBS_ALL += -lGL -lGLEW
endif
ifeq ($(FORCE_CASE_INSENSITIVE),1)
CXXFLAGS_ALL += -DFORCE_CASE_INSENSITIVE
SOURCES += Nexus/fcaseopen.c
endif
ifeq ($(RETRO_USE_ORIGINAL_CODE),0)
CXXFLAGS_ALL += -DRETRO_USE_ORIGINAL_CODE
endif
OBJECTS = $(SOURCES:%=objects/%.o)
DEPENDENCIES = $(SOURCES:%=objects/%.d)
all: bin/Nexus-Restored
include $(wildcard $(DEPENDENCIES))
objects/%.o: %
mkdir -p $(@D)
$(CXX) $(CXXFLAGS_ALL) -std=c++17 $< -o $@ -c
bin/Nexus-Restored: $(OBJECTS)
mkdir -p $(@D)
$(CXX) $(CXXFLAGS_ALL) $(LDFLAGS_ALL) $^ -o $@ $(LIBS_ALL)
install: bin/Nexus-Restored
install -Dp -m755 bin/Nexus-Restored $(prefix)/bin/Nexus-Restored
clean:
rm -r -f bin && rm -r -f objects