-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
87 lines (59 loc) · 2.87 KB
/
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
CC = clang++ -Wall -Wextra -std=c++11
CC_S = clang++ -shared -Wall -Wextra -Werror -std=c++11
LINK_FLAGS = -Wl,--out-implib,engine.dll -L"C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib"
ENG_LINK = -L"D:\Jon Stuff\Git\Shuriken" -lengine
INC_DIRS = -I"D:\Jon Stuff\Git\Shuriken\lib" -I"D:\Jon Stuff\Git\Shuriken\src" \
-isystem"C:\cygwin64\usr\i686-w64-mingw32\sys-root\mingw\include"
CFLAGS = -c $(INC_DIRS)
all: engine.dll Tetris.exe Pong.exe
Tetris: engine.dll Tetris.exe
Pong: engine.dll Pong.exe
engine.dll: engine.o game.o PhysSpace2D.o PhysObj2D.o Shape2D.o HitBox2D.o CollisionData2D.o Vec2D.o Point2D.o Box.o Circle.o
$(CC_S) -o engine.dll $(INC_DIRS) engine.o game.o PhysSpace2D.o PhysObj2D.o Shape2D.o HitBox2D.o CollisionData2D.o Vec2D.o Point2D.o Box.o Circle.o $(LINK_FLAGS)
engine.o: src/engine.cpp
$(CC) $(CFLAGS) src/engine.cpp
game.o: src/game.cpp src/game.h
$(CC) $(CFLAGS) src/game.cpp src/game.h
PhysSpace2D.o: src/PhysSpace2D.cpp src/PhysSpace2D.h
$(CC) $(CFLAGS) src/PhysSpace2D.cpp
PhysObj2D.o: src/PhysObj2D.cpp src/PhysObj2D.h
$(CC) $(CFLAGS) src/PhysObj2D.cpp
Shape2D.o: src/Shape2D.cpp src/Shape2D.h
$(CC) $(CFLAGS) src/Shape2D.cpp
HitBox2D.o: src/HitBox2D.cpp src/HitBox2D.h
$(CC) $(CFLAGS) src/HitBox2D.cpp
CollisionData2D.o: src/CollisionData2D.cpp src/CollisionData2D.h
$(CC) $(CFLAGS) src/CollisionData2D.cpp
Vec2D.o: src/Vec2D.cpp src/Vec2D.h
$(CC) $(CFLAGS) src/Vec2D.cpp
Point2D.o: src/Point2D.cpp src/Point2D.h
$(CC) $(CFLAGS) src/Point2D.cpp
Box.o: src/Box.cpp src/Box.h
$(CC) $(CFLAGS) src/Box.cpp
Circle.o: src/Circle.cpp src/Circle.h
$(CC) $(CFLAGS) src/Circle.cpp
Tetris.exe: TetrisMain.o Tetris.o Menu.o Block.o Board.o
$(CC) -o Tetris.exe $(INC_DIRS) TetrisMain.o Tetris.o Menu.o Block.o Board.o $(LINK_FLAGS) $(ENG_LINK)
TetrisMain.o: examples/Tetris/TetrisMain.cpp
$(CC) $(CFLAGS) examples/Tetris/TetrisMain.cpp
Tetris.o: examples/Tetris/Tetris.cpp examples/Tetris/Tetris.h
$(CC) $(CFLAGS) examples/Tetris/Tetris.cpp
Menu.o: examples/Tetris/Menu.cpp examples/Tetris/Menu.h
$(CC) $(CFLAGS) examples/Tetris/Menu.cpp
Block.o: examples/Tetris/Block.cpp examples/Tetris/Block.h
$(CC) $(CFLAGS) examples/Tetris/Block.cpp
Board.o: examples/Tetris/Board.cpp examples/Tetris/Board.h
$(CC) $(CFLAGS) examples/Tetris/Board.cpp
Pong.exe: PongMain.o Table.o Paddle.o Ball.o
$(CC) -o Pong.exe $(INC_DIRS) PongMain.o Table.o Paddle.o Ball.o $(LINK_FLAGS) $(ENG_LINK)
PongMain.o: examples/Pong/PongMain.cpp
$(CC) $(CFLAGS) examples/Pong/PongMain.cpp
Table.o: examples/Pong/Table.cpp examples/Pong/Table.h
$(CC) $(CFLAGS) examples/Pong/Table.cpp
Paddle.o: examples/Pong/Paddle.cpp examples/Pong/Paddle.h
$(CC) $(CFLAGS) examples/Pong/Paddle.cpp
Ball.o: examples/Pong/Ball.cpp examples/Pong/Ball.h
$(CC) $(CFLAGS) examples/Pong/Ball.cpp
clean:
-del engine.dll Tetris.exe Pong.exe *.o
rebuild: clean all