Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
86 lines (79 loc) · 2.64 KB
/
Copy pathMakefile
File metadata and controls
86 lines (79 loc) · 2.64 KB
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
# Basic usage:
#
# make -j
#
# will do a parallel make of the firedancer and firedancer-dev binaries
# for the native machine; "make -j all" also makes the libraries,
# headers, unit tests and fuzz tests.
#
# The environment variable MACHINE allows building for different
# machines. As such, the above is equivalent to running:
#
# MACHINE=[default_machine] make -j
#
# where [default_machine] is specified below. Likewise:
#
# MACHINE=my_machine make -j
#
# would build for the machine "my_machine". The detailed configuration
# of the build for this machine would be specified in the file:
#
# config/machine/my_machine.mk
#
# The environment variable EXTRAS allows enabling optional build
# features in config/extra/with-*.mk. For example:
#
# make -j EXTRAS="debug"
#
# would enable the "with-debug.mk" extra.
#
# Build binaries, unit tests, libraries, headers, other build artifacts
# will be in the directory specified by that file. As such, builds for
# multiple machine can coexist concurrently. Typically, targeting a
# build at a new machine can be done by just writing up an appropriate
# machine description.
#
# MACHINE=my_machine make help
#
# will print out help for the make (targets available for cleaning the
# build for the particular machine, cleaning all builds, generating
# preprocessor outputs, generating asm outputs, generating dependencies,
# etc) and the detailed configuration of the build for that machine.
#
# Note if you have kernel CPU isolation enabled on the build host
# (e.g. isolcpus in the kernel command line), make will typically only
# use non-isolated CPUs for the build (even if you explicitly specify to
# use more cores with -j[N]). See the "make-j" script in contrib for
# help building efficiently on systems with cpu isolation enabled.
### Bootstrap the Makefile environment
include config/make_version.mk
# Remove pollution from unwanted default Make variables, such as $(CC)
MAKEFLAGS += --no-builtin-rules
MAKEFLAGS += --no-builtin-variables
# The above doesn't unset built-ins in the first phase GNU Make <4.4,
# so do this manually
ifeq ($(origin CC),default)
undefine CC
endif
ifeq ($(origin CXX),default)
undefine CXX
endif
ifeq ($(origin LD),default)
undefine LD
endif
# Disable implicit rules
.SUFFIXES:
.NOTINTERMEDIATE:
.SECONDEXPANSION:
ifndef MACHINE
MACHINE=native
endif
override EXTRAS:=$(sort $(EXTRAS))
# Default target
default:
include $(wildcard $(addprefix config/extra/with-,$(addsuffix -pre.mk,$(EXTRAS))))
include config/machine/$(MACHINE).mk
include $(addprefix config/extra/with-,$(addsuffix .mk,$(EXTRAS)))
include config/extra/with-blst.mk
include config/extra/with-zstd.mk
include config/everything.mk