-
Notifications
You must be signed in to change notification settings - Fork 16
/
Make.inc
64 lines (50 loc) · 840 Bytes
/
Make.inc
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# -*- mode: makefile-gmake -*-
OS = $(shell uname)
ARCH = $(shell uname -m)
FC = gfortran
FFLAGS-add += -O3
USEGCC = 1
USECLANG = 0
CFLAGS-add += -Wall -O3 -ffast-math -DCFODE_STATIC
ifeq ($(USECLANG),1)
USEGCC = 0
CC = clang
endif
ifeq ($(USEGCC),1)
CC = gcc
endif
ifeq ($(OS), Linux)
SHLIB_EXT = so
CFLAGS-add+=-fPIC
FFLAGS-add+=-fPIC
endif
ifeq ($(OS), FreeBSD)
SHLIB_EXT = so
CFLAGS-add+=-fPIC
FFLAGS-add+=-fPIC
endif
ifeq ($(OS), OpenBSD)
SHLIB_EXT = so
CFLAGS-add+=-fPIC
FFLAGS-add+=-fPIC
endif
ifeq ($(OS), Darwin)
SHLIB_EXT = dylib
CFLAGS-add+=-fPIC
FFLAGS-add+=-fPIC
endif
ifeq ($(OS), WINNT)
SHLIB_EXT = dll
endif
ifeq ($(OS), MINGW64_NT-10.0)
SHLIB_EXT = dll
endif
ifeq ($(OS), MINGW32_NT-10.0-WOW)
SHLIB_EXT = dll
endif
# SunOS with gcc
ifeq ($(OS), SunOS)
SHLIB_EXT = so
CFLAGS-add+=-fPIC
FFLAGS-add+=-fPIC
endif