forked from BYUCS235/Hashmap-Lab
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
46 lines (34 loc) · 1.16 KB
/
makefile
File metadata and controls
46 lines (34 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
# "$make" compiles any missing or out_of_date objects , then relinks if needed.
# "$make clean" removes all files generated by the compiler (allows for clean compile)
# "$make turnin.txt" compiles (if needed), then runs the program and the checker.
# "$make clean_check" removes all files generated by running the above (outfiles, etc.)
# "$make valgrind" compiles (if needed), then runs the program through valgrind.
# Don't touch "$make depend"
CXX = g++
CXXFLAGS = -std=c++11 -g -Wall
SRCS = main.cpp WordCounter.cpp Hashmap.cpp
OBJS = $(SRCS:.cpp=.o)
MAIN = Lab8_Hashmap
all: $(MAIN)
$(MAIN): $(OBJS)
$(CXX) $(CXXFLAGS) -o $(MAIN) $(OBJS)
.cpp.o:
$(CXX) $(CXXFLAGS) -c -o $@ $<
clean_build:
$(RM) *.o $(MAIN)
valgrind: $(MAIN)
valgrind ./$(MAIN)
turnin.txt: $(MAIN)
./$(MAIN)
bash check.sh
clean_check:
$(RM) turnin.txt details.txt out_file*
clean: clean_check clean_build
depend: $(SRCS)
makedepend -- $(CXXFLAGS) -- $^
$(RM) Makefile.bak
# DO NOT DELETE
main.o: Hashmap.h HashmapInterface.h WordCounter.h WordCounterInterface.h
WordCounter.o: WordCounter.h WordCounterInterface.h HashmapInterface.h
WordCounter.o: Hashmap.h
Hashmap.o: Hashmap.h HashmapInterface.h