-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
44 lines (29 loc) · 948 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
38
39
40
41
42
43
44
PREFIX?=/usr/local
DATADIR?=$(PREFIX)/share/games/sdl-ball/themes/
BINDIR?=$(PREFIX)/bin/
#append -DWITH_WIIUSE to compile with WIIUSE support!
#append -DNOSOUND to compile WITHOUT sound support
CXX?=g++
CXXFLAGS+=-Wall `sdl-config --cflags` -DDATADIR="\"$(DATADIR)\""
#append -lwiiuse to compile with WIIUSE support
#remove -lSDL_mixer if compiling with -DNOSOUND
LIBS+=-lGL -lGLU `sdl2-config --libs` -lSDL2_image -lSDL2_ttf -lSDL2_mixer
SOURCES=main.cpp display.cpp
OBJECTS=$(SOURCES:.cpp=.o)
EXECUTABLE=sdl-ball
all: $(SOURCES) $(EXECUTABLE)
$(EXECUTABLE): $(OBJECTS)
$(CXX) $(LDFLAGS) $(OBJECTS) $(LIBS) -o $@
.cpp.o:
$(CXX) -c $(CXXFLAGS) $< -o $@
clean:
rm -f *.o sdl-ball
install: $(EXECUTABLE) install-bin install-data
install-bin:
mkdir -p $(DESTDIR)$(BINDIR)
cp $(EXECUTABLE) $(DESTDIR)$(BINDIR)
install-data:
mkdir -p $(DESTDIR)$(DATADIR)
cp -p -R themes/* $(DESTDIR)$(DATADIR)
remove:
rm -R ~/.config/sdl-ball