Makefile.in 8.66 KB
Newer Older
brugger's avatar
 
brugger committed
1 2
#                         Copyright (c) 2000 - 2008
#                  Lawrence Livermore National Security, LLC
hrchilds's avatar
hrchilds committed
3
#            Produced at the Lawrence Livermore National Laboratory
brugger's avatar
 
brugger committed
4
#                              LLNL-CODE-400124
hrchilds's avatar
hrchilds committed
5 6
#                            All rights reserved.
#
brugger's avatar
 
brugger committed
7 8 9
# This file is  part of VisIt. For  details, see https://visit.llnl.gov/.  The
# full copyright notice is contained in the file COPYRIGHT located at the root
# of the VisIt distribution or at https://visit.llnl.gov/copyright.html.
hrchilds's avatar
hrchilds committed
10 11 12 13 14 15 16 17
#
# Redistribution  and  use  in  source  and  binary  forms,  with  or  without
# modification, are permitted provided  that the following conditions are met:
#
# - Redistributions of  source code  must retain  the above  copyright notice,
#   this list of conditions and the disclaimer below.
# - Redistributions in binary form must  reproduce the above copyright notice,
#   this  list of  conditions  and  the  disclaimer  (as noted below)  in  the
brugger's avatar
 
brugger committed
18 19
#   documentation and/or other materials provided with the distribution.
# - Neither the name of the LLNS/LLNL nor the names of its contributors may be
hrchilds's avatar
hrchilds committed
20 21 22 23 24 25
#   used to endorse  or promote products  derived from  this software  without
#   specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE  COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR  IMPLIED WARRANTIES,  INCLUDING, BUT NOT  LIMITED TO, THE
# IMPLIED WARRANTIES  OF MERCHANTABILITY AND FITNESS FOR  A PARTICULAR PURPOSE
brugger's avatar
 
brugger committed
26 27 28
# ARE  DISCLAIMED. IN  NO EVENT  SHALL LAWRENCE  LIVERMORE NATIONAL  SECURITY,
# LLC, THE  U.S.  DEPARTMENT OF  ENERGY  OR  CONTRIBUTORS BE  LIABLE  FOR  ANY
# DIRECT,  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL  DAMAGES
hrchilds's avatar
hrchilds committed
29 30 31 32 33 34
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR  BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF  LIABILITY, WHETHER IN CONTRACT, STRICT  LIABILITY, OR TORT
# (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN ANY  WAY OUT OF  THE USE OF
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
hrchilds's avatar
hrchilds committed
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 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108
# Modifications:
#    Eric Brugger, Fri Aug  4 14:31:06 PDT 2000
#    I changed the order the that subdirectories are listed in SUBDIRS.
#
#    Brad Whitlock, Thu Sep 7 16:52:17 PST 2000
#    I made the engine build before the viewer.
#
#    Kathleen Bonnell, Thu Oct 12 11:07:22 PDT 2000
#    Add visit_vtk to list of subdirectories.
#
#    Kathleen Bonnell, Tue Oct 17 14:55:20 PDT 2000 
#    Moved visit_vtk before engine in list of subdirs.
#
#    Brad Whitlock, Tue Oct 31 15:36:54 PST 2000
#    Added vtkqt.
#
#    Hank Childs, Fri Jan  5 13:02:23 PST 2001
#    Removed directory tools from list of subdirectories to build.
#
#    Eric Brugger, Fri Feb 16 13:08:59 PST 2001
#    I moved the line continuation character for the SUBDIRS variable so
#    that we don't have the situation where we have a line continuation
#    with no contuation line.
#
#    Eric Brugger, Mon Feb 26 15:44:11 PST 2001
#    I modified the makefile to compile the files in the plot directory tree.
#
#    Jeremy Meredith, Fri May 11 14:39:48 PDT 2001
#    Added lib directory.
#    Added "source" target to plots directory.
#
#    Jeremy Meredith, Thu Jul 26 02:44:25 PDT 2001
#    Added operator plugins.
#    Removed the "make source" needed to resolve old circular dependencies.
#
#    Jeremy Meredith, Fri Jul 27 13:48:59 PDT 2001
#    Added "parclean" make target.
#
#    Jeremy Meredith, Fri Aug 24 13:01:54 PDT 2001
#    Fixed engine directory's parclean.
#
#    Sean Ahern, Fri Aug 31 14:37:28 PDT 2001
#    Added the splash screen.
#
#    Brad Whitlock, Sun Jul 8 15:05:34 PST 2001
#    Added visitpy directory.
#
#    Jeremy Meredith, Wed Jan 16 13:05:30 PST 2002
#    Removed parclean target since serial and parallel now build concurrently.
#
#    Sean Ahern, Mon Jun 10 16:40:29 PDT 2002
#    Got rid of RSUBDIRS.  Gutted portions so as to move to a central location.
#
#    Jeremy Meredith, Fri Jul 12 14:38:14 PDT 2002
#    Added bin and include to the subdirectories.
#
#    Jeremy Meredith, Mon Jul 15 00:56:14 PDT 2002
#    Added tools/xml to the subdirectories.
#
#    Brad Whitlock, Fri Jul 12 18:02:31 PST 2002
#    Added help directory.
#
#    Jeremy Meredith, Mon Jul 22 12:13:05 PDT 2002
#    Made it build the whole tools directory.
#
#    Brad Whitlock, Wed Aug 14 16:43:09 PST 2002
#    I made it build the java directory.
#
#    Jeremy Meredith, Tue Aug 27 16:02:22 PDT 2002
#    Added database plugins.
#
#    Brad Whitlock, Mon May 5 09:38:47 PDT 2003
#    I added the launcher directory.
#
hrchilds's avatar
hrchilds committed
109 110 111
#    Brad Whitlock, Thu Jun 19 13:12:07 PST 2003
#    I removed the splashscreen.
#
hrchilds's avatar
hrchilds committed
112 113 114
#    Eric Brugger, Thu Nov 20 10:04:46 PST 2003
#    I made the build in the help directory optional.
#
hrchilds's avatar
hrchilds committed
115 116 117 118 119
#    Brad Whitlock, Thu Apr 22 11:38:06 PDT 2004
#    I moved common/winutil to the top level because of some dependencies
#    on the components directory. I did this because of prebinding on the
#    Mac.
#
hrchilds's avatar
hrchilds committed
120 121 122
#    Mark C. Miller, Fri Dec  2 00:11:45 PST 2005
#    Added third_party_builtin directory
#
hrchilds's avatar
hrchilds committed
123 124 125
#    Mark C. Miller, Wed Dec  7 14:02:41 PST 2005
#    Changed order of SUBDIRS so third_party_builtin is built first, not last
#
hrchilds's avatar
hrchilds committed
126 127 128
#    Brad Whitlock, Tue Mar 21 14:27:38 PST 2006
#    I made it build libsim.
#
hrchilds's avatar
hrchilds committed
129 130 131
#    Brad Whitlock, Wed Nov 22 11:41:54 PDT 2006
#    I added a top level visitmodule target.
#
brugger's avatar
 
brugger committed
132 133 134
#    Eric Brugger, Fri Jun 29 09:28:51 PDT 2007
#    Removed the setting of the DISTRIB variable.
#
hrchilds's avatar
hrchilds committed
135 136 137
#    Hank Childs, Sat Feb  9 15:31:35 PST 2008
#    Renamed components directory to avt.
#
whitlocb's avatar
whitlocb committed
138 139 140 141
#    Brad Whitlock, Fri Feb 13 11:50:03 PST 2009
#    I made sim be built before plugins since the SimV2 reader has a
#    dependency on libsimV2runtime.
#
142 143
#    Mark C. Miller, Wed Mar  4 18:02:00 PST 2009
#    Made it work for dbio-only build.
whitlocb's avatar
whitlocb committed
144
#
whitlocb's avatar
whitlocb committed
145 146 147
#    Brad Whitlock, Wed Jun 3 15:45:55 PST 2009
#    I added an engine-only build option.
#
148 149 150
#    Mark C. Miller, Tue Jun 16 15:32:47 PDT 2009
#    Added logic to check for possible environment variable collision with
#    VisIt's Makefile variables.
whitlocb's avatar
whitlocb committed
151 152 153 154
#
#    Brad Whitlock, Thu Jun 18 10:42:16 PDT 2009
#    I made the new check be configurable.
#
hrchilds's avatar
hrchilds committed
155 156 157 158 159 160
##############################################################################

@SET_MAKE@
@VARIABLES@
@DIRTARGETS@

161
SUBDIRS_DBIO_ONLY=include lib bin third_party_builtin common visit_vtk avt databases tools
whitlocb's avatar
whitlocb committed
162 163 164 165 166 167 168

SUBDIRS_ENGINE_ONLY=include lib bin third_party_builtin common visit_vtk avt engine \
        sim plots operators databases 

SUBDIRS_SERVER_COMPONENTS_ONLY=include lib bin third_party_builtin common visit_vtk \
        avt engine launcher mdserver sim plots operators databases 

169
SUBDIRS_STD=include lib bin third_party_builtin common @VTKQT@ visit_vtk \
hrchilds's avatar
hrchilds committed
170
        avt engine launcher @METADATA_SERVER@ winutil @VIEWER@ \
whitlocb's avatar
whitlocb committed
171 172 173
	@GUI@ @VISITPY@ @JAVA_TARGET@ sim plots operators databases @HELP@ \
	tools
SUBDIRS=@SUBDIRS@
hrchilds's avatar
hrchilds committed
174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207

#
# Make sure that the installation directories exist
#
install_dirs:
	if test ! -d $(exec_prefix); then \
		mkdir $(exec_prefix); \
		chmod 755 $(exec_prefix); \
	fi
	if test ! -d $(bindir); then \
		mkdir $(bindir); \
		chmod 755 $(bindir); \
	fi
	if test ! -d $(libdir); then \
		mkdir $(libdir); \
		chmod 755 $(libdir); \
	fi
	if test ! -d $(includedir); then \
		mkdir $(includedir); \
		chmod 755 $(includedir); \
	fi

CLEAN_FILES=archives/lib* \
	plugins/plots/lib* plugins/operators/lib* plugins/databases/lib*

DISTCLEAN_FILES= Makefile config.cache config.log config.status \
	archives/lib* plugins/plots/lib* plugins/operators/lib* \
	plugins/databases/lib* \
	*~ include/*~ include/config.h \
	include/make-targets include/make-variables \
	include/make-gnu include/make-std \
	include/make-depend-gnu include/make-depend-std \
	include/make-targets-gnu include/make-targets-std

whitlocb's avatar
whitlocb committed
208
message: @CHECK_MAKE_AND_ENV_VARS@
hrchilds's avatar
hrchilds committed
209 210 211 212

maintainer-clean: distclean
	-$(RM) ${DISTCLEAN_FILES}
	-$(RM) configure include/config.h.in
hrchilds's avatar
hrchilds committed
213 214 215

visitmodule:
	do (cd visitpy && $(MAKE) $@) || exit 1; done
216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234

check-make-and-env-vars:
	@echo "Checking for possible collisions between environment"; \
	echo -n "and VisIt's Make variables..."; \
	env | cut -d'=' -f1 | sort | uniq > env_vars.txt; \
	find . -name .svn -prune -o -name Makefile | grep -v .svn | xargs -n 1 -i cat '{}' | tr ' ' '\n'| grep '$$([A-Z_]*)' | sed -e 's#.*$$(\(.*\)).*#\1#' | sort | uniq > make_vars.txt; \
	em_vars=`grep -x -f env_vars.txt make_vars.txt`; \
	rm -f env_vars.txt make_vars.txt
	if test -n "$$em_vars"; then \
	    echo ""; \
	    echo "The following variables in your environment may collide with"; \
	    echo "variables in VisIt's Makefiles. You may want to temporarily"; \
	    echo "adjust your environment by removing them using unsetenv (csh)"; \
            echo "or unset (sh) before proceeding..."; \
	    echo $$em_vars | tr ' ' '\n'; \
	    sleep 10; \
	else \
	    echo "OK"; \
	fi