-
Notifications
You must be signed in to change notification settings - Fork 49
/
Makefile
115 lines (101 loc) · 2.53 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
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
103
104
105
106
107
108
109
110
111
112
113
114
115
# OpenJazz makefile
# Sane defaults
CXX ?= g++ -std=c++14
CXXFLAGS ?= -g -Wall -O2
DEFINES = -DSCALE -DPORTABLE
CPPFLAGS = $(DEFINES) -Isrc -Iext/scale2x -Iext/psmplug -Iext/miniz -Iext/argparse -Iext/stb
# Network support
CXXFLAGS += -DUSE_SOCKETS
ifeq ($(OS),Windows_NT)
# Only needed under Windows.
LIBS += -lws2_32
endif
# SDL1.2 or SDL2
SDLCONFIG ?= sdl-config
CXXFLAGS += $(shell $(SDLCONFIG) --cflags)
LIBS += $(shell $(SDLCONFIG) --libs)
LIBS += -lm
# Libraries
OJEXTLIBOBJ = \
ext/argparse/argparse.o \
ext/miniz/miniz.o \
ext/stb/stb_rect_pack.o \
ext/psmplug/fastmix.o \
ext/psmplug/load_psm.o \
ext/psmplug/psmplug.o \
ext/psmplug/snd_dsp.o \
ext/psmplug/snd_flt.o \
ext/psmplug/snd_fx.o \
ext/psmplug/sndfile.o \
ext/psmplug/sndmix.o \
ext/scale2x/scale2x.o \
ext/scale2x/scale3x.o \
ext/scale2x/scalebit.o
# Main engine
OJOBJS = \
src/game/clientgame.o \
src/game/game.o \
src/game/gamemode.o \
src/game/localgame.o \
src/game/servergame.o \
src/io/controls.o \
src/io/file.o \
src/io/log.o \
src/io/gfx/anim.o \
src/io/gfx/font.o \
src/io/gfx/paletteeffects.o \
src/io/gfx/sprite.o \
src/io/gfx/video.o \
src/io/network.o \
src/io/sound.o \
src/level/level.o \
src/level/movable.o \
src/main.o \
src/menu/filemenu.o \
src/menu/gamemenu.o \
src/menu/mainmenu.o \
src/menu/menu.o \
src/menu/plasma.o \
src/menu/setupmenu.o \
src/player/player.o \
src/setup.o \
src/util.o \
src/version.o
# Episode 1
OJ1OBJS = \
src/jj1/bonuslevel/jj1bonuslevel.o \
src/jj1/bonuslevel/jj1bonuslevelplayer.o \
src/jj1/level/event/jj1bridge.o \
src/jj1/level/event/jj1event.o \
src/jj1/level/event/jj1guardians.o \
src/jj1/level/event/jj1standardevent.o \
src/jj1/level/jj1bird.o \
src/jj1/level/jj1bullet.o \
src/jj1/level/jj1demolevel.o \
src/jj1/level/jj1level.o \
src/jj1/level/jj1levelframe.o \
src/jj1/level/jj1levelload.o \
src/jj1/level/jj1levelplayer.o \
src/jj1/level/jj1levelplayerframe.o \
src/jj1/planet/jj1planet.o \
src/jj1/save/jj1save.o \
src/jj1/scene/jj1scene.o \
src/jj1/scene/jj1sceneload.o
OBJS = $(OJEXTLIBOBJ) $(OJOBJS) $(OJ1OBJS)
# Stamp
DEPR = .mk-stamp-depr
# Build rules
.PHONY: clean
OpenJazz: $(DEPR) $(OBJS)
@-echo [LD] $@
@$(CXX) -o OpenJazz $(LDFLAGS) $(OBJS) $(LIBS)
$(DEPR):
@-echo [WARNING] This Makefile is deprecated! Please use CMake, if possible.
@-echo Report problems at https://github.com/AlisterT/openjazz/issues
@touch $(DEPR)
%.o: %.cpp
@-echo [CXX] $<
@$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $< -o $@
clean:
@-echo Cleaning...
@rm -f OpenJazz $(OBJS) $(DEPR)