-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
78 lines (58 loc) · 2.23 KB
/
Copy pathMakefile
File metadata and controls
78 lines (58 loc) · 2.23 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
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
CXX = g++
CXXFLAGS = -Wall -Wextra -std=c++17 -g
.PHONY: all clean run-basics run-classes run-inheritance run-smart-ptrs run-vectors run-maps run-fileio run-templates run-overloading run-exceptions run-lambdas run-threads run-move run-academic run-todo run-contacts run-student-db
all:
@echo "Run 'make run-<topic>' to compile and execute a specific lesson/project."
run-basics: lessons/01-basics/hello.cpp
$(CXX) $(CXXFLAGS) $^ -o bin/hello
./bin/hello
run-classes: lessons/02-oop-classes/classes.cpp
$(CXX) $(CXXFLAGS) $^ -o bin/classes
./bin/classes
run-inheritance: lessons/03-oop-inheritance/inheritance.cpp
$(CXX) $(CXXFLAGS) $^ -o bin/inheritance
./bin/inheritance
run-smart-ptrs: lessons/04-memory-smart-pointers/smart_ptrs.cpp
$(CXX) $(CXXFLAGS) $^ -o bin/smart_ptrs
./bin/smart_ptrs
run-vectors: lessons/05-stl-vectors/vectors.cpp
$(CXX) $(CXXFLAGS) $^ -o bin/vectors
./bin/vectors
run-maps: lessons/06-stl-maps/maps.cpp
$(CXX) $(CXXFLAGS) $^ -o bin/maps
./bin/maps
run-fileio: lessons/07-file-io/file_streams.cpp
$(CXX) $(CXXFLAGS) $^ -o bin/file_streams
./bin/file_streams
run-templates: lessons/08-templates/templates.cpp
$(CXX) $(CXXFLAGS) $^ -o bin/templates
./bin/templates
run-overloading: lessons/09-operator-overloading/overloading.cpp
$(CXX) $(CXXFLAGS) $^ -o bin/overloading
./bin/overloading
run-exceptions: lessons/10-exceptions/exceptions.cpp
$(CXX) $(CXXFLAGS) $^ -o bin/exceptions
./bin/exceptions
run-lambdas: lessons/11-lambdas-and-algorithms/lambdas.cpp
$(CXX) $(CXXFLAGS) $^ -o bin/lambdas
./bin/lambdas
run-threads: lessons/12-multithreading/threads.cpp
$(CXX) $(CXXFLAGS) -pthread $^ -o bin/threads
./bin/threads
run-move: lessons/13-move-semantics/move.cpp
$(CXX) $(CXXFLAGS) $^ -o bin/move
./bin/move
run-academic: lessons/14-academic-quirks/academic.cpp
$(CXX) $(CXXFLAGS) $^ -o bin/academic
./bin/academic
run-todo: projects/01-todo-cli/main.cpp
$(CXX) $(CXXFLAGS) $^ -o bin/todo
./bin/todo
run-contacts: projects/02-contact-manager/main.cpp
$(CXX) $(CXXFLAGS) $^ -o bin/contacts
./bin/contacts
run-student-db: projects/03-student-db/main.cpp projects/03-student-db/student.cpp projects/03-student-db/report.cpp
$(CXX) $(CXXFLAGS) $^ -o bin/student_db
./bin/student_db
clean:
rm -rf bin/*