-
Notifications
You must be signed in to change notification settings - Fork 31
/
Makefile
80 lines (65 loc) · 3.21 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# iperf, Copyright (c) 2014, 2016, The Regents of the University of
# California, through Lawrence Berkeley National Laboratory (subject
# to receipt of any required approvals from the U.S. Dept. of
# Energy). All rights reserved.
#
# If you have questions about your rights to use or distribute this
# software, please contact Berkeley Lab's Technology Transfer
# Department at [email protected].
#
# NOTICE. This software is owned by the U.S. Department of Energy.
# As such, the U.S. Government has been granted for itself and others
# acting on its behalf a paid-up, nonexclusive, irrevocable,
# worldwide license in the Software to reproduce, prepare derivative
# works, and perform publicly and display publicly. Beginning five
# (5) years after the date permission to assert copyright is obtained
# from the U.S. Department of Energy, and subject to any subsequent
# five (5) year renewals, the U.S. Government is granted for itself
# and others acting on its behalf a paid-up, nonexclusive,
# irrevocable, worldwide license in the Software to reproduce,
# prepare derivative works, distribute copies to the public, perform
# publicly and display publicly, and to permit others to do so.
#
# This code is distributed under a BSD style license, see the LICENSE
# file for complete information.
CC = gcc
RM = rm -f
DPDK_CFLAGS += -O3 \
-I$(RTE_ANS)/librte_ans/include \
-I$(RTE_ANS)/librte_anssock/include
DPDK_LDLIBS += $(RTE_ANS)/librte_anssock/librte_anssock.a \
-L$(RTE_SDK)/$(RTE_TARGET)/lib \
-Wl,--whole-archive -Wl,-lrte_mbuf -Wl,-lrte_mempool_ring -Wl,-lrte_mempool -Wl,-lrte_ring -Wl,-lrte_eal -Wl,-lrte_kvargs -Wl,--no-whole-archive -Wl,-export-dynamic -lnuma\
-lrt -pthread -ldl
DPDK_OBJS = ./src/cjson.dpdk.o ./src/iperf_client_api.dpdk.o \
./src/iperf_locale.dpdk.o ./src/iperf_server_api.dpdk.o \
./src/iperf_udp.dpdk.o ./src/main.dpdk.o \
./src/tcp_info.dpdk.o ./src/timer.dpdk.o \
./src/units.dpdk.o ./src/iperf_api.dpdk.o \
./src/iperf_error.dpdk.o ./src/iperf_tcp.dpdk.o \
./src/iperf_util.dpdk.o ./src/net.dpdk.o \
./src/tcp_window_size.dpdk.o ./src/ans_module.dpdk.o
ORIG_OBJS = ./src/cjson.o ./src/iperf_client_api.o \
./src/iperf_locale.o ./src/iperf_server_api.o \
./src/iperf_udp.o ./src/main.o \
./src/tcp_info.o ./src/timer.o \
./src/units.o ./src/iperf_api.o \
./src/iperf_error.o ./src/iperf_tcp.o \
./src/iperf_util.o ./src/net.o \
./src/tcp_window_size.o
DPDK_TARGET = dpdk_iperf3
ORIG_TARGET = iperf3
$(DPDK_TARGET):$(DPDK_OBJS)
$(CC) -o $(DPDK_TARGET) $(DPDK_OBJS) $(DPDK_CFLAGS) $(DPDK_LDLIBS)
$(ORIG_TARGET):$(ORIG_OBJS)
$(CC) -o $(ORIG_TARGET) $(ORIG_OBJS)
$(DPDK_OBJS):%.dpdk.o:%.c
$(CC) -D_HAVE_DPDK_ANS_ -c $(DPDK_CFLAGS) $< -o $@
$(OBJS):%.o:%.c
$(CC) -c $< -o $@
all: $(DPDK_TARGET) $(ORIG_TARGET)
dpdk-iperf: $(DPDK_TARGET)
iperf: $(ORIG_TARGET)
clean:
-$(RM) $(DPDK_TARGET) $(DPDK_OBJS)
-$(RM) $(ORIG_TARGET) $(ORIG_OBJS)