ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/development/make/Makefile.in
(Generate patch)

Comparing branches/development/make/Makefile.in (file contents):
Revision 1550 by gezelter, Wed Apr 27 21:49:59 2011 UTC vs.
Revision 1602 by gezelter, Thu Aug 4 21:01:29 2011 UTC

# Line 38 | Line 38 | PackageLibs = \
38   #packages containing libraries
39   PackageLibs = \
40          utils \
41        debug \
41          visitors \
42          math \
43          types \
# Line 55 | Line 54 | PackageLibs = \
54          restraints \
55          lattice \
56          hydrodynamics \
57 <        antlr \
58 <        mdParser
57 >    antlr \
58 >    mdParser
59  
60   #packages containing applications
61   Applications = \
# Line 89 | Line 88 | Samples = \
88          samples/minimizer \
89          samples/thermoIntegration/liquid \
90          samples/thermoIntegration/solid \
91 <        samples/water/dimer \
91 >    samples/water/dimer \
92          samples/water/spce \
93          samples/water/ssd \
94          samples/water/ssde \
# Line 131 | Line 130 | FrcDeclare      = -DFRC_PATH="$(ForceParamDir)"
130   InstallDocDir   = $(OpenMDHome)/doc
131   SvnDeclare     :=-DSVN_REV="$(shell svnversion -n . | sed -e "s/.*://" -e "s/\([0-9]*\).*/\1/" | grep "[0-9]")"
132   FrcDeclare      = -DFRC_PATH="$(ForceParamDir)"
134 F90Declare      = -D__FORTRAN90
133   UseSingle       = @USE_SINGLE_PRECISION@
134   ifeq "$(UseSingle)" "yes"
135   SingleDeclare   = -DSINGLE_PRECISION
# Line 141 | Line 139 | UseMPI          = @USE_MPI@
139   ParallelDeclare = -DIS_MPI
140   SinglePrecision = -DSINGLE_PRECISION
141   UseMPI          = @USE_MPI@
144 ModuleCase      = @F90_MODULE_NAMES@
145 ModSuffix       = @MOD@
142   LinkOptions = \
143          @LDFLAGS@ \
148        @FCLIBS@ \
144          @CXXFLAGS@
145  
151
152
146   ParallelLinkOptions = \
147          @LDFLAGS@ \
155        @FCLIBS@ \
148          @CXXFLAGS@
149  
150   #---------------------------------------------------------------------------
# Line 258 | Line 250 | OtherTargetFiles       = $(OtherSourceFiles:%=$(Packag
250                           $(LexFiles:%.l=     %.c)
251  
252   OtherTargetFiles       = $(OtherSourceFiles:%=$(PackageTargetDir)/%)
261
262 ###########################################################################
263 #
264 # Figure out the names of the module files based on some work done by
265 # configure.  The tr function below is from John Graham-Cumming
266 # (http://www.jgc.org).
267 #
268 # The tr function.   Has three arguments:
269 #
270 # $1   The list of characters to translate from
271 # $2   The list of characters to translate to
272 # $3   The text to translate
273 #
274 # For example, $(call tr,A B C,1 2 3,CAPITAL) becomes 21PIT1L.
253  
276 tr = $(eval __t := $3)                                                    \
277     $(foreach c,                                                         \
278         $(join $(addsuffix :,$1),$2),                                    \
279         $(eval __t :=                                                    \
280             $(subst $(word 1,$(subst :, ,$c)),$(word 2,$(subst :, ,$c)), \
281                 $(__t))))$(__t)
282
283 # Common character classes for use with the tr function.  Each of
284 # these is actually a variable declaration and must be wrapped with
285 # $() or ${} to be used.
286
287 [A-Z] := A B C D E F G H I J K L M N O P Q R S T U V W X Y Z #
288 [a-z] := a b c d e f g h i j k l m n o p q r s t u v w x y z #
289 [0-9] := 0 1 2 3 4 5 6 7 8 9 #
290 [A-F] := A B C D E F #
291
292 # Figure out whether we have $(eval) or not (GNU Make 3.80 and above)
293 # if we do not then we need to use the shell version of tr, and not the
294 # faster tr function above:
295
296 __have_eval := $(false)
297 __ignore := $(eval __have_eval := $(true))
298
299 ifndef __have_eval
300  uc = $(shell echo $1 | tr "a-z" "A-Z")
301  lc = $(shell echo $1 | tr "A-Z" "a-z")
302 else
303  uc = $(call tr,$([a-z]),$([A-Z]),$1)
304  lc = $(call tr,$([A-Z]),$([a-z]),$1)
305 endif
306
307 # OK, now we can actually use these functions to figure out the names
308 # of the module files:
309
310 ifneq "$(words $(Modules))" "0"
311 ifeq "$(ModuleCase)" "UPPER"
312  MODULES = $(call uc,$(Modules))
313 else
314  ifeq "$(ModuleCase)" "lower"
315    MODULES = $(call lc,$(Modules))
316  else
317    MODULES = $(Modules)
318  endif
319 endif
320  ModuleFiles = $(MODULES:%= $(PackageTargetDir)/%.$(ModSuffix))
321  ParallelModuleFiles = $(MODULES:%= $(PackageParallelTargetDir)/%.$(ModSuffix))
322 endif
323 #
324 ###########################################################################
325
254   ThirdPartyJarsTmp = $(patsubst %,$(LibDir)/%,$(JavaLibraries))
255   ThirdPartyJars    = $(subst $(Space),$(X),$(ThirdPartyJarsTmp))
256  
# Line 412 | Line 340 | CppParallelOptions     = $(SvnDeclare) $(FrcDeclare) $
340   CParallelOptions       = $(SvnDeclare) $(FrcDeclare) $(SingleDeclare) $(ParallelDeclare) @CFLAGS@
341   CppOptions             = $(SvnDeclare) $(FrcDeclare) $(SingleDeclare) @CXXFLAGS@
342   CppParallelOptions     = $(SvnDeclare) $(FrcDeclare) $(SingleDeclare) $(ParallelDeclare) @CXXFLAGS@
415 ifeq "$(UseSingle)" "yes"
416 FortranOptions         =  @FCFLAGS@ @MODDIRFLAG@$(SourceDir) @MODDIRFLAG@$(TargetDir) @PREPDEFFLAG@$(SingleDeclare) @FCFLAGS_SRCEXT@
417 FortranParallelOptions =  @FCFLAGS@ @MODDIRFLAG@$(SourceDir) @MODDIRFLAG@$(ParallelTargetDir) @PREPDEFFLAG@$(SingleDeclare) @PREPDEFFLAG@$(ParallelDeclare) @FCFLAGS_SRCEXT@
418 else
419 FortranOptions         =  @FCFLAGS@ @MODDIRFLAG@$(SourceDir) @MODDIRFLAG@$(TargetDir) @FCFLAGS_SRCEXT@
420 FortranParallelOptions =  @FCFLAGS@ @MODDIRFLAG@$(SourceDir) @MODDIRFLAG@$(ParallelTargetDir) @PREPDEFFLAG@$(ParallelDeclare) @FCFLAGS_SRCEXT@
421 endif
343   JavaCompilerOptions    = -d $(TargetDir) -classpath $(ClassPath) \
344                           -sourcepath $(SourceDir) -deprecation
345   JavaRunOptions         = -classpath $(ClassPath)
# Line 554 | Line 475 | endif
475          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
476   endif
477  
557 # .f -> .o
558 $(PackageTargetDir)/%.o : %.f $(MainMakefile)
559        $(FortranCompiler) $(FortranOptions) -c $< -o $@
478  
561 $(PackageParallelTargetDir)/%.o : %.f $(MainMakefile)
562        $(FortranCompiler) $(FortranParallelOptions) -c $< -o $@
563
564 ifeq "$(UseMPI)" "yes"
565 %.o : %.f $(MainMakefile)
566        $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
567        $(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@
568 else
569 %.o : %.f $(MainMakefile)
570        $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
571 endif
572
573 # .F90 -> .o
574 $(PackageTargetDir)/%.o : %.F90 $(MainMakefile)
575        $(FortranCompiler) $(FortranOptions) $(IncludePath) -c $< -o $@
576        if test -n "`ls *.$(ModSuffix)`"; then \
577          $(Move) `ls *.$(ModSuffix)` $(PackageTargetDir);\
578        fi
579
580 $(PackageParallelTargetDir)/%.o : %.F90 $(MainMakefile)
581        $(FortranCompiler) $(FortranParallelOptions) $(IncludePath) -c $< -o $@
582        if test -n "`ls *.$(ModSuffix)`"; then \
583          $(Move) "`ls *.$(ModSuffix)`" $(PackageParallelTargetDir);\
584        fi
585
586 ifeq "$(UseMPI)" "yes"
587 %.o : %.F90 $(MainMakefile)
588        $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
589        if test -n "`ls *.$(ModSuffix)`"; then\
590          $(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\
591        fi
592
593        $(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@
594        if test -n "`ls *.$(ModSuffix)`"; then\
595          $(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\
596        fi
597
598 else
599 %.o : %.F90 $(MainMakefile)
600        $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
601        if test -n "`ls *.$(ModSuffix)`"; then\
602          $(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\
603        fi
604 endif
605
606
479   # .java -> .class
480   $(PackageTargetDir)/%.class : $(PackageSourceDir)/%.java
481          $(JavaCompiler) $(JavaCompilerOptions) $<
# Line 847 | Line 719 | endif
719  
720   endif
721  
850 ifneq "$(words $(F90Files))" "0"
851        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(TargetDir)/' $(F90Declare) -MM -mc $(ModuleCase) -ms $(ModSuffix) $(F90Files) > Make.ftemp
852        @cat Make.ftemp >> $(DependencyFile)
853        @$(Delete) Make.ftemp
854
855  ifeq "$(UseMPI)" "yes"
856        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) $(F90Declare) -MM -mc $(ModuleCase) -ms $(ModSuffix)  $(F90Files) >> Make.ftemp
857        @cat Make.ftemp >> $(DependencyFile)
858        @$(Delete) Make.ftemp
859  endif
860
861 endif
862
722   # make lib
723   lib    : $(PackageListLoop)
724          $(Print) Libraries built.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines