-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
31 lines (23 loc) · 847 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
# Project: NextDate
CPP = g++
CC = gcc
OBJ = gtest_main.o nextdate.o nextdate_unittest.o
LINKOBJ = gtest_main.o nextdate.o nextdate_unittest.o
LINKFLAGS = -lgtest -pthread -lgcov
BIN = gtest_nextdate
CXXFLAGS = -Wall -fprofile-arcs -ftest-coverage
CFLAGS = -Wall -fprofile-arcs -ftest-coverage
RM = rm -f
GCOV_FILE = *.gcno *.gcda *.gcov
.PHONY: all all-before all-after clean clean-custom
all: all-before $(BIN) all-after
clean: clean-custom
${RM} $(OBJ) $(BIN) $(GCOV_FILE)
$(BIN): $(OBJ)
$(CPP) $(LINKOBJ) -o $(BIN) $(LIBS) $(LINKFLAGS)
gtest_main.o: gtest_main.cc
$(CPP) -c gtest_main.cc -o gtest_main.o $(CXXFLAGS)
nextdate.o: nextdate.cc
$(CPP) -c nextdate.cc -o nextdate.o $(CXXFLAGS)
nexdate_unittest.o: nexdate_unittest.cc
$(CPP) -c nexdate_unittest.cc -o nexdate_unittest.o $(CXXFLAGS)