forked from CloudNativeDataPlane/cndp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
119 lines (95 loc) · 2.58 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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# SPDX-License-Identifier: BSD-3-Clause
# Copyright (c) 2019-2022 Intel Corporation
#
# Head Makefile for compiling CNDP, but just a wrapper around
# meson and ninja using the tools/cnd-build.sh script.
#
# Use 'make' or 'make build' to build CNDP. If the build directory does
# not exist it will be created with these two build types.
#
mkfile_path=$(abspath $(lastword $(MAKEFILE_LIST)))
source_dir=$(shell dirname "$(mkfile_path)")
Build="${source_dir}/tools/cne-build.sh"
# Use V=1 on the make line to enable verbose output
ifeq ($V,1)
verbose=-v
else
verbose=
endif
all: FORCE
ifeq (${static_build},1)
${Build} ${verbose} static build
else
${Build} ${verbose} build
endif
help: FORCE
${Build} help
@echo ""
@echo "Makefile options:"
@echo " Adding 'static_build=1' to the make line enables building static files"
@echo " eg: 'make static_build=1 rebuild install' for static executables"
build: FORCE
ifeq (${static_build},1)
${Build} ${verbose} static build
else
${Build} ${verbose} build
endif
rebuild: FORCE
ifeq (${static_build},1)
${Build} ${verbose} clean static build
else
${Build} ${verbose} clean build
endif
rebuild-install: FORCE
ifeq (${static_build},1)
${Build} ${verbose} clean static build install
else
${Build} ${verbose} clean build install
endif
coverity: FORCE
${Build} ${verbose} clean coverity
debug: FORCE
ifeq (${static_build},1)
${Build} ${verbose} static debug
else
${Build} ${verbose} debug
endif
debugopt: FORCE
ifeq (${static_build},1)
${Build} ${verbose} static debugopt
else
${Build} ${verbose} debugopt
endif
clean: FORCE
${Build} ${verbose} clean
install: FORCE
${Build} ${verbose} install
uninstall: FORCE
${Build} ${verbose} uninstall
docs: FORCE
${Build} ${verbose} docs
py-reqs: FORCE
# regenerate requirements.txt for all Python files
tools/gen_requirements.sh
snyk: FORCE
# scan python code
snyk monitor --command=python3 --file=tools/requirements.txt
# scan go code
@for d in $(shell find -name "go.mod") ; do \
snyk monitor --file=$${d} ; \
done
docker-image: FORCE
docker build -t cndp --build-arg http_proxy=${http_proxy} \
--build-arg https_proxy=${http_proxy} -f containerization/docker/ubuntu/Dockerfile .
docker-fed-image: FORCE
docker build -t cndp-fedora --build-arg http_proxy=${http_proxy} \
--build-arg https_proxy=${http_proxy} -f containerization/docker/fedora/Dockerfile .
rust-app: FORCE
${Build} rust-app
rust-app-clean: FORCE
${Build} rust-app-clean
docker-run: FORCE
docker run --privileged --network=host -it cndp bash
docker-fed-run: FORCE
docker run --privileged --network=host -it cndp-fedora bash
FORCE: