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 1554 by tim, Mon Oct 11 18:40:22 2004 UTC vs.
Revision 2202 by tim, Fri Apr 15 18:41:38 2005 UTC

# Line 38 | Line 38 | PackageLibs = \
38   #packages containing libraries
39   PackageLibs = \
40          utils \
41 +        visitors \
42          math \
43          types \
44          primitives \
44        visitors \
45          UseTheForce/DarkSide \
46          UseTheForce \
47          brains \
48          io \
49 <        integrators \
50 <        minimizers \
49 >        integrators\
50          constraints \
51 <        profiling \
51 >        minimizers \
52 >        selection \
53          restraints \
54 +        lattice \
55  
56   #packages containing applications
57   Applications = \
58          applications/oopse \
59          applications/dump2Xyz \
60 <        applications/simpleBuilder
60 >        applications/staticProps \
61 >        applications/dynamicProps \
62 >        applications/simpleBuilder\
63 >        applications/nanoRodBuilder \
64  
65   Samples = \
66          samples/argon \
67 <        samples/water/dimer \
67 >        samples/water/dimer \
68          samples/water/spce \
69          samples/water/ssd \
70          samples/water/ssde \
71 +        samples/water/ssdrf \
72 +        samples/water/ssd-ion \
73          samples/water/tip3p_ice \
74          samples/water/tip4p \
75          samples/lipid \
76          samples/alkane \
77          samples/minimizer \
78          samples/metals \
79 +        samples/thermoIntegration/liquid \
80 +        samples/thermoIntegration/solid \
81 +        samples/dipole \
82 +        samples/shape \
83          samples/zcons \
84  
85   IncludeDirs = \
86 <        @SPRNG_INC_DIR@ \
87 <        @MPI_INC_DIR@
86 >        @CGAL_INC_DIR@ \
87 >        @MPI_INC_DIR@
88  
89   LibraryDirs = \
90 <        @SPRNG_LIB_DIR@ \
90 >        @CGAL_LIB_DIR@ \
91          @MPI_LIB_DIR@
92  
93   Libraries = \
94 <        @SPRNG_LIB@ \
94 >        @CGAL_LIBS@ \
95          @MPI_LIB@ \
96 <        @MPI_F90_LIB@
96 >        @MPI_F90_LIB@
97  
98   OopseHome       = @OOPSE_HOME@
99   ForceParamDir   = $(OopseHome)/share/forceFields
# Line 125 | Line 135 | Package          = $(subst $(shell cd $(SourceDir); pw
135   # /home/maul/gezelter/src/code/src/UseTheForce/Darkside --> UseTheForce/Darkside
136   #Package          = $(shell echo $(CurrentDir) | sed -e 's/^.*\/src\/\(.*\)/\1/g')
137   #use shell script to get the absolute path and then rip it off from $(CurrentDir)
138 < Package          = $(subst $(shell cd $(SourceDir); pwd)/,,$(CurrentDir))
138 > #Package          = $(subst $(shell cd $(SourceDir); pwd)/,,$(CurrentDir))
139 > # REMINDER: We are now using the Package line in each subdir makefile.
140 > # This avoids the strange path problem and the subshell
141  
142   PackageList              = $(Package)
143   PackageSourceDir         = $(SourceDir)/$(Package)
# Line 204 | Line 216 | ThirdPartyJarsTmp = $(patsubst %,$(LibDir)/%,$(JavaLib
216  
217   OtherTargetFiles       = $(OtherSourceFiles:%=$(PackageTargetDir)/%)
218  
219 + ###########################################################################
220 + #
221 + # Figure out the names of the module files based on some work done by
222 + # configure.  The tr function below is from John Graham-Cumming
223 + # (http://www.jgc.org).
224 + #
225 + # The tr function.   Has three arguments:
226 + #
227 + # $1   The list of characters to translate from
228 + # $2   The list of characters to translate to
229 + # $3   The text to translate
230 + #
231 + # For example, $(call tr,A B C,1 2 3,CAPITAL) becomes 21PIT1L.
232 +
233 + tr = $(eval __t := $3)                                                    \
234 +     $(foreach c,                                                         \
235 +         $(join $(addsuffix :,$1),$2),                                    \
236 +         $(eval __t :=                                                    \
237 +             $(subst $(word 1,$(subst :, ,$c)),$(word 2,$(subst :, ,$c)), \
238 +                 $(__t))))$(__t)
239 +
240 + # Common character classes for use with the tr function.  Each of
241 + # these is actually a variable declaration and must be wrapped with
242 + # $() or ${} to be used.
243 +
244 + [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 #
245 + [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 #
246 + [0-9] := 0 1 2 3 4 5 6 7 8 9 #
247 + [A-F] := A B C D E F #
248 +
249 + # Figure out whether we have $(eval) or not (GNU Make 3.80 and above)
250 + # if we do not then we need to use the shell version of tr, and not the
251 + # faster tr function above:
252 +
253 + __have_eval := $(false)
254 + __ignore := $(eval __have_eval := $(true))
255 +
256 + ifndef __have_eval
257 +  uc = $(shell echo $1 | tr "a-z" "A-Z")
258 +  lc = $(shell echo $1 | tr "A-Z" "a-z")
259 + else
260 +  uc = $(call tr,$([a-z]),$([A-Z]),$1)
261 +  lc = $(call tr,$([A-Z]),$([a-z]),$1)
262 + endif
263 +
264 + # OK, now we can actually use these functions to figure out the names
265 + # of the module files:
266 +
267 + ifneq "$(words $(Modules))" "0"
268 + ifeq "$(ModuleCase)" "UPPER"
269 +  MODULES = $(call uc,$(Modules))
270 + else
271 +  ifeq "$(ModuleCase)" "lower"
272 +    MODULES = $(call lc,$(Modules))
273 +  else
274 +    MODULES = $(Modules)
275 +  endif
276 + endif
277 +  ModuleFiles = $(MODULES:%= $(PackageTargetDir)/%.$(ModSuffix))
278 +  ParallelModuleFiles = $(MODULES:%= $(PackageParallelTargetDir)/%.$(ModSuffix))
279 + endif
280 + #
281 + ###########################################################################
282 +
283   ThirdPartyJarsTmp = $(patsubst %,$(LibDir)/%,$(JavaLibraries))
284   ThirdPartyJars    = $(subst $(Space),$(X),$(ThirdPartyJarsTmp))
285  
# Line 215 | Line 291 | ifneq  "$(words $(ObjectFiles) $(ParallelObjectFiles))
291   #if Main is defined, do not build library. It may not be true sometimes
292   ifneq  "$(words $(ObjectFiles) $(ParallelObjectFiles))" "0"
293    DependencyFile    = $(PackageSourceDir)/Makedepend
294 <  ifneq "$(Main)" ""
294 >  ifneq "$(words $(Main))" "0"
295      Executable             = $(BinDir)/$(Main)
296 <    ParallelExecutable     = $(BinDir)/$(Main)_MPI
296 >    ifeq "$(BuiltParallelExe)" "1"
297 >      ParallelExecutable     = $(BinDir)/$(Main)_MPI
298 >    endif
299    else
300      SharedLibrary          = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package)))_UP.so
301      StaticLibrary          = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package)))_UP.a
# Line 247 | Line 325 | Move                   = mv
325   #
326   #---------------------------------------------------------------------------
327   Print                  = @echo
328 < Move                   = mv
328 > Move                   = mv -f
329   Copy                   = cp
330   CCompiler              = @CC@
331   CppCompiler            = @CXX@
# Line 255 | Line 333 | InstallData            = @INSTALL_DATA@
333   MakeDepend             = makedepend
334   INSTALL                = @INSTALL@
335   InstallProgram         = @INSTALL_PROGRAM@
336 + InstallScript          = @INSTALL_SCRIPT@
337   InstallData            = @INSTALL_DATA@
338 < MkDir                = @MKINSTALLDIRS@
338 > MkDir                  = @MKINSTALLDIRS@
339   Delete                 = rm -fr
340   StaticArchiver         = @AR@
341   DynamicArchiver        = @CC@
# Line 285 | Line 364 | COptions               = $(FrcDeclare)
364   JniOptions             =
365   RmiOptions             = -d $(TargetDir) -classpath $(ClassPath) \
366                           -sourcepath $(SourceDir)
367 < COptions               = $(FrcDeclare)
368 < CParallelOptions       = $(FrcDeclare) $(ParallelDeclare)
369 < CppOptions             = $(FrcDeclare)
370 < CppParallelOptions     = $(FrcDeclare) $(ParallelDeclare)
367 > COptions               = $(FrcDeclare) @CFLAGS@
368 > CParallelOptions       = $(FrcDeclare) $(ParallelDeclare) @CFLAGS@
369 > CppOptions             = $(FrcDeclare) @CXXFLAGS@ @OOPSE_TEMPLATE_FLAGS@
370 > CppParallelOptions     = $(FrcDeclare) $(ParallelDeclare) @CXXFLAGS@ @OOPSE_TEMPLATE_FLAGS@
371   FortranOptions         =
372   F90Options             =  @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) @MODDIRFLAG@$(TargetDir)
373   F90ParallelOptions     =  @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) @MODDIRFLAG@$(ParallelTargetDir)  @PREPDEFFLAG@$(ParallelDeclare)
# Line 366 | Line 445 | $(PackageTargetDir) :
445  
446   # Create target directory
447   $(PackageTargetDir) :
448 <        $(MakeDir) $@
448 >        $(MkDir) $@
449  
450 + $(BinDir) :
451 +        $(MkDir) $@
452 +
453   # .c -> .o
454   $(PackageTargetDir)/%.o : %.c
455          $(Print) $@
# Line 421 | Line 503 | $(PackageTargetDir)/%.o : %.F90
503   # .F90 -> .o
504   $(PackageTargetDir)/%.o : %.F90
505          $(F90Compiler) $(F90Options) $(IncludePath) -c $< -o $@
506 <        if test -f *.$(ModSuffix); then \
507 <          $(Move) *.$(ModSuffix) $(PackageTargetDir);\
506 >        if test -n "`ls *.$(ModSuffix)`"; then \
507 >          $(Move) `ls *.$(ModSuffix)` $(PackageTargetDir);\
508          fi
509  
510   $(PackageParallelTargetDir)/%.o : %.F90
511          $(F90Compiler) $(F90ParallelOptions) $(IncludePath) -c $< -o $@
512 <        if test -f *.$(ModSuffix); then \
513 <          $(Move) *.$(ModSuffix) $(PackageParallelTargetDir);\
512 >        if test -n "`ls *.$(ModSuffix)`"; then \
513 >          $(Move) "`ls *.$(ModSuffix)`" $(PackageParallelTargetDir);\
514          fi
515  
516   ifeq "$(UseMPI)" "yes"
517   %.o : %.F90
518          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
519 <        if test -f *.$(ModSuffix); then \
520 <          $(Move) *.$(ModSuffix) $(PackageTargetDir);\
521 <        fi
519 >        if test -n "`ls *.$(ModSuffix)`"; then\
520 >          $(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\
521 >        fi
522  
523          $(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@
524 <        if test -f *.$(ModSuffix); then \
525 <          $(Move) *.$(ModSuffix) $(PackageParallelTargetDir);\
524 >        if test -n "`ls *.$(ModSuffix)`"; then\
525 >          $(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\
526          fi
527  
528   else
529   %.o : %.F90
530          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
531 <        if test -f *.$(ModSuffix); then \
532 <          $(Move) *.$(ModSuffix) $(PackageTargetDir);\
533 <        fi
452 <
531 >        if test -n "`ls *.$(ModSuffix)`"; then\
532 >          $(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\
533 >        fi
534   endif
535  
536  
# Line 569 | Line 650 | $(Executable) : $(CombinedStaticLib) $(ObjectFiles)
650          $(Ranlib) $(CombinedParallelStaticLib)
651  
652   # Executable
653 < $(Executable) : $(CombinedStaticLib) $(ObjectFiles)
654 <        $(Linker) $(ObjectFiles) $(LinkOptions) $(LibDirs) $(CombinedStaticLib) $(Libraries) -o $@
653 > $(Executable) : $(CombinedStaticLib) $(ObjectFiles) $(BinDir)
654 >        $(Linker) $(ObjectFiles) $(CombinedStaticLib) $(LinkOptions) $(LibDirs) $(Libraries) -o $@
655  
656 < $(ParallelExecutable) : $(CombinedParallelStaticLib) $(ParallelObjectFiles)
657 <        $(Linker) $(ParallelObjectFiles) $(ParallelLinkOptions) $(LibDirs) $(CombinedParallelStaticLib) $(Libraries) -o $@
656 > $(ParallelExecutable) : $(CombinedParallelStaticLib) $(ParallelObjectFiles) $(BinDir)
657 >        $(Linker) $(ParallelObjectFiles) $(CombinedParallelStaticLib) $(ParallelLinkOptions) $(LibDirs) $(Libraries) -o $@
658  
659   # Anything else is just copied from source to target
660   $(PackageTargetDir)/% : $(PackageSourceDir)/%
# Line 616 | Line 697 | endif
697          $(Executable)
698   endif
699  
700 + echo : $(PackageListLoop)
701 +        $(Print) Done echo.
702 +
703 + _echoall :
704 +        $(Print) $(Modules)
705  
706   # make clean
707   clean : $(PackageListLoop)
708          $(Print) Done clean.    
709  
710   _cleanall :
711 <        $(Delete) $(ObjectFiles) $(ParallelObjectFiles)
711 >        $(Delete) \
712 >                $(ObjectFiles) \
713 >                $(ModuleFiles) \
714 >                $(ParallelObjectFiles) \
715 >                $(ParallelModuleFiles) \
716 >                $(JarFile) \
717 >                $(SharedLibrary) \
718 >                $(StaticLibrary) \
719 >                $(ParallelSharedLibrary) \
720 >                $(ParallelStaticLibrary) \
721 >                $(CombinedStaticLib) \
722 >                $(CombinedParallelStaticLib)
723  
724   # make distclean
725   distclean : $(PackageListLoop)
726          $(Print) Done clean.    
727  
728 < _distcleanall :
729 <        $(Delete) $(ObjectFiles) \
633 <                  $(ParallelObjectFiles) \
634 <                        $(JarFile) \
635 <                  $(SharedLibrary) \
636 <                  $(StaticLibrary) \
637 <                  $(ParallelSharedLibrary) \
638 <                  $(ParallelStaticLibrary) \
639 <                  $(Executable) \
728 > _distcleanall : _cleanall
729 >        $(Delete) $(Executable) \
730                    $(ParallelExecutable) \
731                    $(DependencyFile)
732  
643
733   # make depend
734   depend : $(PackageListLoop)
735          $(Print) Done dependencies.
# Line 652 | Line 741 | ifneq "$(words $(CppFiles))" "0"
741          @cd $(PackageSourceDir)
742  
743   ifneq "$(words $(CppFiles))" "0"
744 <        $(CppCompiler) $(CppOptions) $(IncludePath) -MM $(CppFiles) > Make.cpptemp
745 <        @cat Make.cpptemp | sed 's/^[a-zA-Z0-9]/$$\(TargetDir\)\/&/g' >> $(DependencyFile)
744 >        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(TargetDir)/' -MM $(CppFiles)>> Make.cpptemp
745 >        @cat Make.cpptemp  >> $(DependencyFile)
746          $(Delete) Make.cpptemp
747  
748    ifeq "$(UseMPI)" "yes"
749 <        $(CppCompiler) $(CppParallelOptions) $(IncludePath) -MM $(CppFiles) > Make.cpptemp
750 <        @cat Make.cpptemp | sed 's/^[a-zA-Z0-9]/$$\(ParallelTargetDir\)\/&/g' >> $(DependencyFile)
749 >        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) -MM $(CppFiles)>> Make.cpptemp
750 >        @cat Make.cpptemp  >> $(DependencyFile)
751          @$(Delete) Make.cpptemp
752    endif
753  
754   endif
755  
756   ifneq "$(words $(CFiles))" "0"
757 <        $(CCompiler) $(COptions) $(IncludePath) -MM $(CFiles) $(DerivedCFiles) > Make.ctemp
758 <        @cat Make.ctemp | sed 's/^[a-zA-Z0-9]/$$\(TargetDir\)\/&/g' >> $(DependencyFile)
757 >        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(TargetDir)/'  -MM $(CFiles) $(DerivedCFiles)  >> Make.ctemp
758 >        @cat Make.ctemp  >> $(DependencyFile)
759          $(Delete) Make.ctemp
760  
761    ifeq "$(UseMPI)" "yes"
762 <        $(CCompiler) $(CParallelOptions) $(IncludePath) -MM $(CFiles) $(DerivedCFiles) > Make.ctemp
763 <        @cat Make.ctemp | sed 's/^[a-zA-Z0-9]/$$\(ParallelTargetDir\)\/&/g' >> $(DependencyFile)
762 >        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) -MM $(CFiles) $(DerivedCFiles)  >> Make.ctemp
763 >        @cat Make.ctemp  >> $(DependencyFile)
764          @$(Delete) Make.ctemp
765    endif
766  
767   endif
768  
769   ifneq "$(words $(F90Files))" "0"
770 <        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(TargetDir)/' $(F90Declare) -mc $(ModuleCase) -ms $(ModSuffix) $(F90Files) > Make.ftemp
770 >        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(TargetDir)/' $(F90Declare) -MM -mc $(ModuleCase) -ms $(ModSuffix) $(F90Files) > Make.ftemp
771          @cat Make.ftemp >> $(DependencyFile)
772          @$(Delete) Make.ftemp
773  
774    ifeq "$(UseMPI)" "yes"
775 <        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) $(F90Declare) -mc $(ModuleCase) -ms $(ModSuffix)  $(F90Files) >> Make.ftemp
775 >        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) $(F90Declare) -MM -mc $(ModuleCase) -ms $(ModSuffix)  $(F90Files) >> Make.ftemp
776          @cat Make.ftemp >> $(DependencyFile)
777          @$(Delete) Make.ftemp
778    endif
# Line 716 | Line 805 | ifneq "$(words $(InstallFiles))" "0"
805   _installdata :  $(MyInstallDir)
806          $(Print) $(InstallFiles)
807   ifneq "$(words $(InstallFiles))" "0"
808 <        $(InstallData) $(InstallFiles) $(MyInstallDir)
808 >        $(InstallCommand) $(InstallFiles) $(MyInstallDir)
809   endif      
810 <        
810 >
811   # make statistics
812   _statisticsall :
813          @$(Print) $(patsubst %,$(CurrentDir)/%,$(SourceFiles)) >> $(DEV_ROOT)/files.tmp
# Line 737 | Line 826 | cvslog:
826  
827   #make cvslog
828   cvslog:
829 <        $(DEV_ROOT)/scripts/cvs2cl.pl
829 >        $(DEV_ROOT)/scripts/cvs2cl
830  
831   # Execute
832   _runexe :

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines