blob: 681a31dc63e62215dbd5cc49173369806656f23d [file] [log] [blame]
Austin Schuh16ce3c72018-01-28 16:17:08 -08001###################################################################################################
2# #
3# This file is part of HPIPM. #
4# #
5# HPIPM -- High Performance Interior Point Method. #
6# Copyright (C) 2017 by Gianluca Frison. #
7# Developed at IMTEK (University of Freiburg) under the supervision of Moritz Diehl. #
8# All rights reserved. #
9# #
10# HPMPC is free software; you can redistribute it and/or #
11# modify it under the terms of the GNU Lesser General Public #
12# License as published by the Free Software Foundation; either #
13# version 2.1 of the License, or (at your option) any later version. #
14# #
15# HPMPC is distributed in the hope that it will be useful, #
16# but WITHOUT ANY WARRANTY; without even the implied warranty of #
17# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. #
18# See the GNU Lesser General Public License for more details. #
19# #
20# You should have received a copy of the GNU Lesser General Public #
21# License along with HPMPC; if not, write to the Free Software #
22# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA #
23# #
24# Author: Gianluca Frison, gianluca.frison (at) imtek.uni-freiburg.de #
25# #
26###################################################################################################
27
28# Target architecture
29TARGET = GENERIC
30
31# BLAS and LAPACK version (for LA=BLAS in BLASFEO)
32REF_BLAS = 0
33#REF_BLAS = OPENBLAS
34#REF_BLAS = NETLIB
35#REF_BLAS = MKL
36#REF_BLAS = BLIS
37#REF_BLAS = ATLAS
38
39# operating system
40#UNAME_S := $(shell uname -s)
41#ifeq ($(UNAME_S),Linux)
42# OS = LINUX
43#endif
44#ifeq ($(UNAME_S),Darwin)
45# OS = MAC
46#endif
47#OS = LINUX
48#OS = MAC
49#OS = WINDOWS
50
51# C Compiler
52CC = gcc
53#CC = clang
54#CC = x86_64-w64-mingw32-gcc
55
56# Installation directory
57PREFIX = /opt
58
59# BLASFEO installation directory
60BLASFEO_PATH = /opt/blasfeo
61
62# enable runtine checks
63RUNTIME_CHECKS = 0
64#RUNTIME_CHECKS = 1
65
66# compiler flags
67CFLAGS =
68
69# optimization flags
70CFLAGS += -O2 -fPIC
71
72# debugging flags
73CFLAGS += #-g #-Wall -pedantic -Wfloat-equal #-pg
74
75# search directories
76CFLAGS += -I$(BLASFEO_PATH)/include
77
78# definirions
79#ifeq ($(OS), LINUX)
80#CFLAGS += -DOS_LINUX
81#endif
82#ifeq ($(OS), MAC)
83#CFLAGS += -DOS_MAC
84#endif
85#ifeq ($(OS), WINDOWS)
86#CFLAGS += -DOS_WINDOWS
87#endif
88
89ifeq ($(REF_BLAS), 0)
90CFLAGS +=
91endif
92ifeq ($(REF_BLAS), OPENBLAS)
93CFLAGS += -DREF_BLAS_OPENBLAS -I/opt/openblas/include
94endif
95ifeq ($(REF_BLAS), BLIS)
96CFLAGS += -DREF_BLAS_BLIS -std=c99
97endif
98ifeq ($(REF_BLAS), NETLIB)
99CFLAGS += -DREF_BLAS_NETLIB
100endif
101ifeq ($(REF_BLAS), MKL)
102CFLAGS += -DREF_BLAS_MKL -m64 -I/opt/intel/mkl/include
103endif
104ifeq ($(REF_BLAS), ATLAS)
105CFLAGS += -DREF_BLAS_ATLAS
106endif
107
108ifeq ($(RUNTIME_CHECKS), 1)
109CFLAGS += -DRUNTIME_CHECKS
110endif
111
112# architecture-specific flags
113ifeq ($(TARGET), GENERIC)
114CFLAGS += -DTARGET_GENERIC
115endif
116