add a new target in the Makefile to generate the llvm wrapper
[scilab.git] / scilab / modules / jit / Makefile.am
1 ##
2 ##  Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 ##  Copyright (C) 2013 - S/E - Sylvestre Ledru
4 ##
5 ##  This file must be used under the terms of the CeCILL.
6 ##  This source file is licensed as described in the file COPYING, which
7 ##  you should have received as part of this distribution.  The terms
8 ##  are also available at
9 ##  http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
10 ##
11 ##
12
13 pkglib_LTLIBRARIES      = libscijit.la
14
15 BUILT_SOURCES = src/cpp/llvm-wrapper-generated.cpp
16 src/cpp/llvm-wrapper-generated.cpp: src/cpp/llvm-wrapper.cpp
17         clang++ -emit-llvm  -I$(top_srcdir)/modules/types/includes/ -I$(top_srcdir)/modules/operations/includes/ -I$(top_srcdir)/modules/core/includes/  -I$(top_srcdir)/modules/ast/includes/ -I$(top_srcdir)/modules/localization/includes/ $(EIGEN_CPPFLAGS) -c src/cpp/llvm-wrapper.cpp -o - |  llc -march=cpp -cppgen=contents -o src/cpp/llvm-wrapper-generated.cpp
18
19 JIT_CPP_SOURCES = \
20         src/cpp/jitter.cpp
21
22 GATEWAY_CPP_SOURCES =   \
23 sci_gateway/cpp/sci_runASTwithVMKit.cpp
24
25 libscijit_la_CPPFLAGS = \
26         -Iincludes \
27         -Isrc/cpp \
28     -I$(top_srcdir)/modules/types/includes \
29     -I$(top_srcdir)/modules/localization/includes \
30     -I$(top_srcdir)/modules/symbol/includes \
31     -I$(top_srcdir)/modules/operations/includes \
32     -I$(top_srcdir)/modules/system_env/includes \
33     -I$(top_srcdir)/modules/threads/includes \
34     -I$(top_srcdir)/modules/api_scilab/includes \
35     -I$(top_srcdir)/modules/dynamic_link/includes \
36     -I$(top_srcdir)/modules/string/includes \
37     -I$(top_srcdir)/modules/console/includes \
38     -I$(top_srcdir)/modules/ast/includes \
39     -I$(top_srcdir)/modules/output_stream/includes \
40     -I$(top_srcdir)/modules/functions_manager/includes \
41     $(EIGEN_CPPFLAGS) \
42         $(VMKIT_CPPFLAGS) \
43         $(AM_CPPFLAGS)
44
45 libscijit_la_SOURCES = $(JIT_CPP_SOURCES) $(GATEWAY_CPP_SOURCES)
46
47 libscijit_la_includedir=$(pkgincludedir)
48 libscijit_la_include_HEADERS =
49
50 ####################
51 ## Automated test ##
52 ####################
53 check_INCLUDES = \
54     -I$(top_srcdir)/modules/symbol/includes \
55         -Iincludes/ \
56         -Isrc/cpp
57
58 check_LDADD     = \
59     $(top_builddir)/modules/symbol/libsciSymbol.la \
60         $(top_builddir)/modules/jit/libscijit.la \
61         $(top_builddir)/modules/types/libsciTypes.la
62
63 testConstExp_SOURCES    = src/cpp/testConstExp.cpp
64 testConstExp_CXXFLAGS   = $(check_INCLUDES)
65 testConstExp_LDADD      = $(check_LDADD)
66
67 testVarExp_SOURCES      = src/cpp/testVarExp.cpp
68 testVarExp_CXXFLAGS     = $(check_INCLUDES)
69 testVarExp_LDADD        = $(check_LDADD)
70
71 testControlExp_SOURCES  = src/cpp/testControlExp.cpp
72 testControlExp_CXXFLAGS = $(check_INCLUDES)
73 testControlExp_LDADD    = $(check_LDADD)
74
75 include $(top_srcdir)/Makefile.incl.am
76