Allow env vars (not only command line overrides) to set CPUFEATURES_{ARCH,UNAME}.
Change CPUFEATURES_{ARCH,UNAME} defaults to use {ARCH,UNAME} values.
Fixes #158
This commit is contained in:
parent
5f7e7cf8e0
commit
059e48b82b
8
Makefile
8
Makefile
|
|
@ -39,7 +39,11 @@ else
|
||||||
LIMESDR ?= no
|
LIMESDR ?= no
|
||||||
endif
|
endif
|
||||||
|
|
||||||
UNAME := $(shell uname)
|
HOST_UNAME := $(shell uname)
|
||||||
|
HOST_ARCH := $(shell uname -m)
|
||||||
|
|
||||||
|
UNAME ?= $(HOST_UNAME)
|
||||||
|
ARCH ?= $(HOST_ARCH)
|
||||||
|
|
||||||
ifeq ($(UNAME), Linux)
|
ifeq ($(UNAME), Linux)
|
||||||
CPPFLAGS += -D_DEFAULT_SOURCE
|
CPPFLAGS += -D_DEFAULT_SOURCE
|
||||||
|
|
@ -150,7 +154,6 @@ endif
|
||||||
## starch (runtime DSP code selection) mix, architecture-specific
|
## starch (runtime DSP code selection) mix, architecture-specific
|
||||||
##
|
##
|
||||||
|
|
||||||
ARCH ?= $(shell uname -m)
|
|
||||||
ifneq ($(CPUFEATURES),yes)
|
ifneq ($(CPUFEATURES),yes)
|
||||||
# need to be able to detect CPU features at runtime to enable any non-standard compiler flags
|
# need to be able to detect CPU features at runtime to enable any non-standard compiler flags
|
||||||
STARCH_MIX := generic
|
STARCH_MIX := generic
|
||||||
|
|
@ -180,6 +183,7 @@ include dsp/generated/makefile.$(STARCH_MIX)
|
||||||
showconfig:
|
showconfig:
|
||||||
@echo "Building with:" >&2
|
@echo "Building with:" >&2
|
||||||
@echo " Version string: $(DUMP1090_VERSION)" >&2
|
@echo " Version string: $(DUMP1090_VERSION)" >&2
|
||||||
|
@echo " Architecture: $(ARCH)" >&2
|
||||||
@echo " DSP mix: $(STARCH_MIX)" >&2
|
@echo " DSP mix: $(STARCH_MIX)" >&2
|
||||||
@echo " RTLSDR support: $(RTLSDR)" >&2
|
@echo " RTLSDR support: $(RTLSDR)" >&2
|
||||||
@echo " BladeRF support: $(BLADERF)" >&2
|
@echo " BladeRF support: $(BLADERF)" >&2
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
# cmake integration is a little tricky, so let's do this by hand for now
|
# cmake integration is a little tricky, so let's do this by hand for now
|
||||||
|
|
||||||
CPUFEATURES_UNAME := $(shell uname)
|
CPUFEATURES_UNAME ?= $(UNAME)
|
||||||
CPUFEATURES_ARCH := $(shell uname -m)
|
CPUFEATURES_ARCH ?= $(ARCH)
|
||||||
|
|
||||||
CPUFEATURES_OBJS := cpu_features/src/filesystem.o cpu_features/src/stack_line_reader.o cpu_features/src/string_view.o
|
CPUFEATURES_OBJS := cpu_features/src/filesystem.o cpu_features/src/stack_line_reader.o cpu_features/src/string_view.o
|
||||||
CPUFEATURES_CFLAGS := -std=c99 -O -g -DSTACK_LINE_READER_BUFFER_SIZE=1024 -DNDEBUG
|
CPUFEATURES_CFLAGS := -std=c99 -O -g -DSTACK_LINE_READER_BUFFER_SIZE=1024 -DNDEBUG
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue