-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile.common
More file actions
39 lines (35 loc) · 997 Bytes
/
Makefile.common
File metadata and controls
39 lines (35 loc) · 997 Bytes
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
MYDIR := $(abspath $(dir $(lastword $(MAKEFILE_LIST))))
# Commands
CD ?= cd
CMAKE ?= cmake
INSTALL ?= install
MAKE ?= make
MKDIR ?= mkdir -p
# Locations
BUILDDIR ?= $(MYDIR)/build
EXTDIR ?= $(MYDIR)/ext
INSTALLDIR ?= $(BUILDDIR)
SRCDIR ?= $(MYDIR)/src
USRDIR ?= $(MYDIR)/usr
# EbbRT
# NOTE: The EbbRT native toolchain is required to build Umm
# but not included as part of this build system
#
# Set EBBRT_SYSROOT env variable (default: /opt/ebbrt)
EBBRT_SYSROOT ?= $(abspath /opt/ebbrt)
EBBRT_BIN_DIR=${EBBRT_SYSROOT}/usr/bin
EBBRTCC=${EBBRT_BIN_DIR}/x86_64-pc-ebbrt-gcc
EBBRTCXX=${EBBRT_BIN_DIR}/x86_64-pc-ebbrt-g++
EBBRTAR=${EBBRT_BIN_DIR}/x86_64-pc-ebbrt-ar
EBBRTAS=${EBBRT_BIN_DIR}/x86_64-pc-ebbrt-as
# Umm
UMM_CPP_FLAGS=-std=gnu++14 -Wall -Werror -MD -MP --sysroot=$(EBBRT_SYSROOT)
ifdef DEBUG #e.g., $ make DEBUG=1
UMM_CPP_FLAGS += -O0 -g3
else
UMM_CPP_FLAGS += -O4 -DNDEBUG
endif
UMM_ARCH=x86_64
UMM_ARFLAGS =rcs
UMM_INCLUDE_DIR ?= $(SRCDIR)
UMM_INSTALL_DIR ?= $(INSTALLDIR)