-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
31 lines (21 loc) · 798 Bytes
/
Copy pathMakefile
File metadata and controls
31 lines (21 loc) · 798 Bytes
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
CXXFLAGS = -g -std=c++17 -Wall -Wextra -Werror -Wno-unused-parameter
CXX = g++
# These targets don't create any files:
.PHONY: clean
# Magic Variables!
# https://www.gnu.org/software/make/manual/html_node/Automatic-Variables.html
# $@ is the name of the target
# $+ is a list of all the dependencies
# $< is the first dependency
genepool: main.o GenePool.o Person.o Query.o
${CXX} $(CXXFLAGS) -o $@ $+
main.o: main.cpp GenePool.h Person.h Query.h
${CXX} $(CXXFLAGS) -c -o $@ $<
GenePool.o: GenePool.cpp GenePool.h Person.h Enums.h
${CXX} $(CXXFLAGS) -c -o $@ $<
Person.o: Person.cpp Person.h Enums.h
${CXX} $(CXXFLAGS) -c -o $@ $<
Query.o: Query.cpp Query.h GenePool.h Person.h Enums.h
${CXX} $(CXXFLAGS) -c -o $@ $<
clean:
rm -f genepool main.o GenePool.o Person.o Query.o