root/tags/mcxtrace_beta/Makefile.in

Revision 2728, 4.1 KB (checked in by erkn, 2 years ago)

merged branch farhi_configure_100204 into trunk after testing

Line 
1# Makefile for @MCCODE_NAME@.
2#
3#   This file is part of the @MCCODE_NAME@ ray-trace simulation package
4#   Copyright (C) 1997-2008, All rights reserved
5#   Risoe National Laborartory, Roskilde, Denmark
6#   Institut Laue Langevin, Grenoble, France
7#
8#   This program is free software; you can redistribute it and/or modify
9#   it under the terms of the GNU General Public License as published by
10#   the Free Software Foundation; version 2 of the License.
11#
12#   This program is distributed in the hope that it will be useful,
13#   but WITHOUT ANY WARRANTY; without even the implied warranty of
14#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15#   GNU General Public License for more details.
16#
17#   You should have received a copy of the GNU General Public License
18#   along with this program; if not, write to the Free Software
19#   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
20
21# Available methods for installation
22# make                 normal build
23# make install         normal installation
24# make clean           clean distro
25# make test            distro self-test
26# make plotter         best plotter choice
27# make pgplot          plotter PGPLOT selection and perl-PGPLOT install
28# make reconfigure     reconfigure @MCCODE_TARNAME@ installation (after software update)
29# make install-pgplot  build and install PGPLOT
30# make install-scilab  build and install Scilab
31
32SHELL = /bin/sh
33
34prefix = @prefix@
35exec_prefix = @exec_prefix@
36bindir = @bindir@
37srcdir = @srcdir@
38libdir = @libdir@
39mandir = @mandir@
40PWD = `pwd`
41
42
43DEBUG = -DDEBUG=0
44libdir_@MCCODE_TARNAME@ = $(libdir)/@MCCODE_TARNAME@
45
46CC = @CC@
47MINGW = @MINGW@
48CFLAGS = @CFLAGS@
49LDFLAGS= @LDFLAGS@
50
51HAVE_QSORT = @HAVE_QSORT@
52USE_NEXUS = @HAVE_NEXUS@
53
54DEFS = @MCCODE_NAME@ @DEFS@ $(DEBUG)
55LIBS = @LIBS@
56
57PERL = @PERL@
58
59FLEX = flex
60FLEXFLAGS=-i
61
62BISON = bison
63BISONFLAGS = -v -d
64
65SCILAB = @SCILAB@
66MATLAB = @MATLAB@
67PGPLOT = @PGPLOT@
68VRML = @VRMLVIEW@
69
70WGET = @WGET@
71
72XTERM = @TERM@
73
74INSTALL=@INSTALL@
75INSTALL_PROGRAM = @INSTALL_PROGRAM@
76INSTALL_DATA = @INSTALL_DATA@
77
78
79#
80# End of configuration section.
81#
82
83all: @MCCODE_TARNAME@
84
85@MCCODE_TARNAME@: $(OBJECTS)
86        cd src/ && $(MAKE)
87
88clean:
89        cd src/ && $(MAKE) clean
90        rm -f src/config.cache config.cache
91
92distclean:
93        cd src/ && $(MAKE) distclean
94        rm -f src/config.cache src/Makefile config.cache Makefile
95
96install:
97        cd src/ && $(MAKE) install
98
99# Prefer Scilab over Matlab over PGPLOT
100config:
101        if [ $(VRML) != no ]; then \
102                $(MAKE) vrml; \
103        fi; \
104        if [ $(SCILAB) != no ]; then \
105                $(MAKE) scilab; \
106        fi; \
107        if [ $(MATLAB) != no ]; then \
108                $(MAKE) matlab; \
109        fi; \
110        if [ $(PGPLOT) != no ]; then \
111                $(MAKE) pgplot; \
112        fi;
113
114scilab:
115        sed "s/PLOTTER => '.*'./PLOTTER => 'Scilab'\,/" lib/tools/perl/@MCCODE_TARNAME@_config.perl > lib/tools/perl/@MCCODE_TARNAME@_config.perl.tmp
116        mv lib/tools/perl/@MCCODE_TARNAME@_config.perl.tmp lib/tools/perl/@MCCODE_TARNAME@_config.perl
117matlab:
118        sed "s/PLOTTER => '.*'./PLOTTER => 'Matlab'\,/" lib/tools/perl/@MCCODE_TARNAME@_config.perl > lib/tools/perl/@MCCODE_TARNAME@_config.perl.tmp
119        mv lib/tools/perl/@MCCODE_TARNAME@_config.perl.tmp lib/tools/perl/@MCCODE_TARNAME@_config.perl
120pgplot:
121        sed "s/PLOTTER => '.*'./PLOTTER => 'McStas'\,/" lib/tools/perl/@MCCODE_TARNAME@_config.perl > lib/tools/perl/@MCCODE_TARNAME@_config.perl.tmp
122        mv lib/tools/perl/@MCCODE_TARNAME@_config.perl.tmp lib/tools/perl/@MCCODE_TARNAME@_config.perl
123vrml:
124        sed "s/PLOTTER => '.*'./PLOTTER => 'VRML'\,/" lib/tools/perl/@MCCODE_TARNAME@_config.perl > lib/tools/perl/@MCCODE_TARNAME@_config.perl.tmp
125        mv lib/tools/perl/@MCCODE_TARNAME@_config.perl.tmp lib/tools/perl/@MCCODE_TARNAME@_config.perl
126PGPLOT: pgplot
127Matlab: matlab
128Scilab: scilab
129VRML: vrml
130
131test:
132        cd src && $(MAKE) test
133
134uninstall:
135        cd src && $(MAKE) uninstall
136
137reconfigure:
138        cd $(libdir_@MCCODE_TARNAME@)/tools/perl/
139        $(libdir_@MCCODE_TARNAME@)/tools/perl/mccode_reconfigure
140
141# Optional auto install of patched perl-Tk, scilab and pgplot5 libs
142install-pgplot:
143        cd support/common && $(MAKE) install-pgplot
144        make pgplot
145        @echo "@MCCODE_NAME@: run 'make reconfigure'"
146
147install-scilab:
148        cd support/common && $(MAKE) compile-scilab && echo "@MCCODE_NAME@: run './configure; make; make install' again"
149
Note: See TracBrowser for help on using the browser.