diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2021-05-28 15:17:20 +0200 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2021-05-28 15:17:20 +0200 |
commit | 460ecf074d133cbe026cbddb7cf5fad1180c9831 (patch) | |
tree | 2beb0cfa84698dbb723c7c62acec703fad3437da /Makefile | |
parent | cf3ba89c46301bb8c0a1eda470c353801117fc0b (diff) |
Set loop/wakeup/ostream either via .config or via app/commandline
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 21 |
1 files changed, 7 insertions, 14 deletions
@@ -2,12 +2,15 @@ # # SPDX-License-Identifier: BSD-2-Clause +COMMON_FLAGS = -g -Os -Wall -Wextra + # Only load .config when app/arch are not specified on commandline ifneq (${app}, ) CONFIG_app = ${app} CONFIG_arch = ${arch} else -include .config + COMMON_FLAGS += -include include/config.h endif # Make cannot include "foo"/Makefile.inc, so remove quotes from config entries @@ -16,7 +19,6 @@ app_dir = $(subst ${quote},,${CONFIG_app}) arch_dir = $(subst ${quote},,${CONFIG_arch}) INCLUDES = -Iinclude -Iinclude/arch/${arch_dir} -COMMON_FLAGS = -g -Os -Wall -Wextra CFLAGS = -std=c99 CXXFLAGS = -std=c++14 -fno-rtti -fno-threadsafe-statics -fno-exceptions @@ -349,24 +351,15 @@ ifeq (${timer_us}, 1) endif ifeq (${loop}, 1) - COMMON_FLAGS += -DWITH_LOOP -endif -ifdef CONFIG_loop - COMMON_FLAGS += -DWITH_LOOP + COMMON_FLAGS += -DCONFIG_loop endif ifeq (${wakeup}, 1) - COMMON_FLAGS += -DWITH_WAKEUP -endif -ifdef CONFIG_wakeup - COMMON_FLAGS += -DWITH_WAKEUP + COMMON_FLAGS += -DCONFIG_wakeup endif ifeq (${ostream}, 1) - COMMON_FLAGS += -DWITH_OSTREAM -endif -ifdef CONFIG_ostream - COMMON_FLAGS += -DWITH_OSTREAM + COMMON_FLAGS += -DCONFIG_ostream endif ifeq (${trace_malloc}, 1) @@ -381,7 +374,7 @@ endif default: build/system.elf include/config.h: .config - ${QUIET}awk -f script/conf2h.awk .config > include/config.h + ${QUIET}test -z "${app}" && awk -f script/conf2h.awk .config > include/config.h || : > include/config.h stack: default ${QUIET}test -n "${OBJDUMP}" |