summaryrefslogtreecommitdiff
blob: 26b33349a3a9fb811f25a808fda58ae1ea5cc035 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
--- Make.inc.orig	2014-03-31 12:12:44.564468385 -0700
+++ Make.inc	2014-03-31 12:13:17.094660733 -0700
@@ -8,27 +8,18 @@
 libdir = $(prefix)/lib
 includedir = $(prefix)/include
 
-FC = gfortran
-FFLAGS += -O3
+FC ?= gfortran
 
-USEGCC = 1
-USECLANG = 0
 
-ifeq ($(OS), Darwin)
-USEGCC = 0
-USECLANG = 1
-endif
-
-AR = ar
+AR ?= ar
+CC ?= gcc
 
-ifeq ($(USECLANG),1)
+ifneq (,$(findstring clang,$(CC)))
 USEGCC = 0
-CC = clang
 CFLAGS_add += -fno-builtin
 endif
 
-ifeq ($(USEGCC),1)
-CC = gcc
+ifneq (,$(findstring gcc,$(CC)))
 CFLAGS_add += -fno-gnu89-inline
 endif
 
@@ -37,7 +28,7 @@
 $(error "the mingw32 compiler you are using fails the openblas testsuite. please see the Julia README.windows.md document for a replacement")
 endif
 
-CFLAGS_add += -std=c99 -Wall -O3 -I$(OPENLIBM_HOME) -I$(OPENLIBM_HOME)/include -I$(OPENLIBM_HOME)/ld80 -I$(OPENLIBM_HOME)/$(ARCH) -I$(OPENLIBM_HOME)/src -DASSEMBLER -D__BSD_VISIBLE -Wno-implicit-function-declaration
+CFLAGS_add += -std=c99 -Wall -I$(OPENLIBM_HOME) -I$(OPENLIBM_HOME)/include -I$(OPENLIBM_HOME)/ld80 -I$(OPENLIBM_HOME)/$(ARCH) -I$(OPENLIBM_HOME)/src -DASSEMBLER -D__BSD_VISIBLE -Wno-implicit-function-declaration
 
 default: all