Austin Schuh | 9a24b37 | 2018-01-28 16:12:29 -0800 | [diff] [blame] | 1 | ################################################################################################### |
| 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 | |
| 29 | include ../Makefile.rule |
| 30 | |
| 31 | ifeq ($(REF_BLAS), 0) |
| 32 | LIBS = -lm |
| 33 | endif |
| 34 | ifeq ($(REF_BLAS), OPENBLAS) |
| 35 | LIBS = /opt/openblas/lib/libopenblas.a -pthread -lm |
| 36 | endif |
| 37 | ifeq ($(REF_BLAS), BLIS) |
| 38 | LIBS = -lblis -lm -fopenmp |
| 39 | endif |
| 40 | ifeq ($(REF_BLAS), NETLIB) |
| 41 | LIBS = /opt/netlib/liblapack.a /opt/netlib/libblas.a -lgfortran -lm |
| 42 | endif |
| 43 | ifeq ($(REF_BLAS), MKL) |
| 44 | LIBS = -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 |
| 45 | endif |
| 46 | |
| 47 | ifneq ($(NUM_THREAD), 1) |
| 48 | LIBS += -pthread |
| 49 | endif |
| 50 | |
| 51 | #OBJS_TEST = example_d_lu_factorization.o |
| 52 | #OBJS_TEST = example_s_lu_factorization.o |
| 53 | OBJS_TEST = tools.o example_d_riccati_recursion.o |
| 54 | #OBJS_TEST = tools.o example_s_riccati_recursion.o |
| 55 | |
| 56 | all: clean obj run |
| 57 | |
| 58 | obj: $(OBJS_TEST) |
| 59 | cp ../libblasfeo.a . |
| 60 | $(CC) -o test.out $(OBJS_TEST) -L. libblasfeo.a $(LIBS) #-pg |
| 61 | |
| 62 | run: |
| 63 | ./test.out |
| 64 | |
| 65 | clean: |
| 66 | rm -f *.o |
| 67 | rm -f test.out |
| 68 | rm -f libblasfeo.a |
| 69 | |