mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Makefile.include: remove repeated OS declaration
This commit is contained in:
parent
f3482de277
commit
45c8eafd42
@ -105,7 +105,7 @@ include $(RIOTMAKE)/utils/strings.mk
|
|||||||
|
|
||||||
|
|
||||||
# UNAME is always needed so use simple variable expansion so only evaluated once
|
# UNAME is always needed so use simple variable expansion so only evaluated once
|
||||||
UNAME := $(OS -m)
|
UNAME := $(shell uname -m -s)
|
||||||
OS = $(word 1, $(UNAME))
|
OS = $(word 1, $(UNAME))
|
||||||
OS_ARCH = $(word 2, $(UNAME))
|
OS_ARCH = $(word 2, $(UNAME))
|
||||||
|
|
||||||
|
@ -6,7 +6,6 @@ ifneq (,$(filter mtd,$(USEMODULE)))
|
|||||||
USEMODULE += mtd_native
|
USEMODULE += mtd_native
|
||||||
endif
|
endif
|
||||||
|
|
||||||
OS := $(shell uname -s)
|
|
||||||
ifneq (,$(filter can,$(USEMODULE)))
|
ifneq (,$(filter can,$(USEMODULE)))
|
||||||
ifeq ($(OS),Linux)
|
ifeq ($(OS),Linux)
|
||||||
USEMODULE += can_linux
|
USEMODULE += can_linux
|
||||||
|
@ -5,8 +5,6 @@ export NATIVEINCLUDES += -I$(RIOTBASE)/drivers/include/
|
|||||||
|
|
||||||
USEMODULE += native-drivers
|
USEMODULE += native-drivers
|
||||||
|
|
||||||
OS := $(shell uname -s)
|
|
||||||
|
|
||||||
ifeq ($(OS),Darwin)
|
ifeq ($(OS),Darwin)
|
||||||
DEBUGGER ?= lldb
|
DEBUGGER ?= lldb
|
||||||
else
|
else
|
||||||
@ -29,21 +27,17 @@ ifeq (,$(filter -std=%, $(CFLAGS)))
|
|||||||
CFLAGS += -std=gnu99
|
CFLAGS += -std=gnu99
|
||||||
endif
|
endif
|
||||||
|
|
||||||
OS_ARCH := $(shell uname -m)
|
|
||||||
ifeq ($(OS_ARCH),x86_64)
|
ifeq ($(OS_ARCH),x86_64)
|
||||||
CFLAGS += -m32
|
CFLAGS += -m32
|
||||||
endif
|
endif
|
||||||
ifneq (,$(filter -DDEVELHELP,$(CFLAGS)))
|
ifneq (,$(filter -DDEVELHELP,$(CFLAGS)))
|
||||||
CFLAGS += -fstack-protector-all
|
CFLAGS += -fstack-protector-all
|
||||||
endif
|
endif
|
||||||
OS := $(shell uname -s)
|
|
||||||
ifeq ($(OS),FreeBSD)
|
ifeq ($(OS),FreeBSD)
|
||||||
OS_ARCH := $(shell uname -m)
|
|
||||||
ifeq ($(OS_ARCH),amd64)
|
ifeq ($(OS_ARCH),amd64)
|
||||||
CFLAGS += -m32 -DCOMPAT_32BIT -B/usr/lib32
|
CFLAGS += -m32 -DCOMPAT_32BIT -B/usr/lib32
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
OS := $(shell uname -s)
|
|
||||||
ifeq ($(OS),Darwin)
|
ifeq ($(OS),Darwin)
|
||||||
CFLAGS += -Wno-deprecated-declarations
|
CFLAGS += -Wno-deprecated-declarations
|
||||||
endif
|
endif
|
||||||
@ -52,13 +46,10 @@ endif
|
|||||||
CXXUWFLAGS +=
|
CXXUWFLAGS +=
|
||||||
CXXEXFLAGS +=
|
CXXEXFLAGS +=
|
||||||
|
|
||||||
OS_ARCH := $(shell uname -m)
|
|
||||||
ifeq ($(OS_ARCH),x86_64)
|
ifeq ($(OS_ARCH),x86_64)
|
||||||
export LINKFLAGS += -m32
|
export LINKFLAGS += -m32
|
||||||
endif
|
endif
|
||||||
OS := $(shell uname -s)
|
|
||||||
ifeq ($(OS),FreeBSD)
|
ifeq ($(OS),FreeBSD)
|
||||||
OS_ARCH := $(shell uname -m)
|
|
||||||
ifeq ($(OS_ARCH),amd64)
|
ifeq ($(OS_ARCH),amd64)
|
||||||
export LINKFLAGS += -m32 -DCOMPAT_32BIT -L/usr/lib32 -B/usr/lib32
|
export LINKFLAGS += -m32 -DCOMPAT_32BIT -L/usr/lib32 -B/usr/lib32
|
||||||
endif
|
endif
|
||||||
@ -69,7 +60,6 @@ endif
|
|||||||
|
|
||||||
# clean up unused functions
|
# clean up unused functions
|
||||||
CFLAGS += -ffunction-sections -fdata-sections
|
CFLAGS += -ffunction-sections -fdata-sections
|
||||||
OS := $(shell uname -m)
|
|
||||||
ifeq ($(OS),Darwin)
|
ifeq ($(OS),Darwin)
|
||||||
export LINKFLAGS += -Wl,-dead_strip
|
export LINKFLAGS += -Wl,-dead_strip
|
||||||
else
|
else
|
||||||
@ -123,7 +113,6 @@ endif
|
|||||||
|
|
||||||
# backward compatability with glibc <= 2.17 for native
|
# backward compatability with glibc <= 2.17 for native
|
||||||
ifeq ($(CPU),native)
|
ifeq ($(CPU),native)
|
||||||
OS := $(shell uname -s)
|
|
||||||
ifeq ($(OS),Linux)
|
ifeq ($(OS),Linux)
|
||||||
ifeq ($(shell ldd --version | awk '/^ldd/{if ($$NF < 2.17) {print "yes"} else {print "no"} }'),yes)
|
ifeq ($(shell ldd --version | awk '/^ldd/{if ($$NF < 2.17) {print "yes"} else {print "no"} }'),yes)
|
||||||
LINKFLAGS += -lrt
|
LINKFLAGS += -lrt
|
||||||
@ -134,7 +123,6 @@ endif
|
|||||||
# clumsy way to enable building native on osx:
|
# clumsy way to enable building native on osx:
|
||||||
BUILDOSXNATIVE = 0
|
BUILDOSXNATIVE = 0
|
||||||
ifeq ($(CPU),native)
|
ifeq ($(CPU),native)
|
||||||
OS := $(shell uname -s)
|
|
||||||
ifeq ($(OS),Darwin)
|
ifeq ($(OS),Darwin)
|
||||||
BUILDOSXNATIVE = 1
|
BUILDOSXNATIVE = 1
|
||||||
endif
|
endif
|
||||||
|
@ -3,7 +3,6 @@ MODULE = cpu
|
|||||||
DIRS += periph
|
DIRS += periph
|
||||||
DIRS += vfs
|
DIRS += vfs
|
||||||
|
|
||||||
OS := $(shell uname -s)
|
|
||||||
ifeq ($(OS),Darwin)
|
ifeq ($(OS),Darwin)
|
||||||
CFLAGS += -D_XOPEN_SOURCE=600 -D_DARWIN_C_SOURCE
|
CFLAGS += -D_XOPEN_SOURCE=600 -D_DARWIN_C_SOURCE
|
||||||
endif
|
endif
|
||||||
|
@ -16,7 +16,6 @@ else
|
|||||||
CFLAGS += -DFATFS_FFCONF_OPT_FS_NORTC=1
|
CFLAGS += -DFATFS_FFCONF_OPT_FS_NORTC=1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
OS := $(shell uname -s)
|
|
||||||
ifeq ($(OS),Darwin)
|
ifeq ($(OS),Darwin)
|
||||||
CFLAGS += -Wno-empty-body
|
CFLAGS += -Wno-empty-body
|
||||||
endif
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user