-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
35 lines (24 loc) · 921 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
32
33
34
# The makefile for the C++ timers.
CC = g++
CFLAGS += -Wall -std=c++11
linux_libs = -lrt
darwin_libs =
uname = $(shell uname)
ifeq ($(uname), Linux)
libs_req = $(linux_libs)
else ifeq ($(uname), Darwin)
libs_req = $(darwin_libs)
endif
all : test_app
BaseClock.o : BaseClock.cpp BaseClock.h
$(CC) $(CFLAGS) -c -o BaseClock.o BaseClock.cpp
CpuClock.o :CpuClock.cpp BaseClock.h CpuClock.h
$(CC) $(CFLAGS) -c -o CpuClock.o CpuClock.cpp
RealtimeClock.o : RealtimeClock.cpp BaseClock.h RealtimeClock.h
$(CC) $(CFLAGS) -c -o RealtimeClock.o RealtimeClock.cpp
WallClock.o : WallClock.cpp BaseClock.h WallClock.h
$(CC) $(CFLAGS) -c -o WallClock.o WallClock.cpp
test_app : test_app.cpp BaseClock.h CpuClock.h RealtimeClock.h BaseClock.o CpuClock.o RealtimeClock.o WallClock.o
$(CC) $(CFLAGS) -o test_app test_app.cpp BaseClock.o CpuClock.o RealtimeClock.o WallClock.o $(libs_req)
clean :
rm -f *.o test_app