-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
48 lines (37 loc) · 1.43 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
# dns64perf++ - C++14 DNS64 performance tester
# Based on dns64perf by Gabor Lencse <lencse@sze.hu>
# (http://ipv6.tilb.sze.hu/dns64perf/)
# Copyright (C) 2017 Daniel Bakai <bakaid@kszk.bme.hu>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
BINARY = dns64perf++
OBJECTS = main.o timer.o dns.o dnstester.o raii_socket.o spin_sleep.o
HEADERS = timer.h dns.h dnstester.h raii_socket.h spin_sleep.hpp
CXX = clang++
CXXFLAGS = -std=c++14 -O3 -Wall -Wdeprecated -pedantic -g $(DEBUG)
LDFLAGS = -lm -lpthread
PREFIX = /usr
.PHONY: all clean
all: $(BINARY)
debug: $(BINARY)
debug: DEBUG=-DDEBUG
install: all
install -m 0755 $(BINARY) $(PREFIX)/sbin
clean:
rm -f $(BINARY) $(OBJECTS)
$(BINARY): $(OBJECTS)
$(CXX) $(LDFLAGS) $(OBJECTS) -o $@
%.o: %.cpp $(HEADERS)
$(CXX) $(CXXFLAGS) -c $< -o $@