forked from chaficnajjar/21st-century-pong
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
31 lines (21 loc) · 640 Bytes
/
Makefile
File metadata and controls
31 lines (21 loc) · 640 Bytes
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
BINARY := pong
SRCS := $(wildcard src/*.cpp)
OBJS := $(SRCS:.cpp=.o)
DEBUG := -g
SDL_INCLUDE := `sdl2-config --cflags`
SDL_LIB := `sdl2-config --libs` -lSDL2_ttf -lSDL2_mixer
CPPFLAGS += $(SDL_INCLUDE)
CXXFLAGS += $(DEBUG) -Wall -std=c++11
LDFLAGS += $(SDL_LIB)
.PHONY: all clean
all: $(BINARY)
$(BINARY): $(OBJS)
$(LINK.cc) $(OBJS) -o $(BINARY) $(LDFLAGS)
.depend: $(SRCS)
@- $(RM) .depend
@- $(CXX) $(CPPFLAGS) $(CXXFLAGS) -MM $^ | sed -r 's|^([^ ])|src/\1|' > .depend;
-include .depend
clean:
@- $(RM) $(BINARY)
@- $(RM) $(OBJS)
@- $(RM) .depend