Files
Upsilon/scripts/defaults.mak
Léa Saviot d22f83c64d [scripts/defaults] -O0 insteage of -0g for DEBUG
Otherwise, we cannot debug properly on simulator/blackbox (missing
symbols)
2019-08-12 10:41:34 +02:00

44 lines
806 B
Makefile

HOSTCC = gcc
HOSTCXX = g++
PYTHON = python
# Language-specific flags
CFLAGS = -std=c99
CXXFLAGS = -std=c++11 -fno-exceptions -fno-rtti -fno-threadsafe-statics
# Flags - Optimizations
ifeq ($(DEBUG),1)
SFLAGS = -O0 -g
else
SFLAGS = -Os
endif
# Flags - Header search path
SFLAGS += -Ilib -I.
# Flags - Building options
SFLAGS += -Wall
# Flags - Header dependency tracking
SFLAGS += -MD -MP
# Define "Q" as an arobase by default to silence-out every command run by make.
# If V=1 is supplied on the make command line, undefine Q so that every command
# is echoed out.
Q=@
BUILD_VERBOSE=0
ifeq ("$(origin V)", "command line")
ifeq ($(V),1)
BUILD_VERBOSE=1
Q=
endif
endif
# Building directory
ifeq ($(DEBUG),1)
MODE = debug
else
MODE = release
endif
BUILD_DIR = build/$(MODE)/$(PLATFORM)