-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
104 lines (64 loc) · 2.25 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
#
# secd Makefile
#
#
memory=384
uart=2020
packet_port=2000
linux_path=${OCTEON_ROOT}/linux
kernel=-ld0x11000000:${linux_path}/kernel/linux/vmlinux.64
filesystem=-ld0x40000000:${linux_path}/embedded_rootfs/rootfs.ext2
# default target
default: application-target
# standard common Makefile fragment
include $(OCTEON_ROOT)/common.mk
# include needed component Makefile fragments
dir := $(OCTEON_ROOT)/sec-fw/dataplane/src/decode
include $(dir)/decode.mk
dir := $(OCTEON_ROOT)/sec-fw/dataplane/src/flow
include $(dir)/flow.mk
dir := $(OCTEON_ROOT)/sec-fw/dataplane/src/L7
include $(dir)/l7.mk
dir := $(OCTEON_ROOT)/sec-fw/dataplane/src/common
include $(dir)/com.mk
dir := $(OCTEON_ROOT)/sec-fw/dataplane/src/acl
include $(dir)/acl.mk
dir := $(OCTEON_ROOT)/sec-fw/dataplane/src/route
include $(dir)/route.mk
dir := $(OCTEON_ROOT)/sec-fw/dataplane/src/attack
include $(dir)/attack.mk
dir := $(OCTEON_ROOT)/sec-fw/dataplane/src/plugin/stream-tcp
include $(dir)/stream-tcp.mk
dir := $(OCTEON_ROOT)/sec-fw/dataplane/src/output
include $(dir)/output.mk
dir := $(OCTEON_ROOT)/sec-fw/ipc
include $(dir)/ipc.mk
dir := $(OCTEON_ROOT)/sec-fw/rule
include $(dir)/rule.mk
dir := $(OCTEON_ROOT)/sec-fw/dataplane/src/platform
include $(dir)/oct.mk
dir := $(OCTEON_ROOT)/executive
include $(dir)/cvmx.mk
# application specification
TARGET := secd$(PREFIX)
OBJS = $(OBJ_DIR)/main.o
INCLUDE_DIR := \
-I$(OCTEON_ROOT)/sec-fw/dataplane/src/include \
-I$(OCTEON_ROOT)/sec-fw/dataplane/src/decode \
-I$(OCTEON_ROOT)/sec-fw/dataplane/src/acl \
-I$(OCTEON_ROOT)/sec-fw/dataplane/src/platform \
-I$(OCTEON_ROOT)/sec-fw/dataplane/src/flow \
-I$(OCTEON_ROOT)/sec-fw/dataplane/src/common \
-I$(OCTEON_ROOT)/sec-fw/dataplane/src/L7 \
-I$(OCTEON_ROOT)/sec-fw/dataplane/src/plugin/stream-tcp \
-I$(OCTEON_ROOT)/sec-fw/dataplane/src/route \
-I$(OCTEON_ROOT)/sec-fw/dataplane/src/attack \
-I$(OCTEON_ROOT)/sec-fw/include
CFLAGS_LOCAL = -g -O2 -W -Wall -Wno-unused-parameter $(INCLUDE_DIR) -lpthread
include $(OCTEON_ROOT)/application.mk
# clean target
clean:
rm -f $(TARGET) config/cvmx-config.h
rm -fr $(OBJ_DIR)
run: $(TARGET)
oct-sim $(TARGET) ${kernel} ${filesystem} -envfile=u-boot-env -memsize=${memory} -uart0=${uart} -serve=${packet_port} -quiet -noperf -numcores=2