-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.sdl
73 lines (65 loc) · 2.05 KB
/
Makefile.sdl
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
# SDL2 target
include git.mk
#---------------------------------------------------------------------------------
# TARGET
#---------------------------------------------------------------------------------
TARGET = osp
OBJS =\
include/imgui/imgui.o \
include/imgui/imgui_draw.o \
include/imgui/imgui_widgets.o \
include/imgui/imgui_demo.o \
include/imgui/imgui_impl_opengl3.o \
include/imgui/imgui_impl_sdl.o \
source/tools/AtlasTexture.o \
source/tools/ConfigFile.o \
source/tools/LanguageFile.o \
source/system/file/MountPoint.o \
source/system/file/LocalMountPoint.o \
source/system/audio/Plugin.o \
source/system/audio/OpenmptPlugin.o \
source/system/audio/GmePlugin.o \
source/system/audio/SidplayfpPlugin.o \
source/system/audio/Sc68Plugin.o \
source/system/FileSystem.o \
source/system/AudioSystem.o \
source/system/RenderSystem.o \
source/system/UiSystem.o \
source/main.o
PREFIX =
CC = $(PREFIX)gcc
CXX = $(PREFIX)g++
CFLAGS += -Wl,-q -Wall -DIMGUI_IMPL_OPENGL_LOADER_GLAD -Iinclude/imgui -Iinclude \
`sdl2-config --cflags` \
`pkg-config SDL2_image --cflags` \
`pkg-config jansson --cflags` \
`pkg-config fmt --cflags` \
`pkg-config libconfig++ --cflags` \
`pkg-config libopenmpt --cflags` \
`pkg-config libgme --cflags` \
`pkg-config libsidplayfp --cflags` \
`pkg-config sc68 --cflags` \
-DGIT_VERSION=\"$(GIT_VERSION)\" \
-DGIT_COMMIT=\"$(GIT_COMMIT)\" \
-DBUILD_DATE=\"$(BUILD_DATE)\"
ifneq ($(DEBUG),)
CFLAGS += -g -O0 -DDEBUG
else
CFLAGS += -O3 -DNDEBUG -DIMGUI_DISABLE_DEMO_WINDOWS
endif
CXXFLAGS += $(CFLAGS) -std=gnu++17
LIBS = -lglad -ldl \
`sdl2-config --libs` \
`pkg-config SDL2_image --libs` \
`pkg-config jansson --libs` \
`pkg-config fmt --libs` \
`pkg-config libconfig++ --libs` \
`pkg-config libopenmpt --libs --static` \
`pkg-config libgme --libs --static` \
`pkg-config libsidplayfp --libs --static` \
`pkg-config sc68 --libs --static`
all: $(TARGET).elf
$(TARGET).elf: $(OBJS)
$(CXX) $(CXXFLAGS) $^ $(LIBS) -o $@
clean:
@rm -rf $(TARGET) $(OBJS)