-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile.in
executable file
·91 lines (77 loc) · 3.35 KB
/
Makefile.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# managedFlu - OpenFOAM C++ interactive functionality API
# Copyright (C) 2011- Alexey Petrov
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# See http://sourceforge.net/projects/pythonflu
#
# Author : Alexey PETROV, Andrey Simurzin
#---------------------------------------------------------------------------
managedFlu_dir=@PACKAGE_INSTALL_DIR@
bindir=@PACKAGE_INSTALL_BIN_DIR@
libdir=@PACKAGE_INSTALL_LIB_DIR@
includedir=@PACKAGE_INSTALL_INCLUDE_DIR@
m4dir=@PACKAGE_INSTALL_M4_DIR@
#--------------------------------------------------------------------------------------
All:
@./Allwmake
clean:
@./Allwclean
#--------------------------------------------------------------------------------------
install:
@ install -d $(bindir) $(libdir) $(includedir) $(m4dir)/admin
@ echo "install solvers"
@ cp -rf /home/andrey/upload/manflu/bin/* $(bindir) 2>/dev/null || echo "There are no solvers"
@ echo "install libs"
@ cp -rf @abs_top_builddir@/lib/* $(libdir)
ifeq "@FOAM_BRANCH@" "free"
@ @LDCONFIG@
endif
@ echo "install headers"
@ cp -rf @abs_top_builddir@/src/* $(includedir)
@ (cd $(includedir) && @FIND@ \( -name "*.dep" -o -name "*.cpp" -o -name "*.o" -o -name "Makefile*" \) -exec rm -rf {} \; )
@ (cd $(includedir) && rm -rf `@FIND@ \( -type d -name "Make" \) -print` )
@ echo "install m4"
@ cp -rf @abs_top_builddir@/admin/managedflu_check_managedflu.m4 $(m4dir)/admin
@ cp -rf @abs_top_builddir@/admin/managedflu_check_openfoam.m4 $(m4dir)/admin
ifneq "@FOAM_BRANCH@" "free"
@ touch $(managedFlu_dir)/bashrc
@ echo "export MANAGEDFLU_ROOT_DIR=$(managedFlu_dir)" >> $(managedFlu_dir)/bashrc
@ echo 'echo MANAGEDFLU_ROOT_DIR="$${MANAGEDFLU_ROOT_DIR}"' >> $(managedFlu_dir)/bashrc
@ echo 'export PATH=$${MANAGEDFLU_ROOT_DIR}/bin:$${PATH}' >> $(managedFlu_dir)/bashrc
@ echo 'export LD_LIBRARY_PATH=$${MANAGEDFLU_ROOT_DIR}/lib:$${LD_LIBRARY_PATH}' >> $(managedFlu_dir)/bashrc
@ if [ `grep -c "source @PACKAGE_INSTALL_DIR@/bashrc" @FOAM_PACKAGE_DIR@/etc/bashrc` -eq 0 ]; then \
echo "source $(managedFlu_dir)/bashrc" >> @FOAM_PACKAGE_DIR@/etc/bashrc; \
fi
endif
uninstall:
@ echo "uninstall solvers"
@ ( cd $(bindir) && rm -rf *FoamMF)
@ echo "uninstall libs"
@ ( cd $(libdir) && rm -rf libmanagedFlu*.so )
@ echo "uninstall headers"
@ rm -rf $(includedir)
@ echo "uninstall m4"
@ rm -rf $(m4dir)
ifneq "@FOAM_BRANCH@" "free"
@ sed -i "s%source $(managedFlu_dir)/bashrc%managedFlu@PACKAGE_VERSION@%" "@FOAM_PACKAGE_DIR@/etc/bashrc"
@ sed -i "/managedFlu@PACKAGE_VERSION@/d" "@FOAM_PACKAGE_DIR@/etc/bashrc"
@ rm -rf $(managedFlu_dir)
endif
#--------------------------------------------------------------------------------------
deb:
@./make-deb.sh deb
launchpad:
@./make-deb.sh launchpad
#--------------------------------------------------------------------------------------