root/trunk/Makefile.in

Revision 2976, 4.9 KB (checked in by pkwi, 19 months ago)

Fixes build of mcstas / mcxtrace for win32. Something is still missing in regard to the perl scripts - more to come later.

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
28# make reconfigure     reconfigure @MCCODE_TARNAME@ installation (after software update)
29# make install-pgplot  build and install PGPLOT (including perl-PGPLOT)
30# make install-scilab  build and install Scilab
31# make install-apps    install highligh syntax in gedit/kate
32#                          and icon in menu/education (requires administrator permissions)
33
34SHELL = /bin/sh
35
36prefix = @prefix@
37exec_prefix = @exec_prefix@
38bindir = @bindir@
39srcdir = @srcdir@
40libdir = @libdir@
41mandir = @mandir@
42PWD = `pwd`
43
44
45DEBUG = -DDEBUG=0
46libdir_@MCCODE_TARNAME@ = $(libdir)/@MCCODE_TARNAME@
47
48CC = @CC@
49MINGW = @MINGW@
50CFLAGS = @CFLAGS@
51LDFLAGS= @LDFLAGS@
52
53HAVE_QSORT = @HAVE_QSORT@
54USE_NEXUS = @HAVE_NEXUS@
55
56DEFS = @MCCODE_NAME@ @DEFS@ $(DEBUG)
57LIBS = @LIBS@
58
59PERL = @PERL@
60
61FLEX = flex
62FLEXFLAGS=-i
63
64BISON = bison
65BISONFLAGS = -v -d
66
67SCILAB = @SCILAB@
68MATLAB = @MATLAB@
69PGPLOT = @PGPLOT@
70VRML = @VRMLVIEW@
71
72WGET = @WGET@
73
74XTERM = @TERM@
75
76INSTALL=@INSTALL@
77INSTALL_PROGRAM = @INSTALL_PROGRAM@
78INSTALL_DATA = @INSTALL_DATA@
79
80
81#
82# End of configuration section.
83#
84
85all: @MCCODE_TARNAME@
86
87@MCCODE_TARNAME@: $(OBJECTS)
88        cd src/ && $(MAKE)
89
90@MCCODE_TARNAME@.win32: $(OBJECTS)
91        cd src/ && $(MAKE) @MCCODE_TARNAME@.win32
92
93clean:
94        cd src/ && $(MAKE) clean
95        rm -f src/config.cache config.cache
96
97distclean:
98        cd src/ && $(MAKE) distclean
99        rm -f src/config.cache src/Makefile config.cache Makefile
100
101install:
102        cd src/ && $(MAKE) install
103
104# Prefer Scilab over Matlab over PGPLOT
105config: plotter
106plotter:
107        if [ $(VRML) != no ]; then \
108                $(MAKE) vrml; \
109        fi; \
110        if [ $(SCILAB) != no ]; then \
111                $(MAKE) scilab; \
112        fi; \
113        if [ $(MATLAB) != no ]; then \
114                $(MAKE) matlab; \
115        fi; \
116        if [ $(PGPLOT) != no ]; then \
117                $(MAKE) pgplot; \
118        fi;
119
120scilab:
121        sed "s/PLOTTER => '.*'./PLOTTER => 'Scilab'\,/" lib/tools/perl/mccode_config.perl > lib/tools/perl/mccode_config.perl.tmp
122        mv lib/tools/perl/mccode_config.perl.tmp lib/tools/perl/mccode_config.perl
123matlab:
124        sed "s/PLOTTER => '.*'./PLOTTER => 'Matlab'\,/" lib/tools/perl/mccode_config.perl > lib/tools/perl/mccode_config.perl.tmp
125        mv lib/tools/perl/mccode_config.perl.tmp lib/tools/perl/@MCCODE_TARNAME@_config.perl
126pgplot:
127        sed "s/PLOTTER => '.*'./PLOTTER => 'McStas'\,/" lib/tools/perl/mccode_config.perl > lib/tools/perl/mccode_config.perl.tmp
128        mv lib/tools/perl/mccode_config.perl.tmp lib/tools/perl/mccode_config.perl
129vrml:
130        sed "s/PLOTTER => '.*'./PLOTTER => 'VRML'\,/" lib/tools/perl/mccode_config.perl > lib/tools/perl/mccode_config.perl.tmp
131        mv lib/tools/perl/mccode_config.perl.tmp lib/tools/perl/mccode_config.perl
132PGPLOT: pgplot
133Matlab: matlab
134Scilab: scilab
135VRML: vrml
136
137test:
138        cd src && $(MAKE) test
139
140uninstall:
141        cd src && $(MAKE) uninstall
142
143reconfigure:
144        cd $(libdir_@MCCODE_TARNAME@)/tools/perl/
145        $(libdir_@MCCODE_TARNAME@)/tools/perl/mccode_reconfigure
146
147# Optional auto install of patched perl-Tk, scilab and pgplot5 libs
148install-pgplot:
149        cd support/common && $(MAKE) install-pgplot
150        cd support/common && $(MAKE) perl-PGPLOT
151        make pgplot
152        @echo "@MCCODE_NAME@: pgplot installed, run 'make reconfigure'"
153
154install-scilab:
155        cd support/common && $(MAKE) compile-scilab && echo "@MCCODE_NAME@: run './configure; make; make install' again"
156
157install-apps:
158        if [ -d /usr/share/applications/ ]; then \
159          cp support/common/Desktop/McStas.desktop /usr/share/applications/; \
160        fi;
161        if [ -d /usr/share/pixmaps/ ]; then \
162          cp support/common/Desktop/mcstas-icon.png /usr/share/pixmaps/; \
163        fi;
164        if [ -d /usr/share/gtksourceview-1.0/ ]; then \
165          cp support/common/editors/mcstas1.lang /usr/share/gtksourceview-1.0/language-specs/; \
166        fi;
167        if [ -d /usr/share/gtksourceview-2.0/ ]; then \
168          cp support/common/editors/mcstas2.lang /usr/share/gtksourceview-2.0/language-specs/; \
169        fi;
170        if [ -d /usr/share/apps/katepart/syntax/ ]; then \
171          cp support/common/editors/mcstas.xml /usr/share/apps/katepart/syntax/; \
172        fi;
173
174
Note: See TracBrowser for help on using the browser.