X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=Makefile;h=44acdee993cf9c99a72b2773dac92a81f4337e7c;hb=202034fd60eca48195c1683477c190f79a1c693f;hp=98aa995bc124269057925838a534e14f8d2e33e5;hpb=63e4489d01ad0262d995c6d9a5f1a1bab719c917;p=wasi-libc.git diff --git a/Makefile b/Makefile index 98aa995..44acdee 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,13 @@ # These variables are specifically meant to be overridable via the make # command-line. -CC ?= clang +# ?= doesn't work for CC and AR because make has a default value for them. +ifeq ($(origin CC), default) +CC := clang +endif NM ?= $(patsubst %clang,%llvm-nm,$(filter-out ccache sccache,$(CC))) -AR ?= $(patsubst %clang,%llvm-ar,$(filter-out ccache sccache,$(CC))) +ifeq ($(origin AR), default) +AR = $(patsubst %clang,%llvm-ar,$(filter-out ccache sccache,$(CC))) +endif EXTRA_CFLAGS ?= -O2 -DNDEBUG # The directory where we build the sysroot. SYSROOT ?= $(CURDIR)/sysroot