1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 08:15:30 +03:00

Merge pull request #4286 from mikeller/de-duplicate-os-detection

From Cleanflight: De-duplicate OS detection in test Makefile.
This commit is contained in:
Michael Keller 2017-10-10 00:41:14 +13:00 committed by GitHub
commit 610053b299

View file

@ -12,7 +12,9 @@
# Where to find user code.
USER_DIR = ../main
TEST_DIR = unit
ROOT = ../..
include $(ROOT)/make/system-id.mk
# specify which files that are included in the test in addition to the unittest file.
# variables available:
@ -296,9 +298,6 @@ USER_INCLUDE_DIR = $(USER_DIR)
OBJECT_DIR = ../../obj/test
# Determine the OS
UNAME := $(shell uname -s)
# Use clang/clang++ by default
CC := clang
CXX := clang++
@ -321,7 +320,7 @@ COMMON_FLAGS += -fblocks
LDFLAGS += -lBlocksRuntime
endif
ifneq ($(UNAME), Darwin)
ifndef MACOSX
COMMON_FLAGS += -pthread
endif
@ -340,7 +339,7 @@ C_FLAGS += $(COVERAGE_FLAGS)
CXX_FLAGS += $(COVERAGE_FLAGS)
# Set up the parameter group linker flags according to OS
ifeq ($(UNAME), Darwin)
ifdef MACOSX
LDFLAGS += -Wl,-map,$(OBJECT_DIR)/$@.map
else
LDFLAGS += -Wl,-T,$(TEST_DIR)/parameter_group.ld -Wl,-Map,$(OBJECT_DIR)/$@.map