-
Notifications
You must be signed in to change notification settings - Fork 38
/
Copy pathmake.inc
62 lines (49 loc) · 1.5 KB
/
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
#
# Compilers
#
CXX := g++
CC := gcc
FC := gfortran
#
# Compiler and linker flags
#
CXXFLAGS += -msse3 -mfpmath=sse
CXXFLAGS += -std=c++11 -O3 -fomit-frame-pointer -Wall
FFLAGS += -Wall -fimplicit-none -O3
LDLIBS += -lm
#
# Enable precompiled headers
#
ULMBLAS_H = $(TOPDIR)/ulmblas/ulmblas.h
ULMBLAS_PCH = $(BUILD_DIR)/ulmblas.h.gch
ULMBLAS_D = $(BUILD_DIR)/ulmblas.d
#INCLUDE_PCH = -I $(BUILD_DIR) -include ulmblas.h
INCLUDE_PCH = -include-pch $(ULMBLAS_PCH)
CXXFLAGS += -Winvalid-pch
#
# Flags used for building the ATLAS benchmark suite
#
BENCH_CFLAGS := -c -DL2SIZE=4194304 -DAdd_ -DF77_INTEGER=int -DStringSunStyle \
-DATL_SSE2 -DDREAL
#
# Header file names
#
CLAPACK_HEADER_NAME := clapack.h
ATLLAPACK_HEADER_NAME := atllapack.h
#
# Recursive wildcard
#
rwildcard = $(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2) $(filter $(subst *,%,$2),$d))
# Flags used for linking Fortran with a C++ library. We use the C++ compiler
# as linker font end.
FCLIBSEARCH := $(shell $(FC) -print-search-dirs \
| grep libraries \
| sed 's,libraries:.*=,,' \
| sed 's,:, ,g')
LDF77FLAGS += $(shell for path in $(FCLIBSEARCH); \
do \
if [ -d "$$path" ]; then \
echo "-L $$path "; \
fi; \
done)
LDF77LIBS += -lgfortran