-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
51 lines (35 loc) · 1.16 KB
/
Makefile
File metadata and controls
51 lines (35 loc) · 1.16 KB
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
#Project Geometry test
DIR = bin
BIN = $(DIR)/Geometry
OBJ = $(DIR)/main.o $(DIR)/draw.o $(DIR)/complex.o $(DIR)/point.o $(DIR)/line.o $(DIR)/element.o $(DIR)/transform.o $(DIR)/model.o
LIB = -Lfreeglut -Llua-5.3.1/lib -Wl,-Bstatic -lglut -llua -Wl,-Bdynamic -ldl -lGL -lX11 -lXxf86vm -lXrandr -lXi -g3
CXX = g++
CXXFLAGS = -I"freeglut/include" -I"lua-5.3.1/include" -Wall -g3
.PHONY: test clean cleanbackup cb
$(BIN): $(DIR) $(OBJ)
$(CXX) $(OBJ) -o $(BIN) $(LIB)
$(DIR):
mkdir $(DIR)
test : $(BIN)
./$(BIN)
$(DIR)/main.o : main.cpp element.h draw.h model.h
$(CXX) $(CXXFLAGS) -c $< -o $@
$(DIR)/draw.o : draw.cpp element.h
$(CXX) $(CXXFLAGS) -c $< -o $@
$(DIR)/complex.o : complex.cpp element.h
$(CXX) $(CXXFLAGS) -c $< -o $@
$(DIR)/point.o : point.cpp element.h
$(CXX) $(CXXFLAGS) -c $< -o $@
$(DIR)/line.o : line.cpp element.h
$(CXX) $(CXXFLAGS) -c $< -o $@
$(DIR)/element.o : element.cpp element.h
$(CXX) $(CXXFLAGS) -c $< -o $@
$(DIR)/transform.o : transform.cpp element.h
$(CXX) $(CXXFLAGS) -c $< -o $@
$(DIR)/model.o : model.cpp element.h
$(CXX) $(CXXFLAGS) -c $< -o $@
cleanbackup :
rm -vf *~ *.orig .*~
cb : cleanbackup
clean :
rm -vf $(BIN) $(OBJ)