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

Comparing trunk/OOPSE-4/make/Makefile.in (file contents):
Revision 1712 by tim, Thu Nov 4 20:55:01 2004 UTC vs.
Revision 2455 by tim, Fri Nov 18 16:38:34 2005 UTC

# Line 38 | Line 38 | PackageLibs = \
38   #packages containing libraries
39   PackageLibs = \
40          utils \
41 +        visitors \
42          math \
43          types \
44          primitives \
# Line 45 | Line 46 | PackageLibs = \
46          UseTheForce \
47          brains \
48          io \
49 +        integrators\
50          constraints \
51 <        profiling \
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/simpleBuilder
61 >        applications/staticProps \
62 >        applications/dynamicProps \
63 >        applications/simpleBuilder\
64 >        applications/nanoRodBuilder \
65 >        applications/atom2mdin
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 111 | 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 122 | Line 139 | Package          = $(subst $(shell cd $(SourceDir); pw
139   # /home/maul/gezelter/src/code/src/UseTheForce/Darkside --> UseTheForce/Darkside
140   #Package          = $(shell echo $(CurrentDir) | sed -e 's/^.*\/src\/\(.*\)/\1/g')
141   #use shell script to get the absolute path and then rip it off from $(CurrentDir)
142 < Package          = $(subst $(shell cd $(SourceDir); pwd)/,,$(CurrentDir))
142 > #Package          = $(subst $(shell cd $(SourceDir); pwd)/,,$(CurrentDir))
143 > # REMINDER: We are now using the Package line in each subdir makefile.
144 > # This avoids the strange path problem and the subshell
145  
146   PackageList              = $(Package)
147   PackageSourceDir         = $(SourceDir)/$(Package)
# Line 201 | Line 220 | ThirdPartyJarsTmp = $(patsubst %,$(LibDir)/%,$(JavaLib
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))
289  
# Line 212 | 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 244 | Line 329 | Move                   = mv
329   #
330   #---------------------------------------------------------------------------
331   Print                  = @echo
332 < Move                   = mv
332 > Move                   = mv -f
333   Copy                   = cp
334   CCompiler              = @CC@
335   CppCompiler            = @CXX@
# Line 252 | 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
342 > MkDir                  = @MKINSTALLDIRS@
343 > Delete                 = rm -f
344   StaticArchiver         = @AR@
345   DynamicArchiver        = @CC@
346   FortranCompiler        = @FC@
# Line 284 | Line 370 | CppOptions             = $(FrcDeclare) @CXXFLAGS@
370                           -sourcepath $(SourceDir)
371   COptions               = $(FrcDeclare) @CFLAGS@
372   CParallelOptions       = $(FrcDeclare) $(ParallelDeclare) @CFLAGS@
373 < CppOptions             = $(FrcDeclare) @CXXFLAGS@
374 < CppParallelOptions     = $(FrcDeclare) $(ParallelDeclare) @CXXFLAGS@
373 > CppOptions             = $(FrcDeclare) @CXXFLAGS@ @OOPSE_TEMPLATE_FLAGS@
374 > CppParallelOptions     = $(FrcDeclare) $(ParallelDeclare) @CXXFLAGS@ @OOPSE_TEMPLATE_FLAGS@
375   FortranOptions         =
376   F90Options             =  @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) @MODDIRFLAG@$(TargetDir)
377   F90ParallelOptions     =  @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) @MODDIRFLAG@$(ParallelTargetDir)  @PREPDEFFLAG@$(ParallelDeclare)
# Line 363 | Line 449 | $(PackageTargetDir) :
449  
450   # Create target directory
451   $(PackageTargetDir) :
452 <        $(MakeDir) $@
452 >        $(MkDir) $@
453 >
454 > $(BinDir) :
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 -f *.$(ModSuffix); then \
511 <          $(Move) *.$(ModSuffix) $(PackageTargetDir);\
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 -f *.$(ModSuffix); then \
517 <          $(Move) *.$(ModSuffix) $(PackageParallelTargetDir);\
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 -f *.$(ModSuffix); then \
524 <          $(Move) *.$(ModSuffix) $(PackageTargetDir);\
525 <        fi
523 >        if test -n "`ls *.$(ModSuffix)`"; then\
524 >          $(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\
525 >        fi
526  
527          $(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@
528 <        if test -f *.$(ModSuffix); then \
529 <          $(Move) *.$(ModSuffix) $(PackageParallelTargetDir);\
528 >        if test -n "`ls *.$(ModSuffix)`"; then\
529 >          $(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\
530          fi
531  
532   else
533 < %.o : %.F90
533 > %.o : %.F90 $(MainMakefile)
534          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
535 <        if test -f *.$(ModSuffix); then \
536 <          $(Move) *.$(ModSuffix) $(PackageTargetDir);\
537 <        fi
449 <
535 >        if test -n "`ls *.$(ModSuffix)`"; then\
536 >          $(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\
537 >        fi
538   endif
539  
540  
# Line 566 | Line 654 | $(Executable) : $(CombinedStaticLib) $(ObjectFiles)
654          $(Ranlib) $(CombinedParallelStaticLib)
655  
656   # Executable
657 < $(Executable) : $(CombinedStaticLib) $(ObjectFiles)
658 <        $(Linker) $(ObjectFiles) $(LinkOptions) $(LibDirs) $(CombinedStaticLib) $(Libraries) -o $@
657 > $(Executable) : $(CombinedStaticLib) $(ObjectFiles) $(BinDir)
658 >        $(Linker) $(ObjectFiles) $(CombinedStaticLib) $(LinkOptions) $(LibDirs) $(Libraries) -o $@
659  
660 < $(ParallelExecutable) : $(CombinedParallelStaticLib) $(ParallelObjectFiles)
661 <        $(Linker) $(ParallelObjectFiles) $(ParallelLinkOptions) $(LibDirs) $(CombinedParallelStaticLib) $(Libraries) -o $@
660 > $(ParallelExecutable) : $(CombinedParallelStaticLib) $(ParallelObjectFiles) $(BinDir)
661 >        $(Linker) $(ParallelObjectFiles) $(CombinedParallelStaticLib) $(ParallelLinkOptions) $(LibDirs) $(Libraries) -o $@
662  
663   # Anything else is just copied from source to target
664   $(PackageTargetDir)/% : $(PackageSourceDir)/%
# Line 613 | Line 701 | endif
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) \
630 <                  $(ParallelObjectFiles) \
631 <                        $(JarFile) \
632 <                  $(SharedLibrary) \
633 <                  $(StaticLibrary) \
634 <                  $(ParallelSharedLibrary) \
635 <                  $(ParallelStaticLibrary) \
636 <                  $(Executable) \
732 > _distcleanall : _cleanall
733 >        $(Delete) $(Executable) \
734                    $(ParallelExecutable) \
735                    $(DependencyFile)
736  
640
737   # make depend
738   depend : $(PackageListLoop)
739          $(Print) Done dependencies.
# Line 713 | 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 <        
814 >
815   # make statistics
816   _statisticsall :
817          @$(Print) $(patsubst %,$(CurrentDir)/%,$(SourceFiles)) >> $(DEV_ROOT)/files.tmp
# Line 726 | 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  
733 pure : $(Executable).pure
734
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