Skip to content

Commit eb21e8a

Browse files
committed
don't alter toolchain vars if already provided
1 parent b34f107 commit eb21e8a

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

Make.inc

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,41 +10,41 @@ VERSION = 0.7.0
1010
SOMAJOR = 3
1111
SOMINOR = 0
1212
DESTDIR =
13-
prefix = /usr/local
14-
bindir = $(prefix)/bin
15-
libdir = $(prefix)/lib
16-
includedir = $(prefix)/include
13+
prefix ?= /usr/local
14+
bindir ?= $(prefix)/bin
15+
libdir ?= $(prefix)/lib
16+
includedir ?= $(prefix)/include
1717

1818
ifeq ($(OS), FreeBSD)
19-
pkgconfigdir = $(prefix)/libdata/pkgconfig
19+
pkgconfigdir ?= $(prefix)/libdata/pkgconfig
2020
else
21-
pkgconfigdir = $(libdir)/pkgconfig
21+
pkgconfigdir ?= $(libdir)/pkgconfig
2222
endif
2323

24-
USEGCC = 1
25-
USECLANG = 0
24+
USEGCC ?= 1
25+
USECLANG ?= 0
2626

2727
ifneq (,$(findstring $(OS),Darwin FreeBSD OpenBSD))
28-
USEGCC = 0
29-
USECLANG = 1
28+
USEGCC ?= 0
29+
USECLANG ?= 1
3030
endif
3131

32-
AR = $(TOOLPREFIX)ar
32+
AR ?= $(TOOLPREFIX)ar
3333

3434
ifeq ($(ARCH),wasm32)
35-
CC = clang-8
36-
USEGCC = 0
35+
CC ?= clang-8
36+
USEGCC ?= 0
3737
CFLAGS_add += -fno-builtin -fno-strict-aliasing
3838
endif
3939

4040
ifeq ($(USECLANG),1)
41-
USEGCC = 0
42-
CC = clang
41+
USEGCC ?= 0
42+
CC ?= clang
4343
CFLAGS_add += -fno-builtin -fno-strict-aliasing
4444
endif
4545

4646
ifeq ($(USEGCC),1)
47-
CC = $(TOOLPREFIX)gcc
47+
CC ?= $(TOOLPREFIX)gcc
4848
CFLAGS_add += -fno-gnu89-inline -fno-builtin
4949
endif
5050

0 commit comments

Comments
 (0)