We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 49cb83f commit 8bb0f54Copy full SHA for 8bb0f54
Makefile
@@ -1,8 +1,15 @@
1
-ifeq ($(shell uname -s),Linux)
+
2
+# Check if we are compiling for Linux using GCC
3
+ifneq (,$(findstring gcc,$(CC)))
4
+TARGET_IS_LINUX := $(shell $(CC) -dM -E - < /dev/null | grep __linux >/dev/null && echo "yes" || echo "no")
5
+endif
6
7
+ifeq (yes,$(TARGET_IS_LINUX))
8
SRCS := $(wildcard linux/*)
9
else
10
SRCS := $(wildcard source/*)
11
endif
12
13
LIB := librand.a
14
EXPORT_HEADERS := mbed-client-randlib
15
0 commit comments