source: branches/NewCasADiInterface/Makefile.am @ 13800

Last change on this file since 13800 was 5865, checked in by Tove Bergdahl, 6 years ago

#3400: Removed .dll file endings when copying Casadi shared libs during make install_casadi. Now copying all files instead.

File size: 18.2 KB
Line 
1#
2#    Copyright (C) 2009 Modelon AB
3#
4#    This program is free software: you can redistribute it and/or modify
5#    it under the terms of the Common Public License as published by
6#    IBM, version 1.0 of the License.
7#
8#    This program is distributed in the hope that it will be useful,
9#    but WITHOUT ANY WARRANTY. See the Common Public License for more details.
10#
11#    You should have received a copy of the Common Public License
12#    along with this program.  If not, see
13#     <http://www.ibm.com/developerworks/library/os-cpl.html/>.
14
15
16AUTOMAKE_OPTIONS = foreign
17ACLOCAL_AMFLAGS = -I m4
18
19
20# EXTRA_DIST =
21
22# SUBDIRS = ThirdParty/Sundials ThirdParty/Zlib ThirdParty/Minizip ThirdParty/Expat JMI/src ThirdParty/Blas ThirdParty/Lapack external/FMILibrary
23SUBDIRS = ThirdParty/Sundials JMI/src ThirdParty/Blas ThirdParty/Lapack external/FMILibrary RuntimeLibrary
24
25assimulo_install_dir=$(abs_builddir)/Assimulo_install
26pymodelica_install_dir=$(abs_builddir)/pymodelica_install
27pyfmi_install_dir=$(abs_builddir)/PyFMI_install
28pyjmi_install_dir=$(abs_builddir)/PyJMI_install
29
30bindistdir=JModelica.org-$(VERSION)-bin
31
32casadi:
33        cd $(abs_builddir)/ThirdParty/CasADi; \
34        make -f Makefile
35
36install_casadi: casadi
37        mkdir -p $(DESTDIR)$(prefix)/ThirdParty/CasADi/lib
38        cp $(abs_builddir)/casadi_build/lib/*.* $(DESTDIR)$(prefix)/ThirdParty/CasADi/lib
39        mkdir -p $(DESTDIR)$(prefix)/Python/
40        cd $(abs_builddir)/casadi_build/python/; \
41        find . -type f |grep -v /.svn | grep -v .pyc | grep -v ~ |tar c -T - -f - | tar x -C $(DESTDIR)$(prefix)/Python/
42
43## Install for CasADiInterface, Variables and targets.
44## MC_interface installs the system with Python.
45## If C++ compilation/tests are wanted there is the target MC_interface_cplusplus
46
47MC_INTERFACE=$(abs_top_srcdir)/ModelicaCasADiInterface
48
49export CASADI_HOME=$(abs_top_srcdir)/ThirdParty/CasADi/CasADi
50MC_SRC=$(abs_top_srcdir)/Compiler/ModelicaCompilerCasADi
51OC_SRC=$(abs_top_srcdir)/Compiler/OptimicaCompilerCasADi
52
53# The modelica casadi interface is built into a build folder
54MC_BUILD=$(abs_builddir)/ModelicaCasADiInterfaceBuild
55# Jars from the modified modelica and optimica compilers are put into the JModelica folder
56MC_COMPILERS_DIR=$(MC_BUILD)/JModelica.org
57MC_JARS=$(MC_COMPILERS_DIR)/jars
58MC_MODELICA_JARS=$(MC_JARS)/modelica
59MC_OPTIMICA_JARS=$(MC_JARS)/optimica
60
61CASADI_BUILD_DIR=$(abs_builddir)/casadi_build
62
63
64# The CMake for ModelicaCasADi needs these variables.
65export MODELICA_CASADI_HOME= $(MC_INTERFACE)
66export MC_BUILD
67export IPOPT_HOME
68export CASADI_BUILD_DIR
69 
70casadi_interface: casadi install_casadi $(MC_JARS) modelicacasadi_wrapper $(DESTDIR)$(prefix)/Python/casadi_interface $(MC_BUILD)/test
71
72ifcasadi:
73        mkdir -p $(MC_BUILD)/ifcasadi; \
74        cd $(MC_BUILD)/ifcasadi; \
75        case $(build) in \
76        *-cygwin*) \
77        cmake $(MC_SRC)/src/swig -G "MSYS Makefiles" ;; \
78        *-mingw*) \
79        cmake $(MC_SRC)/src/swig -G "MSYS Makefiles" ;; \
80        *) \
81        cmake $(MC_SRC)/src/swig ;; \
82        esac
83        cd $(MC_BUILD)/ifcasadi;  make
84
85$(MC_JARS): $(MC_MODELICA_JARS) $(MC_OPTIMICA_JARS)
86        cp $(abs_top_srcdir)/ThirdParty/Beaver/beaver-0.9.6.1/lib/beaver.jar $(MC_JARS)
87
88mc_modelica: ifcasadi
89        cd $(MC_SRC); ant -f build.xml
90
91mc_optimica: ifcasadi
92        cd $(OC_SRC); ant -f build.xml
93
94$(MC_SRC)/bin/ModelicaCompiler.jar: mc_modelica
95$(MC_SRC)/bin/util.jar:             mc_modelica
96
97$(OC_SRC)/bin/OptimicaCompiler.jar: mc_optimica
98$(OC_SRC)/bin/util.jar:             mc_optimica
99
100$(MC_MODELICA_JARS): $(MC_SRC)/bin/ModelicaCompiler.jar $(MC_SRC)/bin/util.jar
101        rm -rf $(MC_MODELICA_JARS)
102        mkdir -p $(MC_MODELICA_JARS)
103        cp $(MC_SRC)/bin/ModelicaCompiler.jar $(MC_MODELICA_JARS)
104        cp $(MC_SRC)/bin/util.jar $(MC_MODELICA_JARS)
105
106$(MC_OPTIMICA_JARS): $(OC_SRC)/bin/OptimicaCompiler.jar $(OC_SRC)/bin/util.jar
107        rm -rf $(MC_OPTIMICA_JARS)
108        mkdir -p $(MC_OPTIMICA_JARS)
109        cp $(OC_SRC)/bin/OptimicaCompiler.jar $(MC_OPTIMICA_JARS)
110        cp $(OC_SRC)/bin/util.jar $(MC_OPTIMICA_JARS)
111
112$(MC_BUILD)/modelicacasadi_wrapper/swig/modelicacasadi_wrapper.py: modelicacasadi_wrapper
113
114modelicacasadi_wrapper:
115        mkdir -p $(MC_BUILD)/modelicacasadi_wrapper; \
116        cd $(MC_BUILD)/modelicacasadi_wrapper; \
117        case $(build) in \
118        *-cygwin*) \
119        cmake $(MC_INTERFACE) -G "MSYS Makefiles" ;; \
120        *-mingw*) \
121        cmake $(MC_INTERFACE) -G "MSYS Makefiles" ;; \
122        *) \
123        cmake $(MC_INTERFACE) ;; \
124        esac
125        cd $(MC_BUILD)/modelicacasadi_wrapper;  make modelicacasadi_wrapper
126
127
128 $(DESTDIR)$(prefix)/Python/casadi_interface: $(MC_BUILD)/modelicacasadi_wrapper/swig/modelicacasadi_wrapper.py  $(MC_INTERFACE)/python/modelica_casadi_transfer_wrapper.py
129        mkdir -p $(DESTDIR)$(prefix)/Python/modelicacasadi_wrapper
130        cp $(MC_BUILD)/modelicacasadi_wrapper/swig/*modelicacasadi_wrapper* $(DESTDIR)$(prefix)/Python/modelicacasadi_wrapper
131        rm -f $(DESTDIR)$(prefix)/Python/modelicacasadi_wrapper/__init__.py
132        touch $(DESTDIR)$(prefix)/Python/modelicacasadi_wrapper/__init__.py
133        echo "from modelicacasadi_wrapper import *" >> $(DESTDIR)$(prefix)/Python/modelicacasadi_wrapper/__init__.py
134        mkdir -p $(DESTDIR)$(prefix)/Python/casadi_interface
135        rm -f $(DESTDIR)$(prefix)/Python/casadi_interface/__init__.py
136        touch $(DESTDIR)$(prefix)/Python/casadi_interface/__init__.py
137        echo "from modelica_casadi_transfer_wrapper import *" >> $(DESTDIR)$(prefix)/Python/casadi_interface/__init__.py
138        cp $(MC_INTERFACE)/python/modelica_casadi_transfer_wrapper.py $(DESTDIR)$(prefix)/Python/casadi_interface
139
140$(MC_BUILD)/test: $(MC_INTERFACE)/test/pythonTests/*py $(MC_INTERFACE)/test/common/atomic*
141        mkdir -p $(MC_BUILD)/test/pythonTests
142        mkdir -p $(MC_BUILD)/test/common
143        cp $(MC_INTERFACE)/test/pythonTests/*py $(MC_BUILD)/test/pythonTests
144        cp $(MC_INTERFACE)/test/common/atomic* $(MC_BUILD)/test/common
145        cd $(CASADI_BUILD_DIR)/python/ ; \
146        rm -f $(MC_BUILD)/test/pythonTests/runtests.sh
147        touch $(MC_BUILD)/test/pythonTests/runtests.sh
148        chmod u+x $(MC_BUILD)/test/pythonTests/runtests.sh
149        echo "PYTHONPATH=:$(DESTDIR)$(prefix)/Python/ JMODELICA_HOME=$(DESTDIR)$(prefix) nosetests *.py" >> $(MC_BUILD)/test/pythonTests/runtests.sh
150       
151build-python-packages:
152if WITH_SUNDIALS
153if WITH_SUPERLU
154        cd $(abs_top_srcdir)/external/Assimulo; \
155        python setup.py install --sundials-home=$(SUNDIALS_HOME) --superlu-home=$(SUPERLU_HOME) --blas-home=$(abs_builddir)/ThirdParty/Blas/ --lapack-home=$(abs_builddir)/ThirdParty/Lapack/ --prefix=$(assimulo_install_dir)
156endif
157endif
158if WITH_SUNDIALS
159if !WITH_SUPERLU
160        cd $(abs_top_srcdir)/external/Assimulo; \
161        python setup.py install --sundials-home=$(SUNDIALS_HOME) --blas-home=$(abs_builddir)/ThirdParty/Blas/ --lapack-home=$(abs_builddir)/ThirdParty/Lapack/ --prefix=$(assimulo_install_dir)
162endif
163endif
164        cd $(abs_top_srcdir)/Python/src; \
165        python setup_pymodelica.py install --prefix=$(pymodelica_install_dir); \
166        rm -rf build
167
168        cd $(abs_top_srcdir)/external/PyFMI; \
169        python setup.py install --fmil-home=$(abs_builddir)/FMIL_install/ --prefix=$(pyfmi_install_dir); \
170        rm -rf build
171
172        cd $(abs_top_srcdir)/Python/src; \
173        python setup_pyjmi.py install --prefix=$(pyjmi_install_dir); \
174        rm -rf build
175
176install-python-packages: build-python-packages
177        mkdir -p $(DESTDIR)$(prefix)/Python
178        cp $(abs_top_srcdir)/Python/src/startup.py $(DESTDIR)$(prefix)/
179        [ $(abs_top_srcdir) == $(DESTDIR)$(prefix) ] && echo "Installing in dist directory, don't copy LICENSE file" || cp $(abs_top_srcdir)/Python/LICENSE $(DESTDIR)$(prefix)/Python
180if WITH_SUNDIALS
181        for pkgdir in lib/python2.5 lib/python2.6 lib/python2.7 lib64/python2.5 lib64/python2.6 lib64/python2.7 Lib; do \
182        if [ -e $(assimulo_install_dir)/$${pkgdir}/site-packages/ ]; \
183        then \
184        cd $(assimulo_install_dir)/$${pkgdir}/site-packages/; \
185        find assimulo -type f |grep -v /.svn | grep -v .pyc | grep -v ~ |tar c -T - -f - | tar x -C $(DESTDIR)$(prefix)/Python; \
186        fi; \
187        done
188endif
189        for pkgdir in lib/python2.5 lib/python2.6 lib/python2.7 lib64/python2.5 lib64/python2.6 lib64/python2.7 Lib; do \
190        if [ -e $(pymodelica_install_dir)/$${pkgdir}/site-packages/ ]; \
191        then \
192        cd $(pymodelica_install_dir)/$${pkgdir}/site-packages/; \
193        find pymodelica -type f |grep -v /.svn | grep -v .pyc | grep -v ~ |tar c -T - -f - | tar x -C $(DESTDIR)$(prefix)/Python; \
194        fi; \
195        done
196        for pkgdir in lib/python2.5 lib/python2.6 lib/python2.7 lib64/python2.5 lib64/python2.6 lib64/python2.7 Lib; do \
197        if [ -e $(pyjmi_install_dir)/$${pkgdir}/site-packages/ ]; \
198        then \
199        cd $(pyjmi_install_dir)/$${pkgdir}/site-packages/; \
200        find pyjmi -type f |grep -v /.svn | grep -v .pyc | grep -v ~ |tar c -T - -f - | tar x -C $(DESTDIR)$(prefix)/Python; \
201        fi; \
202        done
203        for pkgdir in lib/python2.5 lib/python2.6 lib/python2.7 lib64/python2.5 lib64/python2.6 lib64/python2.7 Lib; do \
204        if [ -e $(pyfmi_install_dir)/$${pkgdir}/site-packages/ ]; \
205        then \
206        cd $(pyfmi_install_dir)/$${pkgdir}/site-packages/; \
207        find pyfmi -type f |grep -v /.svn | grep -v .pyc | grep -v ~ |tar c -T - -f - | tar x -C $(DESTDIR)$(prefix)/Python; \
208        fi; \
209        done
210        cd $(abs_top_srcdir)/Python/src/tests_jmodelica/; \
211        mkdir -p $(DESTDIR)$(prefix)/Python/tests_jmodelica; \
212        find . -type f |grep -v /.svn | grep -v .pyc | grep -v ~ |tar c -T - -f - | tar x -C $(DESTDIR)$(prefix)/Python/tests_jmodelica
213        mkdir -p $(DESTDIR)$(prefix)/bin
214        [ -e $(DESTDIR)$(prefix)/bin/jm_python.sh ] && echo "File exists, don't copy jm_python.sh" || cp Python/jm_python.sh $(DESTDIR)$(prefix)/bin/jm_python.sh
215        [ -e $(DESTDIR)$(prefix)/bin/jm_ipython.sh  ] && echo "File exists, don't jm_ipython.sh" || cp Python/jm_ipython.sh $(DESTDIR)$(prefix)/bin/jm_ipython.sh
216        chmod ugo+x $(DESTDIR)$(prefix)/bin/jm_*.sh
217
218all-local: build-python-packages
219if HAVE_ANT
220        cd $(abs_top_srcdir)/Compiler/ModelicaCompiler; \
221        $(ANT_OPTS) $(ANT)
222        cd $(abs_top_srcdir)/Compiler/OptimicaCompiler; \
223        $(ANT_OPTS) $(ANT)
224endif
225        $(abs_top_srcdir)/get_version.sh $(abs_top_srcdir) > $(abs_builddir)/version.txt
226        mkdir -p $(abs_builddir)/Options
227        $(abs_top_srcdir)/run_java.sh org.jmodelica.util.OptionRegistry $(abs_builddir)/Options/options.xml
228
229install-exec-local: install-python-packages
230if HAVE_ANT
231        cp $(abs_top_srcdir)/Compiler/ModelicaCompiler/bin/ModelicaCompiler.jar $(DESTDIR)$(prefix)/lib/
232        cp $(abs_top_srcdir)/Compiler/ModelicaCompiler/bin/util.jar $(DESTDIR)$(prefix)/lib/
233        cp $(abs_top_srcdir)/Compiler/ModelicaCompiler/bin/graphs.jar $(DESTDIR)$(prefix)/lib/
234        cp $(abs_top_srcdir)/Compiler/OptimicaCompiler/bin/OptimicaCompiler.jar $(DESTDIR)$(prefix)/lib/
235endif
236        [ $(abs_top_srcdir) == $(DESTDIR)$(prefix) ] && echo "Installing in dist directory, don't copy LICENSE file" || cp $(abs_top_srcdir)/LICENSE $(DESTDIR)$(prefix)/
237        cp $(abs_top_srcdir)/JMI/LICENSE_GPL $(DESTDIR)$(prefix)/lib/
238        cp $(abs_top_srcdir)/JMI/LICENSE_CPL $(DESTDIR)$(prefix)/lib/
239        cp $(abs_top_srcdir)/JMI/LICENSE_GPL $(DESTDIR)$(prefix)/include/
240        cp $(abs_top_srcdir)/JMI/LICENSE_CPL $(DESTDIR)$(prefix)/include/
241        mkdir -p $(DESTDIR)$(prefix)/Makefiles
242        cp $(abs_top_srcdir)/JMI/LICENSE_GPL $(DESTDIR)$(prefix)/Makefiles/LICENSE
243#       case $(build) in \
244#       *-cygwin*) \
245#       cp $(abs_top_srcdir)/JMI/Makefiles/Makefile.windows $(DESTDIR)$(prefix)/Makefiles/Makefile ;; \
246#       *-mingw*) \
247#       cp $(abs_top_srcdir)/JMI/Makefiles/Makefile.windows $(DESTDIR)$(prefix)/Makefiles/MakeFile ;; \
248#       *-apple*) \
249#       cp $(abs_top_srcdir)/JMI/Makefiles/Makefile.macosx $(DESTDIR)$(prefix)/Makefiles/MakeFile ;; \
250#       *) \
251#       cp $(abs_top_srcdir)/JMI/Makefiles/Makefile.linux $(DESTDIR)$(prefix)/Makefiles/MakeFile ;; \
252#       esac
253        case $(build) in \
254        *-cygwin*) \
255        cp $(abs_top_srcdir)/RuntimeLibrary/Makefiles/Makefile.windows $(DESTDIR)$(prefix)/Makefiles/Makefile ;; \
256        *-mingw*) \
257        cp $(abs_top_srcdir)/RuntimeLibrary/Makefiles/Makefile.windows $(DESTDIR)$(prefix)/Makefiles/MakeFile ;; \
258        *-apple*) \
259        cp $(abs_top_srcdir)/RuntimeLibrary/Makefiles/Makefile.macosx $(DESTDIR)$(prefix)/Makefiles/MakeFile ;; \
260        *) \
261        cp $(abs_top_srcdir)/RuntimeLibrary/Makefiles/Makefile.linux $(DESTDIR)$(prefix)/Makefiles/MakeFile ;; \
262        esac
263
264if WITH_MINGW
265        mkdir -p $(DESTDIR)$(prefix)/ThirdParty/pthreads/lib
266        mkdir -p $(DESTDIR)$(prefix)/ThirdParty/pthreads/include
267        cp $(abs_top_srcdir)/ThirdParty/pthreads/lib/win32/libpthreadGC2-2-9-1.a $(DESTDIR)$(prefix)/ThirdParty/pthreads/lib
268        cp $(abs_top_srcdir)/ThirdParty/pthreads/include/*.h $(DESTDIR)$(prefix)/ThirdParty/pthreads/include
269endif
270
271        mkdir -p $(DESTDIR)$(prefix)/Options
272        cp $(abs_builddir)/Options/options.xml $(DESTDIR)$(prefix)/Options/options.xml
273        mkdir -p $(DESTDIR)$(prefix)/ThirdParty
274        mkdir -p $(DESTDIR)$(prefix)/ThirdParty/Beaver
275        cp $(abs_top_srcdir)/ThirdParty/Beaver/beaver-0.9.6.1/LICENSE $(DESTDIR)$(prefix)/ThirdParty/Beaver/
276        mkdir -p $(DESTDIR)$(prefix)/ThirdParty/Beaver/lib
277        cp $(abs_top_srcdir)/ThirdParty/Beaver/beaver-0.9.6.1/lib/beaver.jar $(DESTDIR)$(prefix)/ThirdParty/Beaver/lib/
278        mkdir -p $(DESTDIR)$(prefix)/ThirdParty/Sundials       
279        cp -r $(SUNDIALS_HOME)/* $(DESTDIR)$(prefix)/ThirdParty/Sundials
280        mkdir -p $(DESTDIR)$(prefix)/ThirdParty/CppAD
281        cp $(CPPAD_HOME)/COPYING $(DESTDIR)$(prefix)/ThirdParty/CppAD
282        mkdir -p $(DESTDIR)$(prefix)/ThirdParty/CppAD/cppad     
283        cp $(CPPAD_HOME)/cppad/*.h $(DESTDIR)$(prefix)/ThirdParty/CppAD/cppad
284        cp $(CPPAD_HOME)/cppad/*.hpp $(DESTDIR)$(prefix)/ThirdParty/CppAD/cppad
285        mkdir -p $(DESTDIR)$(prefix)/ThirdParty/CppAD/cppad/local       
286        cp $(CPPAD_HOME)/cppad/local/*.hpp $(DESTDIR)$(prefix)/ThirdParty/CppAD/cppad/local
287        [ $(abs_top_srcdir) == $(DESTDIR)$(prefix) ] && echo "Installing in dist directory, don't copy MSL" || cd $(abs_top_srcdir)/ThirdParty; find MSL -type f |grep -v /.svn | grep -v ~ |tar c -T - -f - | tar x -C $(DESTDIR)$(prefix)/ThirdParty
288        mkdir -p $(DESTDIR)$(prefix)/CodeGenTemplates
289        cp $(abs_top_srcdir)/JMI/LICENSE_GPL $(DESTDIR)$(prefix)/CodeGenTemplates/LICENSE
290        cp  $(abs_top_srcdir)/Compiler/ModelicaCBackEnd/templates/jmi_modelica_template.c $(DESTDIR)$(prefix)/CodeGenTemplates
291        cp  $(abs_top_srcdir)/Compiler/ModelicaCBackEnd/templates/fmi1_me_modelica_template.c $(DESTDIR)$(prefix)/CodeGenTemplates
292        cp  $(abs_top_srcdir)/Compiler/ModelicaCBackEnd/templates/fmi1_cs_modelica_template.c $(DESTDIR)$(prefix)/CodeGenTemplates
293        cp  $(abs_top_srcdir)/Compiler/ModelicaCBackEnd/templates/fmi2_master_modelica_template.c $(DESTDIR)$(prefix)/CodeGenTemplates
294        cp  $(abs_top_srcdir)/Compiler/ModelicaCBackEnd/templates/fmi_code_gen_template.c $(DESTDIR)$(prefix)/CodeGenTemplates
295        cp  $(abs_top_srcdir)/Compiler/ModelicaCBackEnd/templates/fmi2_functions_common_template.c $(DESTDIR)$(prefix)/CodeGenTemplates
296        cp  $(abs_top_srcdir)/Compiler/ModelicaCBackEnd/templates/fmi2_functions_me_template.c $(DESTDIR)$(prefix)/CodeGenTemplates
297        cp  $(abs_top_srcdir)/Compiler/ModelicaCBackEnd/templates/fmi2_functions_cs_template.c $(DESTDIR)$(prefix)/CodeGenTemplates
298        cp  $(abs_top_srcdir)/Compiler/OptimicaCBackEnd/templates/jmi_optimica_template.c $(DESTDIR)$(prefix)/CodeGenTemplates
299        cp  $(abs_top_srcdir)/Compiler/ModelicaFMUXBackEnd/templates/*.tpl $(DESTDIR)$(prefix)/CodeGenTemplates
300        mkdir -p $(DESTDIR)$(prefix)/XML
301        [ $(abs_top_srcdir) == $(DESTDIR)$(prefix) ] && echo "Installing in dist directory, don't copy XML schemas"  || cp  $(abs_top_srcdir)/XML/*.xsd $(DESTDIR)$(prefix)/XML
302        [ $(abs_top_srcdir) == $(DESTDIR)$(prefix) ] && echo "Installing in dist directory, don't copy XML LICENSE"  || cp  $(abs_top_srcdir)/XML/LICENSE $(DESTDIR)$(prefix)/XML
303        cp  $(abs_builddir)/version.txt $(DESTDIR)$(prefix)
304        cp jm_tests $(DESTDIR)$(prefix)/jm_tests
305        chmod ugo+x $(DESTDIR)$(prefix)/jm_tests
306
307bindistdir: install
308        rm -rf $(bindistdir)
309        mkdir -p $(bindistdir)
310        cp $(DESTDIR)$(prefix)/LICENSE $(bindistdir)
311        cp $(DESTDIR)$(prefix)/startup.py $(bindistdir)
312        cp $(DESTDIR)$(prefix)/version.txt $(bindistdir)
313        cp -r $(DESTDIR)$(prefix)/CodeGenTemplates $(bindistdir)
314        cp -r $(DESTDIR)$(prefix)/Makefiles $(bindistdir)
315        cp -r $(DESTDIR)$(prefix)/Options $(bindistdir)
316        cp -r $(DESTDIR)$(prefix)/Python $(bindistdir)
317        cp -r $(DESTDIR)$(prefix)/ThirdParty $(bindistdir)
318        cp -r $(DESTDIR)$(prefix)/XML $(bindistdir)
319        cp -r $(DESTDIR)$(prefix)/include $(bindistdir)
320        cp -r $(DESTDIR)$(prefix)/lib $(bindistdir)
321if COMPILE_WITH_IPOPT   
322        mkdir -p $(bindistdir)/ThirdParty/Ipopt
323# Copy files
324        cd $(IPOPT_HOME); find * -type f |grep -v /.svn | grep -v ~ |tar c -T - -f - | tar x -C $(abs_builddir)/$(bindistdir)/ThirdParty/Ipopt
325# Copy symbolic links
326        cd $(IPOPT_HOME); find * -type l |grep -v /.svn | grep -v ~ |tar c -T - -f - | tar x -C $(abs_builddir)/$(bindistdir)/ThirdParty/Ipopt
327endif
328
329if WITH_MINGW   
330        mkdir -p $(bindistdir)/ThirdParty/MinGW
331# Copy files
332        cd $(MINGW_HOME); find * -type f |grep -v /.svn | grep -v ~ |tar c -T - -f - | tar x -C $(abs_builddir)/$(bindistdir)/ThirdParty/MinGW
333# Copy symbolic links
334        cd $(MINGW_HOME); find * -type l |grep -v /.svn | grep -v ~ |tar c -T - -f - | tar x -C $(abs_builddir)/$(bindistdir)/ThirdParty/MinGW
335endif
336
337bindist: bindistdir
338        tar -cf $(bindistdir).tar $(bindistdir)
339        gzip -c $(bindistdir).tar > $(bindistdir).tar.gz
340        rm -rf $(bindistdir)
341        rm -rf $(bindistdir).tar
342
343test: install
344        $(prefix)/jm_tests -i
345
346clean-local: clean-frontends clean-python-packages clean-casadi-interface
347
348clean-casadi-interface:
349        rm -rf $(MC_BUILD)
350#       rm -rf $(DESTDIR)$(prefix)/Python/casadi
351#       rm -rf $(DESTDIR)$(prefix)/Python/casadi_interface
352if HAVE_ANT
353        cd $(abs_top_srcdir)/Compiler/ModelicaCompilerCasADi; \
354        $(ANT_OPTS) $(ANT) clean ; rm -rf $(MC_SRC)/src/cpp-generated $(MC_SRC)/src/java-generated/casadi
355        cd $(abs_top_srcdir)/Compiler/OptimicaCompilerCasADi; \
356        $(ANT_OPTS) $(ANT) clean ; rm -rf $(OC_SRC)/src/cpp-generated $(OC_SRC)/src/java-generated/casadi
357endif
358       
359
360clean-python-packages:
361if WITH_SUNDIALS
362        cd $(abs_top_srcdir)/external/Assimulo; \
363        python setup.py clean --all --sundials-home=$(SUNDIALS_HOME)
364        rm -rf $(assimulo_install_dir) || echo  Could not remove $(assimulo_install_dir)
365endif
366        -cd $(abs_top_srcdir)/Python/src; \
367        python setup_pymodelica.py clean --all
368        -rm -rf $(pymodelica_install_dir) || echo  Could not remove $(pymodelica_install_dir)
369        -cd $(abs_top_srcdir)/external/PyFMI; \
370        python setup.py  clean --all
371        -rm -rf $(pyfmi_install_dir) || echo  Could not remove $(pyfmi_install_dir)
372        -cd $(abs_top_srcdir)/Python/src; \
373        python setup_pyjmi.py clean --all
374        -rm -rf $(pyjmi_install_dir)|| echo  Could not remove $(pyjmi_install_dir)
375
376clean-frontends:
377if HAVE_ANT
378        cd $(abs_top_srcdir)/Compiler/ModelicaCompiler; \
379        $(ANT_OPTS) $(ANT) clean
380        cd $(abs_top_srcdir)/Compiler/OptimicaCompiler; \
381        $(ANT_OPTS) $(ANT) clean
382endif
383
384docs:
385        cd $(abs_top_srcdir); doxygen doc/JMI/jmi_doxydoc.conf
386        cd $(abs_top_srcdir); doxygen doc/ModelicaCompiler/modelica_compiler_doxydoc.conf
387        cd $(abs_top_srcdir); doxygen doc/OptimicaCompiler/optimica_compiler_doxydoc.conf
388        make -C $(abs_top_srcdir)/doc/PyJMI html
389
390docbook-docs:
391        cd docbook/UsersGuide; $(MAKE) all
392
393
394.PHONY: modelicacasadi_wrapper ifcasadi
Note: See TracBrowser for help on using the repository browser.