-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
55 lines (40 loc) · 824 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
43
44
45
46
47
48
49
50
51
52
53
54
55
# makefile for compiling all C++ files
# Compiler Version
CC = g++
# Compiler Flags
CFLAGS = -Wall -g -std=c++11
# Target
TARGET = qna_tool
# Object Files
OBJ = qna_tool.o Node.o tester.o dict.o search.o
# Header Files
HEADER = qna_tool.h Node.h dict.h search.h
# cpp Files
CPP = qna_tool.cpp Node.cpp tester.cpp dict.cpp search.cpp
# Compile
$(TARGET): $(OBJ)
$(CC) $(CFLAGS) -o $(TARGET) $(OBJ)
rm -f $(OBJ)
# Object Files
qna_tool.o: qna_tool.cpp
$(CC) $(CFLAGS) -c qna_tool.cpp
Node.o: Node.cpp
$(CC) $(CFLAGS) -c Node.cpp
# Tester
tester.o: tester.cpp
$(CC) $(CFLAGS) -c tester.cpp
# Dictionary
dict.o: dict.cpp
$(CC) $(CFLAGS) -c dict.cpp
# Search
search.o: search.cpp
$(CC) $(CFLAGS) -c search.cpp
# Clean
clean:
rm -f $(OBJ) $(TARGET) *~
# Run
run:
./$(TARGET)
# debug
debug:
gdb ./$(TARGET)