blob: 7204cba20a934ada7b4c05f841b364e394afc925 [file] [log] [blame]
Austin Schuh9a24b372018-01-28 16:12:29 -08001###################################################################################################
2# #
3# This file is part of BLASFEO. #
4# #
5# BLASFEO -- BLAS For Embedded Optimization. #
6# Copyright (C) 2016-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, giaf (at) dtu.dk #
25# gianluca.frison (at) imtek.uni-freiburg.de #
26# #
27###################################################################################################
28
29include ../Makefile.rule
30
31ifeq ($(REF_BLAS), 0)
32LIBS = -lm
33endif
34ifeq ($(REF_BLAS), OPENBLAS)
35LIBS = /opt/openblas/lib/libopenblas.a -pthread -lm
36endif
37ifeq ($(REF_BLAS), BLIS)
38LIBS = -lblis -lm -fopenmp
39endif
40ifeq ($(REF_BLAS), NETLIB)
41LIBS = /opt/netlib/liblapack.a /opt/netlib/libblas.a -lgfortran -lm
42endif
43ifeq ($(REF_BLAS), MKL)
44LIBS = -Wl,--start-group /opt/intel/mkl/lib/intel64/libmkl_gf_lp64.a /opt/intel/mkl/lib/intel64/libmkl_core.a /opt/intel/mkl/lib/intel64/libmkl_sequential.a -Wl,--end-group -ldl -lpthread -lm
45endif
46
47ifneq ($(NUM_THREAD), 1)
48LIBS += -pthread
49endif
50
51#OBJS_TEST = example_d_lu_factorization.o
52#OBJS_TEST = example_s_lu_factorization.o
53OBJS_TEST = tools.o example_d_riccati_recursion.o
54#OBJS_TEST = tools.o example_s_riccati_recursion.o
55
56all: clean obj run
57
58obj: $(OBJS_TEST)
59 cp ../libblasfeo.a .
60 $(CC) -o test.out $(OBJS_TEST) -L. libblasfeo.a $(LIBS) #-pg
61
62run:
63 ./test.out
64
65clean:
66 rm -f *.o
67 rm -f test.out
68 rm -f libblasfeo.a
69