-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathMakefile
More file actions
51 lines (35 loc) · 1.18 KB
/
Makefile
File metadata and controls
51 lines (35 loc) · 1.18 KB
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
# source files.
SRC = dpdk_adapter.cpp dpdk_api.cpp dpdk_log.cpp
OBJ = $(SRC:.cpp=.o)
OUT = ./libdpdkadapter.so
# include directories
INCLUDES = -I. -I../dpdk-1.7.0/x86_64-native-linuxapp-gcc/include
# include files
INCLUDE_FILES = -include ../dpdk-1.7.0/x86_64-native-linuxapp-gcc/include/rte_config.h
# C++ compiler flags (-g -O2 -Wall)
CCFLAGS = -g -D__STDC_LIMIT_MACROS
# RTE related definitions
CCFLAGS += -DRTE_MAX_LCORE=64 \
-DRTE_PKTMBUF_HEADROOM=128 \
-DRTE_MAX_ETHPORTS=32
CCFLAGS += -DRTE_MACHINE_CPUFLAG_SSE \
-DRTE_MACHINE_CPUFLAG_SSE2 \
-DRTE_MACHINE_CPUFLAG_SSE3 \
-DRTE_MACHINE_CPUFLAG_SSSE3 \
-DRTE_COMPILE_TIME_CPUFLAGS=RTE_CPUFLAG_SSE,RTE_CPUFLAG_SSE2,RTE_CPUFLAG_SSE3,RTE_CPUFLAG_SSSE3
# make code position-independent
CCFLAGS += -fPIC
# compiler
CCC = g++
# library paths
LIBS = -L../dpdk-1.7.0/x86_64-native-linuxapp-gcc/lib -lintel_dpdk -ldl -pthread
# compile flags
LDFLAGS = -g -shared
.SUFFIXES: .cpp
default: $(OUT)
.cpp.o:
$(CCC) $(INCLUDES) $(INCLUDE_FILES) $(CCFLAGS) -c $< -o $@
$(OUT): $(OBJ)
$(CCC) $(LDFLAGS) $^ -o $@ $(LIBS)
clean:
rm -f $(OBJ) $(OUT) Makefile.bak