summaryrefslogtreecommitdiff
path: root/GNUmakefile
blob: 274f70917f44b723100dab03152b1da19e9dd739 (plain)
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
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2018 Nippon Telegraph and Telephone Corporation

VERSION := 19.08

ifneq ($(RTE_SDK),)
# Default target, can be overriden by command line or environment
RTE_TARGET ?= x86_64-native-linuxapp-gcc

include $(RTE_SDK)/mk/rte.vars.mk

DIRS-y += src

include $(RTE_SDK)/mk/rte.extsubdir.mk
endif

.PHONY: showversion
showversion:
	@echo $(VERSION)

# Compile RST documents
DOC_ROOT = docs/guides

.PHONY: dist-clean
dist-clean:
	make clean
	rm -rf $(wildcard src/*/$(RTE_TARGET))
	rm -rf $(wildcard src/*/*.pyc)
	rm -rf $(wildcard src/*/__pycache__)
	rm -rf $(wildcard src/*/shared)
	rm -rf $(wildcard src/mirror/vf)
	rm -rf $(wildcard src/pcap/vf)

.PHONY: doc
doc: doc-all
doc-all: doc-pdf doc-html

.PHONY: doc-html
doc-html:
	make -C $(DOC_ROOT) html

RTE_PDF_DPI := 300
IMG_DIR := docs/guides/images
SVGS := $(wildcard $(IMG_DIR)/*.svg)
SVGS += $(wildcard $(IMG_DIR)/*/*.svg)
SVGS += $(wildcard $(IMG_DIR)/*/*/*.svg)
PDFS := $(SVGS:%.svg=%.pdf)

%.pdf: %.svg
	inkscape -d $(RTE_PDF_DPI) -D -f $< -A $@ $(RTE_INKSCAPE_VERBOSE)

.PHONY: doc-pdf
doc-pdf: $(PDFS)
	make -C $(DOC_ROOT) latexpdf
	@echo "Succeeded to generate '$(DOC_ROOT)/_build/latex/SoftPatchPanel.pdf'"

.PHONY: doc-clean
doc-clean:
	find $(DOC_ROOT)/images/ -type f -name "*.pdf" -delete
	make -C $(DOC_ROOT) clean