-
Notifications
You must be signed in to change notification settings - Fork 122
/
Makefile.msys2
67 lines (56 loc) · 1.67 KB
/
Makefile.msys2
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
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) vorbisfile vorbis theoradec sdl2 glew) $(CXXFLAGS) \
-DGLEW_STATIC \
-Idependencies/all/filesystem/include \
-Idependencies/all/theoraplay \
-Idependencies/all/tinyxml2/
LDFLAGS_ALL += $(LDFLAGS)
LIBS_ALL += $(shell pkg-config --libs $(PKG_CONFIG_STATIC_FLAG) vorbisfile vorbis theoradec sdl2 glew) -lopengl32 -lws2_32 -pthread $(LIBS)
SOURCES = \
dependencies/all/tinyxml2/tinyxml2.cpp \
dependencies/all/theoraplay/theoraplay.c \
RSDKv3/Animation.cpp \
RSDKv3/Audio.cpp \
RSDKv3/Collision.cpp \
RSDKv3/Debug.cpp \
RSDKv3/Drawing.cpp \
RSDKv3/Ini.cpp \
RSDKv3/Input.cpp \
RSDKv3/main.cpp \
RSDKv3/ModAPI.cpp \
RSDKv3/Math.cpp \
RSDKv3/Object.cpp \
RSDKv3/Palette.cpp \
RSDKv3/Player.cpp \
RSDKv3/Reader.cpp \
RSDKv3/RetroEngine.cpp \
RSDKv3/Scene.cpp \
RSDKv3/Scene3D.cpp \
RSDKv3/Script.cpp \
RSDKv3/Sprite.cpp \
RSDKv3/String.cpp \
RSDKv3/Text.cpp \
RSDKv3/Userdata.cpp \
RSDKv3/Video.cpp
ifeq ($(FORCE_CASE_INSENSITIVE),1)
CXXFLAGS_ALL += -DFORCE_CASE_INSENSITIVE
SOURCES += RSDKv3/fcaseopen.c
endif
OBJECTS = $(SOURCES:%=objects/%.o)
DEPENDENCIES = $(SOURCES:%=objects/%.d)
all: bin/RSDKv3
include $(wildcard $(DEPENDENCIES))
objects/%.o: %
mkdir -p $(@D)
$(CXX) $(CXXFLAGS_ALL) -std=c++17 $< -o $@ -c
bin/RSDKv3: $(OBJECTS)
mkdir -p $(@D)
$(CXX) $(CXXFLAGS_ALL) $(LDFLAGS_ALL) $^ -o $@ $(LIBS_ALL)
install: bin/RSDKv3
install -Dp -m755 bin/RSDKv3 $(prefix)/bin/RSDKv3
chmod -x $(prefix)/bin/RSDKv3
clean:
rm -r -f bin && rm -r -f objects