forked from AlisterT/openjazz
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
37 lines (28 loc) · 763 Bytes
/
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
# OpenJazz makefile
include openjazz.mk
# Sane defaults
CXX ?= g++
CXXFLAGS ?= -g -Wall -O2
CXXFLAGS += -DSCALE
# Network support
CXXFLAGS += -DUSE_SOCKETS
# Needed under Windows
#LIBS += -lws2_32
# SDL
CXXFLAGS += $(shell sdl-config --cflags)
LIBS += $(shell sdl-config --libs)
# music library: modplug, xmp
MUSICLIB ?= modplug
MUSICLIB_CFLAGS ?= $(shell pkg-config --silence-errors --cflags lib$(MUSICLIB))
MUSICLIB_LIBS ?= $(shell pkg-config --silence-errors --libs lib$(MUSICLIB))
ifneq ($(MUSICLIB_LIBS),)
CXXFLAGS += -DUSE_$(MUSICLIB) $(MUSICLIB_CFLAGS)
LIBS += $(MUSICLIB_LIBS)
endif
LIBS += -lm -lz
OpenJazz: $(OBJS)
$(CXX) -o OpenJazz $(LDFLAGS) $(OBJS) $(LIBS)
%.o: %.cpp
$(CXX) $(CXXFLAGS) -Isrc -c $< -o $@
clean:
rm -f OpenJazz $(OBJS)