-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
41 lines (29 loc) · 1.5 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
all: try
CC = g++
VERSION = c++17
DBG_FLAG = -g
SRC_PATH = src
OBJ_PATH = obj
BIN_PATH = bin
DBG_PATH = debug
try: $(OBJ_PATH)/main.o $(OBJ_PATH)/expr.o $(OBJ_PATH)/var.o $(OBJ_PATH)/expr_parent.o $(OBJ_PATH)/expr_child.o $(OBJ_PATH)/expr_exception.o
$(CC) -o $(BIN_PATH)/out.x $(OBJ_PATH)/main.o $(OBJ_PATH)/expr.o $(OBJ_PATH)/var.o $(OBJ_PATH)/expr_parent.o $(OBJ_PATH)/expr_child.o $(OBJ_PATH)/expr_exception.o
$(OBJ_PATH)/main.o: $(SRC_PATH)/main.cpp
$(CC) -o $(OBJ_PATH)/main.o -c $(SRC_PATH)/main.cpp
$(OBJ_PATH)/var.o: $(SRC_PATH)/var.cpp
$(CC) -o $(OBJ_PATH)/var.o -c $(SRC_PATH)/var.cpp
$(OBJ_PATH)/expr.o: $(SRC_PATH)/expr.cpp
$(CC) -o $(OBJ_PATH)/expr.o -c $(SRC_PATH)/expr.cpp
$(OBJ_PATH)/expr_parent.o: $(SRC_PATH)/expr_parent.cpp
$(CC) -o $(OBJ_PATH)/expr_parent.o -c $(SRC_PATH)/expr_parent.cpp
$(OBJ_PATH)/expr_child.o: $(SRC_PATH)/expr_child.cpp
$(CC) -o $(OBJ_PATH)/expr_child.o -c $(SRC_PATH)/expr_child.cpp
$(OBJ_PATH)/expr_exception.o: $(SRC_PATH)/expr_exception.cpp
$(CC) -o $(OBJ_PATH)/expr_exception.o -c $(SRC_PATH)/expr_exception.cpp
$(OBJ_PATH)/test.o: $(SRC_PATH)/test.cpp
$(CC) -o $(OBJ_PATH)/test.o -c $(SRC_PATH)/test.cpp
test: $(OBJ_PATH)/test.o $(OBJ_PATH)/expr.o $(OBJ_PATH)/var.o $(OBJ_PATH)/expr_parent.o $(OBJ_PATH)/expr_child.o $(OBJ_PATH)/expr_exception.o
$(CC) -o $(BIN_PATH)/test.x $(OBJ_PATH)/test.o $(OBJ_PATH)/expr.o $(OBJ_PATH)/var.o $(OBJ_PATH)/expr_parent.o $(OBJ_PATH)/expr_child.o $(OBJ_PATH)/expr_exception.o
clean:
rm -rf $(BIN_PATH)/*
rm -rf $(OBJ_PATH)/*