We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 56dc827 commit 6732b84Copy full SHA for 6732b84
1 file changed
GNUmakefile
@@ -25,10 +25,13 @@ MAKEFILE_DIR := $(dir $(MAKEFILE_PATH))
25
BUILD_DIR := $(MAKEFILE_DIR)/dist
26
27
# ARGS
28
-# Set a compiler when running on Linux via `make CC=gcc` / `make CC=clang`
29
-CC = gcc
30
-ifneq ($(filter $(CC),gcc clang aarch64-linux-gnu-gcc arm-linux-gnueabihf-gcc musl-gcc),$(CC))
31
-$(error Invalid compiler specified: `$(CC)`)
+CC ?= gcc
+ifeq ($(CC), cc)
+ ifeq ($(shell uname),Darwin)
+ CC = clang
32
+ else
33
+ CC = gcc
34
+ endif
35
endif
36
37
# Allow to add arch-target for macOS CI cross compilation
0 commit comments