-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
49 lines (41 loc) · 1.88 KB
/
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
CC=g++
CXXFLAGS=-Wall
object_files=member.o provider.o person.o member-provider_list.o \
service_record.o provider_directory.o data_center.o
tests=provider_directory_test member-provider_list_test
all: data_center
test: provider_directory_test
data_center: $(object_files)
$(CC) $(CXXFLAGS) -o data_center $(object_files)
data_center.o: data_center.h data_center.cpp
$(CC) $(CXXFLAGS) -g -c data_center.cpp
service_record.o: service_record.h service_record.cpp
$(CC) $(CXXFLAGS) -g -c service_record.cpp
provider_directory.o: provider_directory.h provider_directory_internal.h provider_directory.cpp
$(CC) $(CXXFLAGS) -g -c provider_directory.cpp
person.o: person.h person.cpp
$(CC) $(CXXFLAGS) -g -c person.cpp
member.o: person.h member.cpp
$(CC) $(CXXFLAGS) -g -c member.cpp
provider.o: person.h provider.cpp
$(CC) $(CXXFLAGS) -g -c provider.cpp
member-provider_list.o: member-provider_list.h person.h service_record.h member-provider_list.cpp
$(CC) $(CXXFLAGS) -g -c member-provider_list.cpp
provider_directory_test: provider_directory.h provider_directory.o provider_directory_test.cpp
$(CC) $(CXXFLAGS) -g -o provider_directory_test \
provider_directory_test.cpp \
provider_directory.o \
-lgtest_main -lgtest -lpthread
member-provider_list_test: person.h member-provider_list.h service_record.h member-provider_list_test.cpp \
person.o member.o member-provider_list.o service_record.o provider.o
$(CC) $(CXXFLAGS) -g -o member-provider_list_test \
member-provider_list_test.cpp \
member-provider_list.o \
person.o \
member.o \
provider.o \
service_record.o \
-lgtest_main -lgtest -lpthread
.PHONY: clean
clean:
rm -rf $(object_files) data_center $(tests)