comparison inst/private/get_vars.m.in @ 230:1a3674836579

Provide flags for just-in-time compilation * src/configure.ac: add inst/private/get_vars.m as configured file * inst/private/get_vars.m.in: a function returning proper compiler or linker flags * inst/provate/generate_makefile.m: use flags * src/Makefile.in: add get_vars.m in the cleanall recipe
author Eugenio Gianniti <eugenio.gianniti@mail.polimi.it>
date Fri, 13 Jun 2014 18:45:40 +0200
parents
children 5e9b5bbdc56b
comparison
equal deleted inserted replaced
229:194f8c66b45a 230:1a3674836579
1 ## Copyright (C) 2014 Eugenio Gianniti <eugenio.gianniti@mail.polimi.it>
2 ##
3 ## This program is free software; you can redistribute it and/or modify it under
4 ## the terms of the GNU General Public License as published by the Free Software
5 ## Foundation; either version 3 of the License, or (at your option) any later
6 ## version.
7 ##
8 ## This program is distributed in the hope that it will be useful, but WITHOUT
9 ## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 ## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
11 ## details.
12 ##
13 ## You should have received a copy of the GNU General Public License along with
14 ## this program; if not, see <http://www.gnu.org/licenses/>.
15
16
17 ## -*- texinfo -*-
18 ## function for internal usage only
19 ## @end deftypefn
20
21 function var = get_vars (name)
22 persistent opts = {"CPPFLAGS",
23 "LIBS"};
24 select = validatestring (name, opts, "get_vars", "name");
25 switch (select)
26 case "CPPFLAGS"
27 var = "@DENSE_CPPFLAGS@ @DOLFIN_CPPFLAGS@ @EIGEN_CPPFLAGS@";
28 case "LIBS"
29 tokens = strsplit (strtrim ("@EIGEN_LIBS@ @DOLFIN_LIBS@"));
30 var = strjoin (tokens, '" "');
31 var = ['"', var, '"'];
32 otherwise
33 error ("get_vars: the requested variable is not available.");
34 endswitch
35 endfunction