Make makefile options settable from envars

This commit is contained in:
Juan Antonio
2023-12-09 17:46:33 +01:00
committed by egzumer
parent 00a2bc75b8
commit a19579a888

View File

@@ -4,51 +4,51 @@
# 1 = enable # 1 = enable
# ---- COMPILER/LINKER OPTIONS ---- # ---- COMPILER/LINKER OPTIONS ----
ENABLE_CLANG := 0 ENABLE_CLANG ?= 0
ENABLE_SWD := 0 ENABLE_SWD ?= 0
ENABLE_OVERLAY := 0 ENABLE_OVERLAY ?= 0
ENABLE_LTO := 1 ENABLE_LTO ?= 1
# ---- STOCK QUANSHENG FERATURES ---- # ---- STOCK QUANSHENG FERATURES ----
ENABLE_UART := 1 ENABLE_UART ?= 1
ENABLE_AIRCOPY := 0 ENABLE_AIRCOPY ?= 0
ENABLE_FMRADIO := 1 ENABLE_FMRADIO ?= 1
ENABLE_NOAA := 0 ENABLE_NOAA ?= 0
ENABLE_VOICE := 0 ENABLE_VOICE ?= 0
ENABLE_VOX := 1 ENABLE_VOX ?= 1
ENABLE_ALARM := 0 ENABLE_ALARM ?= 0
ENABLE_TX1750 := 0 ENABLE_TX1750 ?= 0
ENABLE_PWRON_PASSWORD := 0 ENABLE_PWRON_PASSWORD ?= 0
ENABLE_DTMF_CALLING := 1 ENABLE_DTMF_CALLING ?= 1
ENABLE_FLASHLIGHT := 1 ENABLE_FLASHLIGHT ?= 1
# ---- CUSTOM MODS ---- # ---- CUSTOM MODS ----
ENABLE_BIG_FREQ := 1 ENABLE_BIG_FREQ ?= 1
ENABLE_SMALL_BOLD := 1 ENABLE_SMALL_BOLD ?= 1
ENABLE_KEEP_MEM_NAME := 1 ENABLE_KEEP_MEM_NAME ?= 1
ENABLE_WIDE_RX := 1 ENABLE_WIDE_RX ?= 1
ENABLE_TX_WHEN_AM := 0 ENABLE_TX_WHEN_AM ?= 0
ENABLE_F_CAL_MENU := 0 ENABLE_F_CAL_MENU ?= 0
ENABLE_CTCSS_TAIL_PHASE_SHIFT := 0 ENABLE_CTCSS_TAIL_PHASE_SHIFT ?= 0
ENABLE_BOOT_BEEPS := 0 ENABLE_BOOT_BEEPS ?= 0
ENABLE_SHOW_CHARGE_LEVEL := 0 ENABLE_SHOW_CHARGE_LEVEL ?= 0
ENABLE_REVERSE_BAT_SYMBOL := 0 ENABLE_REVERSE_BAT_SYMBOL ?= 0
ENABLE_NO_CODE_SCAN_TIMEOUT := 1 ENABLE_NO_CODE_SCAN_TIMEOUT ?= 1
ENABLE_AM_FIX := 1 ENABLE_AM_FIX ?= 1
ENABLE_SQUELCH_MORE_SENSITIVE := 1 ENABLE_SQUELCH_MORE_SENSITIVE ?= 1
ENABLE_FASTER_CHANNEL_SCAN := 1 ENABLE_FASTER_CHANNEL_SCAN ?= 1
ENABLE_RSSI_BAR := 1 ENABLE_RSSI_BAR ?= 1
ENABLE_AUDIO_BAR := 1 ENABLE_AUDIO_BAR ?= 1
ENABLE_COPY_CHAN_TO_VFO := 1 ENABLE_COPY_CHAN_TO_VFO ?= 1
ENABLE_SPECTRUM := 1 ENABLE_SPECTRUM ?= 1
ENABLE_REDUCE_LOW_MID_TX_POWER:= 0 ENABLE_REDUCE_LOW_MID_TX_POWER?= 0
ENABLE_BYP_RAW_DEMODULATORS := 0 ENABLE_BYP_RAW_DEMODULATORS ?= 0
ENABLE_BLMIN_TMP_OFF := 0 ENABLE_BLMIN_TMP_OFF ?= 0
ENABLE_SCAN_RANGES := 1 ENABLE_SCAN_RANGES ?= 1
# ---- DEBUGGING ---- # ---- DEBUGGING ----
ENABLE_AM_FIX_SHOW_DATA := 0 ENABLE_AM_FIX_SHOW_DATA ?= 0
ENABLE_AGC_SHOW_DATA := 0 ENABLE_AGC_SHOW_DATA ?= 0
############################################################# #############################################################
@@ -204,11 +204,11 @@ endif
OBJCOPY = arm-none-eabi-objcopy OBJCOPY = arm-none-eabi-objcopy
SIZE = arm-none-eabi-size SIZE = arm-none-eabi-size
AUTHOR_STRING := EGZUMER AUTHOR_STRING ?= EGZUMER
# the user might not have/want git installed # the user might not have/want git installed
# can set own version string here (max 7 chars) # can set own version string here (max 7 chars)
ifneq (, $(shell $(WHERE) git)) ifneq (, $(shell $(WHERE) git))
VERSION_STRING := $(shell git describe --tags --exact-match 2>$(NULL_OUTPUT)) VERSION_STRING ?= $(shell git describe --tags --exact-match 2>$(NULL_OUTPUT))
ifeq (, $(VERSION_STRING)) ifeq (, $(VERSION_STRING))
VERSION_STRING := $(shell git rev-parse --short HEAD) VERSION_STRING := $(shell git rev-parse --short HEAD)
endif endif