mirror of https://github.com/ARMmbed/mbed-os.git
Fix checking if we are compiling for Linux.
parent
49cb83fab3
commit
8bb0f54ae9
9
Makefile
9
Makefile
|
@ -1,8 +1,15 @@
|
|||
ifeq ($(shell uname -s),Linux)
|
||||
|
||||
# Check if we are compiling for Linux using GCC
|
||||
ifneq (,$(findstring gcc,$(CC)))
|
||||
TARGET_IS_LINUX := $(shell $(CC) -dM -E - < /dev/null | grep __linux >/dev/null && echo "yes" || echo "no")
|
||||
endif
|
||||
|
||||
ifeq (yes,$(TARGET_IS_LINUX))
|
||||
SRCS := $(wildcard linux/*)
|
||||
else
|
||||
SRCS := $(wildcard source/*)
|
||||
endif
|
||||
|
||||
LIB := librand.a
|
||||
EXPORT_HEADERS := mbed-client-randlib
|
||||
|
||||
|
|
Loading…
Reference in New Issue