-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
52 lines (35 loc) · 1.74 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
CC = g++ -I ./include
CFLAGS = -g -lGL -lGLU -lglui -lglut -lglm -lpng12 -ljpeg -lm -lalut -lopenal
INC = ./include
SRC = ./src
OBJ = ./obj
BIN = ./bin
GLM = ./glm
vpath %.h ./include
vpath %.c ./src
EXECS = $(BIN)/game
all: $(EXECS)
$(OBJ)/audioLoader.o: $(INC)/audioLoader.h $(SRC)/audioLoader.cpp
$(CC) $(CFLAGS) -c $(SRC)/audioLoader.cpp -o $(OBJ)/audioLoader.o
$(OBJ)/modelLoader.o: $(INC)/modelLoader.h $(SRC)/modelLoader.cpp
$(CC) $(CFLAGS) -c $(SRC)/modelLoader.cpp -o $(OBJ)/modelLoader.o
$(OBJ)/character.o: $(INC)/character.h $(SRC)/character.cpp
$(CC) $(CFLAGS) -c $(SRC)/character.cpp -o $(OBJ)/character.o
$(OBJ)/asteroid.o: $(INC)/asteroid.h $(SRC)/asteroid.cpp
$(CC) $(CFLAGS) -c $(SRC)/asteroid.cpp -o $(OBJ)/asteroid.o
$(OBJ)/laser.o: $(INC)/laser.h $(SRC)/laser.cpp
$(CC) $(CFLAGS) -c $(SRC)/laser.cpp -o $(OBJ)/laser.o
$(OBJ)/ship.o: $(INC)/ship.h $(SRC)/ship.cpp
$(CC) $(CFLAGS) -c $(SRC)/ship.cpp -o $(OBJ)/ship.o
$(OBJ)/top_scores.o: $(INC)/top_scores.h $(SRC)/top_scores.cpp
$(CC) $(CFLAGS) -c $(SRC)/top_scores.cpp -o $(OBJ)/top_scores.o
$(OBJ)/gameText.o: $(INC)/gameText.h $(SRC)/gameText.cpp
$(CC) $(CFLAGS) -c $(SRC)/gameText.cpp -o $(OBJ)/gameText.o
$(BIN)/game: $(SRC)/game.cpp $(OBJ)/character.o $(OBJ)/asteroid.o $(OBJ)/ship.o $(OBJ)/modelLoader.o $(OBJ)/laser.o $(OBJ)/audioLoader.o $(OBJ)/top_scores.o $(OBJ)/gameText.o
$(CC) -o $(BIN)/game $(SRC)/game.cpp $(OBJ)/character.o $(OBJ)/ship.o $(OBJ)/asteroid.o $(OBJ)/laser.o $(OBJ)/modelLoader.o $(OBJ)/audioLoader.o $(OBJ)/top_scores.o $(OBJ)/gameText.o $(CFLAGS)
doc: $(INC)/asteroid.h $(INC)/character.h $(INC)/laser.h $(INC)/ship.h $(INC)/audioLoader.h $(INC)/gameText.h $(INC)/modelLoader.h $(INC)/top_scores.h
doxygen
clean:
rm obj/*
rm bin/*
rm -rf doc/*