-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
53 lines (41 loc) · 1.18 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
S :=
SPDK_ROOT_DIR := $(CURDIR)
include $(SPDK_ROOT_DIR)/mk/spdk.common.mk
DIRS-y += lib include examples
#DIRS-$(CONFIG_TESTS) += test
.PHONY: all clean $(DIRS-y) config.h CONFIG.local mk/cc.mk cc_version cxx_version
ifeq ($(CURDIR)/dpdk/build,$(CONFIG_DPDK_DIR))
ifneq ($(SKIP_DPDK_BUILD),1)
DPDKBUILD = dpdkbuild
DIRS-y += dpdkbuild
endif
endif
all: $(DIRS-y)
clean: $(DIRS-y)
$(Q)rm -f mk/cc.mk
$(Q)rm -f config.h
install: all
$(Q)echo "Installed to $(DESTDIR)$(CONFIG_PREFIX)"
lib: $(DPDKBUILD)
#app: lib
#test: lib
#examples: lib
pkgdep:
sh ./scripts/pkgdep.sh
#$(DIRS-y): mk/cc.mk config.h
$(DIRS-y): mk/cc.mk
mk/cc.mk:
$(Q)scripts/detect_cc.sh --cc=$(CC) --cxx=$(CXX) --lto=$(CONFIG_LTO) > [email protected]; \
cmp -s [email protected] $@ || mv [email protected] $@ ; \
rm -f [email protected]
# config.h: CONFIG CONFIG.local scripts/genconfig.py
# $(Q)PYCMD=$$(cat PYTHON_COMMAND 2>/dev/null) ; \
# test -z "$$PYCMD" && PYCMD=python ; \
# $$PYCMD scripts/genconfig.py $(MAKEFLAGS) > [email protected]; \
# cmp -s [email protected] $@ || mv [email protected] $@ ; \
# rm -f [email protected]
cc_version: mk/cc.mk
$(Q)echo "SPDK using CC=$(CC)"; $(CC) -v
cxx_version: mk/cc.mk
$(Q)echo "SPDK using CXX=$(CXX)"; $(CXX) -v
include $(SPDK_ROOT_DIR)/mk/spdk.subdirs.mk