forked from OpenCloudOS/perf-prof
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
53 lines (43 loc) · 1.12 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
# SPDX-License-Identifier: GPL-2.0
# # Some of the tools (perf) use same make variables
# # as in kernel build.
export srctree=$(CURDIR)
export objtree=$(CURDIR)
ifeq ("$(origin V)", "command line")
VERBOSE = $(V)
endif
ifndef VERBOSE
VERBOSE = 0
endif
ifeq ($(VERBOSE),1)
Q =
else
Q = @
endif
MAKEFLAGS += --no-print-directory
all: __build
include $(srctree)/scripts/Makefile.include
include $(srctree)/build/Makefile.include
include $(srctree)/scripts/Makefile.arch
INCLUDES = \
-I$(srctree)/lib/perf/include \
-I$(srctree)/lib/traceevent \
-I$(srctree)/lib/subcmd \
-I$(srctree)/lib/ \
-I$(srctree)/include \
-I$(srctree)/include/uapi \
-I$(srctree)/arch/$(SRCARCH)/include \
-I$(srctree)/arch/$(SRCARCH)/include/uapi \
-I$(srctree)/
EXTRA_CFLAGS := -O3 -g
# Append required CFLAGS
override CFLAGS += $(EXTRA_WARNINGS) $(EXTRA_CFLAGS)
override CFLAGS += -Werror -Wall
override CFLAGS += $(INCLUDES)
override CFLAGS += -fvisibility=hidden
ifdef CONFIG_LIBBPF
override CFLAGS += -D CONFIG_LIBBPF=1
endif
export srctree OUTPUT CFLAGS V EXTRA_CFLAGS SRCARCH
__build clean:
$(Q)$(MAKE) -f $(srctree)/build/Makefile.bin dir=. $@