-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
26 lines (21 loc) · 752 Bytes
/
Copy pathmakefile
File metadata and controls
26 lines (21 loc) · 752 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
# Some useful variables
OBJS = graphics.o input.o main.o sprite.o game.o perf.o animated_sprite.o animation_data.o
CFLAGS = -Wall -g -std=c++17
LIBS = `sdl2-config --cflags --libs` -lSDL2_image
CC = g++
# 'all' is a phony target.
# Just typing 'make' will use the 'all' target.
# Let's point that at the dbz executable target.
all: dbz.out
# This is the dbz.out target. It will make the file 'dbz.out'
# using the provided command.
dbz.out: ${OBJS}
${CC} ${CFLAGS} ${OBJS} ${LIBS} -o $@
# Special rule for making .o files out of .cpp files.
.cpp.o:
${CC} ${CFLAGS} -c $<
# 'clean' is a phony target.
# Typing "make clean" will actually just run a command for us.
# Typically, 'clean' is set to remove the compiled outputs.
clean:
rm *.out *.o