-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
42 lines (31 loc) · 900 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
CFLAGS = -std=c89 -Wall -Wextra -Wpedantic
all: release
debug: CFLAGS += -DDEBUG -g3
debug: tetris
release: CFLAGS += -O3
release: tetris
tetris: main.o game.o tetris.o tetromino.o term.o utils.o
mkdir -p bin
$(CC) $(CFLAGS) \
build/main.o \
build/game.o \
build/tetris.o \
build/tetromino.o \
build/term.o \
build/utils.o \
-o bin/tetris
main.o: src/main.c
mkdir -p build
$(CC) $(CFLAGS) -c src/main.c -o build/main.o
game.o: src/game.c src/game.h
$(CC) $(CFLAGS) -c src/game.c -o build/game.o
tetris.o: src/tetris.c src/tetris.h
$(CC) $(CFLAGS) -c src/tetris.c -o build/tetris.o
tetromino.o: src/tetromino.c src/tetromino.h
$(CC) $(CFLAGS) -c src/tetromino.c -o build/tetromino.o
term.o: src/term.c src/term.h
$(CC) $(CFLAGS) -c src/term.c -o build/term.o
utils.o: src/utils.c src/utils.h
$(CC) $(CFLAGS) -c src/utils.c -o build/utils.o
clean:
rm -rf bin/ build/