ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-3.0/make/Makefile.in
(Generate patch)

Comparing trunk/OOPSE-3.0/make/Makefile.in (file contents):
Revision 1984 by tim, Mon Feb 7 20:31:50 2005 UTC vs.
Revision 2444 by tim, Wed Nov 16 21:20:50 2005 UTC

# Line 50 | Line 50 | PackageLibs = \
50          constraints \
51          minimizers \
52          selection \
53 +        restraints \
54 +        lattice \
55 +        openbabel
56  
57   #packages containing applications
58   Applications = \
59          applications/oopse \
60          applications/dump2Xyz \
61 +        applications/staticProps \
62 +        applications/dynamicProps \
63          applications/simpleBuilder\
64 +        applications/nanoRodBuilder \
65 +        applications/mdinConverter
66  
67   Samples = \
68          samples/argon \
69 <        samples/water/dimer \
69 >        samples/water/dimer \
70          samples/water/spce \
71          samples/water/ssd \
72          samples/water/ssde \
73 +        samples/water/ssdrf \
74 +        samples/water/ssd-ion \
75          samples/water/tip3p_ice \
76          samples/water/tip4p \
77          samples/lipid \
78          samples/alkane \
79          samples/minimizer \
80          samples/metals \
81 +        samples/thermoIntegration/liquid \
82 +        samples/thermoIntegration/solid \
83 +        samples/dipole \
84 +        samples/shape \
85          samples/zcons \
86  
87   IncludeDirs = \
88 <        @SPRNG_INC_DIR@ \
89 <        @MPI_INC_DIR@
88 >        @CGAL_INC_DIR@ \
89 >        @MPI_INC_DIR@
90  
91   LibraryDirs = \
92 <        @SPRNG_LIB_DIR@ \
92 >        @CGAL_LIB_DIR@ \
93          @MPI_LIB_DIR@
94  
95   Libraries = \
96 <        @SPRNG_LIB@ \
96 >        @LIBS@ \
97 >        @CGAL_LIBS@ \
98          @MPI_LIB@ \
99 <        @MPI_F90_LIB@
99 >        @MPI_F90_LIB@
100  
101   OopseHome       = @OOPSE_HOME@
102   ForceParamDir   = $(OopseHome)/share/forceFields
# Line 113 | Line 127 | BinDir            = $(DEV_ROOT)/bin
127   ParallelTargetDir = $(DEV_ROOT)/MPIobj
128   LibDir            = $(DEV_ROOT)/lib
129   MakeDir           = $(DEV_ROOT)/make
130 + MainMakefile      = $(MakeDir)/Makefile
131   BinDir            = $(DEV_ROOT)/bin
132   DocsDir           = $(DEV_ROOT)/docs
133   CurrentDir        = $(CURDIR)
# Line 204 | Line 219 | OtherTargetFiles       = $(OtherSourceFiles:%=$(Packag
219                           $(LexFiles:%.l=     %.c)
220  
221   OtherTargetFiles       = $(OtherSourceFiles:%=$(PackageTargetDir)/%)
222 +
223 + ###########################################################################
224 + #
225 + # Figure out the names of the module files based on some work done by
226 + # configure.  The tr function below is from John Graham-Cumming
227 + # (http://www.jgc.org).
228 + #
229 + # The tr function.   Has three arguments:
230 + #
231 + # $1   The list of characters to translate from
232 + # $2   The list of characters to translate to
233 + # $3   The text to translate
234 + #
235 + # For example, $(call tr,A B C,1 2 3,CAPITAL) becomes 21PIT1L.
236 +
237 + tr = $(eval __t := $3)                                                    \
238 +     $(foreach c,                                                         \
239 +         $(join $(addsuffix :,$1),$2),                                    \
240 +         $(eval __t :=                                                    \
241 +             $(subst $(word 1,$(subst :, ,$c)),$(word 2,$(subst :, ,$c)), \
242 +                 $(__t))))$(__t)
243 +
244 + # Common character classes for use with the tr function.  Each of
245 + # these is actually a variable declaration and must be wrapped with
246 + # $() or ${} to be used.
247 +
248 + [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 #
249 + [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 #
250 + [0-9] := 0 1 2 3 4 5 6 7 8 9 #
251 + [A-F] := A B C D E F #
252 +
253 + # Figure out whether we have $(eval) or not (GNU Make 3.80 and above)
254 + # if we do not then we need to use the shell version of tr, and not the
255 + # faster tr function above:
256 +
257 + __have_eval := $(false)
258 + __ignore := $(eval __have_eval := $(true))
259 +
260 + ifndef __have_eval
261 +  uc = $(shell echo $1 | tr "a-z" "A-Z")
262 +  lc = $(shell echo $1 | tr "A-Z" "a-z")
263 + else
264 +  uc = $(call tr,$([a-z]),$([A-Z]),$1)
265 +  lc = $(call tr,$([A-Z]),$([a-z]),$1)
266 + endif
267 +
268 + # OK, now we can actually use these functions to figure out the names
269 + # of the module files:
270 +
271 + ifneq "$(words $(Modules))" "0"
272 + ifeq "$(ModuleCase)" "UPPER"
273 +  MODULES = $(call uc,$(Modules))
274 + else
275 +  ifeq "$(ModuleCase)" "lower"
276 +    MODULES = $(call lc,$(Modules))
277 +  else
278 +    MODULES = $(Modules)
279 +  endif
280 + endif
281 +  ModuleFiles = $(MODULES:%= $(PackageTargetDir)/%.$(ModSuffix))
282 +  ParallelModuleFiles = $(MODULES:%= $(PackageParallelTargetDir)/%.$(ModSuffix))
283 + endif
284 + #
285 + ###########################################################################
286  
287   ThirdPartyJarsTmp = $(patsubst %,$(LibDir)/%,$(JavaLibraries))
288   ThirdPartyJars    = $(subst $(Space),$(X),$(ThirdPartyJarsTmp))
# Line 216 | Line 295 | ifneq  "$(words $(ObjectFiles) $(ParallelObjectFiles))
295   #if Main is defined, do not build library. It may not be true sometimes
296   ifneq  "$(words $(ObjectFiles) $(ParallelObjectFiles))" "0"
297    DependencyFile    = $(PackageSourceDir)/Makedepend
298 <  ifneq "$(Main)" ""
298 >  ifneq "$(words $(Main))" "0"
299      Executable             = $(BinDir)/$(Main)
300 <    ParallelExecutable     = $(BinDir)/$(Main)_MPI
300 >    ifeq "$(BuiltParallelExe)" "1"
301 >      ParallelExecutable     = $(BinDir)/$(Main)_MPI
302 >    endif
303    else
304      SharedLibrary          = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package)))_UP.so
305      StaticLibrary          = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package)))_UP.a
# Line 256 | Line 337 | InstallData            = @INSTALL_DATA@
337   MakeDepend             = makedepend
338   INSTALL                = @INSTALL@
339   InstallProgram         = @INSTALL_PROGRAM@
340 + InstallScript          = @INSTALL_SCRIPT@
341   InstallData            = @INSTALL_DATA@
342   MkDir                  = @MKINSTALLDIRS@
343 < Delete                 = rm -fr
343 > Delete                 = rm -f
344   StaticArchiver         = @AR@
345   DynamicArchiver        = @CC@
346   FortranCompiler        = @FC@
# Line 373 | Line 455 | $(PackageTargetDir)/%.o : %.c
455          $(MkDir) $@
456  
457   # .c -> .o
458 < $(PackageTargetDir)/%.o : %.c
458 > $(PackageTargetDir)/%.o : %.c $(MainMakefile)
459          $(Print) $@
460          $(CCompiler) $(COptions) -c $(IncludePath) $< -o $@
461  
462 < $(PackageParallelTargetDir)/%.o : %.c
462 > $(PackageParallelTargetDir)/%.o : %.c $(MainMakefile)
463          $(Print) $@
464          $(CCompiler) $(CParallelOptions) -c $(IncludePath) $< -o $@
465  
466   ifeq "$(UseMPI)" "yes"
467 < %.o : %.c
467 > %.o : %.c $(MainMakefile)
468          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
469          $(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@
470   else
471 < %.o : %.c
471 > %.o : %.c $(MainMakefile)
472          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
473   endif
474  
475   # .cpp -> .o
476 < $(PackageTargetDir)/%.o : %.cpp
476 > $(PackageTargetDir)/%.o : %.cpp $(MainMakefile)
477          $(CppCompiler) $(CppOptions) -c $(IncludePath) $< -o $@
478  
479 < $(PackageParallelTargetDir)/%.o : %.cpp
479 > $(PackageParallelTargetDir)/%.o : %.cpp $(MainMakefile)
480          $(CppCompiler) $(CppParallelOptions) -c $(IncludePath) $< -o $@
481  
482   ifeq "$(UseMPI)" "yes"
483 < %.o : %.cpp
483 > %.o : %.cpp $(MainMakefile)
484          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
485          $(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@
486   else
487 < %.o : %.cpp
487 > %.o : %.cpp $(MainMakefile)
488          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
489   endif
490  
491   # .f -> .o
492 < $(PackageTargetDir)/%.o : %.f
492 > $(PackageTargetDir)/%.o : %.f $(MainMakefile)
493          $(FortranCompiler) $(FortranOptions) -c $< -o $@
494  
495 < $(PackageParallelTargetDir)/%.o : %.f
495 > $(PackageParallelTargetDir)/%.o : %.f $(MainMakefile)
496          $(FortranCompiler) $(FortranParallelOptions) -c $< -o $@
497  
498   ifeq "$(UseMPI)" "yes"
499 < %.o : %.f
499 > %.o : %.f $(MainMakefile)
500          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
501          $(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@
502   else
503 < %.o : %.f
503 > %.o : %.f $(MainMakefile)
504          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
505   endif
506  
507   # .F90 -> .o
508 < $(PackageTargetDir)/%.o : %.F90
508 > $(PackageTargetDir)/%.o : %.F90 $(MainMakefile)
509          $(F90Compiler) $(F90Options) $(IncludePath) -c $< -o $@
510          if test -n "`ls *.$(ModSuffix)`"; then \
511            $(Move) `ls *.$(ModSuffix)` $(PackageTargetDir);\
512          fi
513  
514 < $(PackageParallelTargetDir)/%.o : %.F90
514 > $(PackageParallelTargetDir)/%.o : %.F90 $(MainMakefile)
515          $(F90Compiler) $(F90ParallelOptions) $(IncludePath) -c $< -o $@
516          if test -n "`ls *.$(ModSuffix)`"; then \
517            $(Move) "`ls *.$(ModSuffix)`" $(PackageParallelTargetDir);\
518          fi
519  
520   ifeq "$(UseMPI)" "yes"
521 < %.o : %.F90
521 > %.o : %.F90 $(MainMakefile)
522          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
523          if test -n "`ls *.$(ModSuffix)`"; then\
524            $(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\
# Line 448 | Line 530 | else
530          fi
531  
532   else
533 < %.o : %.F90
533 > %.o : %.F90 $(MainMakefile)
534          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
535          if test -n "`ls *.$(ModSuffix)`"; then\
536            $(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\
# Line 618 | Line 700 | endif
700          $(JarFile) \
701          $(Executable)
702   endif
703 +
704 + echo : $(PackageListLoop)
705 +        $(Print) Done echo.
706  
707 + _echoall :
708 +        $(Print) $(Modules)
709  
710   # make clean
711   clean : $(PackageListLoop)
712          $(Print) Done clean.    
713  
714   _cleanall :
715 <        $(Delete) $(ObjectFiles) $(ParallelObjectFiles)
715 >        $(Delete) \
716 >                $(ObjectFiles) \
717 >                $(ModuleFiles) \
718 >                $(ParallelObjectFiles) \
719 >                $(ParallelModuleFiles) \
720 >                $(JarFile) \
721 >                $(SharedLibrary) \
722 >                $(StaticLibrary) \
723 >                $(ParallelSharedLibrary) \
724 >                $(ParallelStaticLibrary) \
725 >                $(CombinedStaticLib) \
726 >                $(CombinedParallelStaticLib)
727  
728   # make distclean
729   distclean : $(PackageListLoop)
730          $(Print) Done clean.    
731  
732 < _distcleanall :
733 <        $(Delete) $(ObjectFiles) \
636 <                  $(ParallelObjectFiles) \
637 <                        $(JarFile) \
638 <                  $(SharedLibrary) \
639 <                  $(StaticLibrary) \
640 <                  $(ParallelSharedLibrary) \
641 <                  $(ParallelStaticLibrary) \
642 <                  $(Executable) \
732 > _distcleanall : _cleanall
733 >        $(Delete) $(Executable) \
734                    $(ParallelExecutable) \
735                    $(DependencyFile)
736  
646
737   # make depend
738   depend : $(PackageListLoop)
739          $(Print) Done dependencies.
# Line 719 | Line 809 | ifneq "$(words $(InstallFiles))" "0"
809   _installdata :  $(MyInstallDir)
810          $(Print) $(InstallFiles)
811   ifneq "$(words $(InstallFiles))" "0"
812 <        $(InstallData) $(InstallFiles) $(MyInstallDir)
812 >        $(InstallCommand) $(InstallFiles) $(MyInstallDir)
813   endif      
814  
815   # make statistics
# Line 732 | Line 822 | $(Executable).pure :
822          $(Print) Done statistics.
823  
824   # make pure
825 < $(Executable).pure :
826 <        $(Purify) $(PurifyOptions) $(CppCompiler) $(LinkOptions) $(LibDirs) \
827 <        $(LibList) $(ObjectFiles) -o $@
825 > #$(Executable).pure :
826 > #       $(Purify) $(PurifyOptions) $(CppCompiler) $(LinkOptions) $(LibDirs) \
827 > #       $(LibList) $(ObjectFiles) -o $@
828 > #
829 > #pure : $(Executable).pure
830  
739 pure : $(Executable).pure
740
831   #make cvslog
832   cvslog:
833 <        $(DEV_ROOT)/scripts/cvs2cl.pl
833 >        $(DEV_ROOT)/scripts/cvs2cl
834  
835   # Execute
836   _runexe :

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines