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

Comparing trunk/OOPSE-2.0/make/Makefile.in (file contents):
Revision 1712 by tim, Thu Nov 4 20:55:01 2004 UTC vs.
Revision 2474 by gezelter, Fri Dec 2 20:10:30 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 <
54 >        lattice \
55 >        openbabel\
56 >        antlr\
57 >        mdParser
58   #packages containing applications
59   Applications = \
60          applications/oopse \
61          applications/dump2Xyz \
62 <        applications/simpleBuilder
62 >        applications/staticProps \
63 >        applications/dynamicProps \
64 >        applications/simpleBuilder\
65 >        applications/nanoRodBuilder \
66 >        applications/atom2mdin
67  
68   Samples = \
69          samples/argon \
70 <        samples/water/dimer \
70 >        samples/water/dimer \
71          samples/water/spce \
72          samples/water/ssd \
73          samples/water/ssde \
74 +        samples/water/ssdrf \
75 +        samples/water/ssd-ion \
76          samples/water/tip3p_ice \
77          samples/water/tip4p \
78          samples/lipid \
79          samples/alkane \
80          samples/minimizer \
81          samples/metals \
82 +        samples/thermoIntegration/liquid \
83 +        samples/thermoIntegration/solid \
84 +        samples/dipole \
85 +        samples/shape \
86          samples/zcons \
87  
88   IncludeDirs = \
89 <        @SPRNG_INC_DIR@ \
90 <        @MPI_INC_DIR@
89 >        @CGAL_INC_DIR@ \
90 >        @MPI_INC_DIR@
91  
92   LibraryDirs = \
93 <        @SPRNG_LIB_DIR@ \
93 >        @CGAL_LIB_DIR@ \
94          @MPI_LIB_DIR@
95  
96   Libraries = \
97 <        @SPRNG_LIB@ \
97 >        @LIBS@ \
98 >        @CGAL_LIBS@ \
99          @MPI_LIB@ \
100 <        @MPI_F90_LIB@
100 >        @MPI_F90_LIB@
101  
102   OopseHome       = @OOPSE_HOME@
103   ForceParamDir   = $(OopseHome)/share/forceFields
# Line 111 | Line 128 | BinDir            = $(DEV_ROOT)/bin
128   ParallelTargetDir = $(DEV_ROOT)/MPIobj
129   LibDir            = $(DEV_ROOT)/lib
130   MakeDir           = $(DEV_ROOT)/make
131 + MainMakefile      = $(MakeDir)/Makefile
132   BinDir            = $(DEV_ROOT)/bin
133   DocsDir           = $(DEV_ROOT)/docs
134   CurrentDir        = $(CURDIR)
# Line 122 | Line 140 | Package          = $(subst $(shell cd $(SourceDir); pw
140   # /home/maul/gezelter/src/code/src/UseTheForce/Darkside --> UseTheForce/Darkside
141   #Package          = $(shell echo $(CurrentDir) | sed -e 's/^.*\/src\/\(.*\)/\1/g')
142   #use shell script to get the absolute path and then rip it off from $(CurrentDir)
143 < Package          = $(subst $(shell cd $(SourceDir); pwd)/,,$(CurrentDir))
143 > #Package          = $(subst $(shell cd $(SourceDir); pwd)/,,$(CurrentDir))
144 > # REMINDER: We are now using the Package line in each subdir makefile.
145 > # This avoids the strange path problem and the subshell
146  
147   PackageList              = $(Package)
148   PackageSourceDir         = $(SourceDir)/$(Package)
# Line 201 | Line 221 | ThirdPartyJarsTmp = $(patsubst %,$(LibDir)/%,$(JavaLib
221  
222   OtherTargetFiles       = $(OtherSourceFiles:%=$(PackageTargetDir)/%)
223  
224 + ###########################################################################
225 + #
226 + # Figure out the names of the module files based on some work done by
227 + # configure.  The tr function below is from John Graham-Cumming
228 + # (http://www.jgc.org).
229 + #
230 + # The tr function.   Has three arguments:
231 + #
232 + # $1   The list of characters to translate from
233 + # $2   The list of characters to translate to
234 + # $3   The text to translate
235 + #
236 + # For example, $(call tr,A B C,1 2 3,CAPITAL) becomes 21PIT1L.
237 +
238 + tr = $(eval __t := $3)                                                    \
239 +     $(foreach c,                                                         \
240 +         $(join $(addsuffix :,$1),$2),                                    \
241 +         $(eval __t :=                                                    \
242 +             $(subst $(word 1,$(subst :, ,$c)),$(word 2,$(subst :, ,$c)), \
243 +                 $(__t))))$(__t)
244 +
245 + # Common character classes for use with the tr function.  Each of
246 + # these is actually a variable declaration and must be wrapped with
247 + # $() or ${} to be used.
248 +
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 + [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 #
251 + [0-9] := 0 1 2 3 4 5 6 7 8 9 #
252 + [A-F] := A B C D E F #
253 +
254 + # Figure out whether we have $(eval) or not (GNU Make 3.80 and above)
255 + # if we do not then we need to use the shell version of tr, and not the
256 + # faster tr function above:
257 +
258 + __have_eval := $(false)
259 + __ignore := $(eval __have_eval := $(true))
260 +
261 + ifndef __have_eval
262 +  uc = $(shell echo $1 | tr "a-z" "A-Z")
263 +  lc = $(shell echo $1 | tr "A-Z" "a-z")
264 + else
265 +  uc = $(call tr,$([a-z]),$([A-Z]),$1)
266 +  lc = $(call tr,$([A-Z]),$([a-z]),$1)
267 + endif
268 +
269 + # OK, now we can actually use these functions to figure out the names
270 + # of the module files:
271 +
272 + ifneq "$(words $(Modules))" "0"
273 + ifeq "$(ModuleCase)" "UPPER"
274 +  MODULES = $(call uc,$(Modules))
275 + else
276 +  ifeq "$(ModuleCase)" "lower"
277 +    MODULES = $(call lc,$(Modules))
278 +  else
279 +    MODULES = $(Modules)
280 +  endif
281 + endif
282 +  ModuleFiles = $(MODULES:%= $(PackageTargetDir)/%.$(ModSuffix))
283 +  ParallelModuleFiles = $(MODULES:%= $(PackageParallelTargetDir)/%.$(ModSuffix))
284 + endif
285 + #
286 + ###########################################################################
287 +
288   ThirdPartyJarsTmp = $(patsubst %,$(LibDir)/%,$(JavaLibraries))
289   ThirdPartyJars    = $(subst $(Space),$(X),$(ThirdPartyJarsTmp))
290  
# Line 212 | Line 296 | ifneq  "$(words $(ObjectFiles) $(ParallelObjectFiles))
296   #if Main is defined, do not build library. It may not be true sometimes
297   ifneq  "$(words $(ObjectFiles) $(ParallelObjectFiles))" "0"
298    DependencyFile    = $(PackageSourceDir)/Makedepend
299 <  ifneq "$(Main)" ""
299 >  ifneq "$(words $(Main))" "0"
300      Executable             = $(BinDir)/$(Main)
301 <    ParallelExecutable     = $(BinDir)/$(Main)_MPI
301 >    ifeq "$(BuiltParallelExe)" "1"
302 >      ParallelExecutable     = $(BinDir)/$(Main)_MPI
303 >    endif
304    else
305      SharedLibrary          = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package)))_UP.so
306      StaticLibrary          = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package)))_UP.a
# Line 244 | Line 330 | Move                   = mv
330   #
331   #---------------------------------------------------------------------------
332   Print                  = @echo
333 < Move                   = mv
333 > Move                   = mv -f
334   Copy                   = cp
335   CCompiler              = @CC@
336   CppCompiler            = @CXX@
337   Linker                 = @CXX@
338   MakeDepend             = makedepend
339 + LN_S                   = @LN_S@
340   INSTALL                = @INSTALL@
341 + EGREP                  = @EGREP@
342   InstallProgram         = @INSTALL_PROGRAM@
343 + InstallScript          = @INSTALL_SCRIPT@
344   InstallData            = @INSTALL_DATA@
345 < MkDir                = @MKINSTALLDIRS@
346 < Delete                 = rm -fr
345 > MkDir                  = @MKINSTALLDIRS@
346 > Delete                 = rm -f
347   StaticArchiver         = @AR@
348   DynamicArchiver        = @CC@
349   FortranCompiler        = @FC@
# Line 284 | Line 373 | CppOptions             = $(FrcDeclare) @CXXFLAGS@
373                           -sourcepath $(SourceDir)
374   COptions               = $(FrcDeclare) @CFLAGS@
375   CParallelOptions       = $(FrcDeclare) $(ParallelDeclare) @CFLAGS@
376 < CppOptions             = $(FrcDeclare) @CXXFLAGS@
377 < CppParallelOptions     = $(FrcDeclare) $(ParallelDeclare) @CXXFLAGS@
376 > CppOptions             = $(FrcDeclare) @CXXFLAGS@ @OOPSE_TEMPLATE_FLAGS@
377 > CppParallelOptions     = $(FrcDeclare) $(ParallelDeclare) @CXXFLAGS@ @OOPSE_TEMPLATE_FLAGS@
378   FortranOptions         =
379   F90Options             =  @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) @MODDIRFLAG@$(TargetDir)
380   F90ParallelOptions     =  @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) @MODDIRFLAG@$(ParallelTargetDir)  @PREPDEFFLAG@$(ParallelDeclare)
# Line 333 | Line 422 | endif
422      InstallFiles             = $(Executable)
423    endif
424    InstallCommand           = $(InstallProgram)
425 +  ifneq "$(words $(LinkTargets))" "0"
426 +    MyLinkSource = $(patsubst %, $(MyInstallDir)/%,$(Main))
427 +    MyLinkTargets = $(patsubst %, $(MyInstallDir)/%,$(LinkTargets))
428 +  endif
429   endif
430  
431   ifneq "$(words $(ForcefieldFiles))" "0"
# Line 363 | Line 456 | $(PackageTargetDir) :
456  
457   # Create target directory
458   $(PackageTargetDir) :
459 <        $(MakeDir) $@
459 >        $(MkDir) $@
460  
461 + $(BinDir) :
462 +        $(MkDir) $@
463 +
464   # .c -> .o
465 < $(PackageTargetDir)/%.o : %.c
465 > $(PackageTargetDir)/%.o : %.c $(MainMakefile)
466          $(Print) $@
467          $(CCompiler) $(COptions) -c $(IncludePath) $< -o $@
468  
469 < $(PackageParallelTargetDir)/%.o : %.c
469 > $(PackageParallelTargetDir)/%.o : %.c $(MainMakefile)
470          $(Print) $@
471          $(CCompiler) $(CParallelOptions) -c $(IncludePath) $< -o $@
472  
473   ifeq "$(UseMPI)" "yes"
474 < %.o : %.c
474 > %.o : %.c $(MainMakefile)
475          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
476          $(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@
477   else
478 < %.o : %.c
478 > %.o : %.c $(MainMakefile)
479          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
480   endif
481  
482   # .cpp -> .o
483 < $(PackageTargetDir)/%.o : %.cpp
483 > $(PackageTargetDir)/%.o : %.cpp $(MainMakefile)
484          $(CppCompiler) $(CppOptions) -c $(IncludePath) $< -o $@
485  
486 < $(PackageParallelTargetDir)/%.o : %.cpp
486 > $(PackageParallelTargetDir)/%.o : %.cpp $(MainMakefile)
487          $(CppCompiler) $(CppParallelOptions) -c $(IncludePath) $< -o $@
488  
489   ifeq "$(UseMPI)" "yes"
490 < %.o : %.cpp
490 > %.o : %.cpp $(MainMakefile)
491          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
492          $(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@
493   else
494 < %.o : %.cpp
494 > %.o : %.cpp $(MainMakefile)
495          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
496   endif
497  
498   # .f -> .o
499 < $(PackageTargetDir)/%.o : %.f
499 > $(PackageTargetDir)/%.o : %.f $(MainMakefile)
500          $(FortranCompiler) $(FortranOptions) -c $< -o $@
501  
502 < $(PackageParallelTargetDir)/%.o : %.f
502 > $(PackageParallelTargetDir)/%.o : %.f $(MainMakefile)
503          $(FortranCompiler) $(FortranParallelOptions) -c $< -o $@
504  
505   ifeq "$(UseMPI)" "yes"
506 < %.o : %.f
506 > %.o : %.f $(MainMakefile)
507          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
508          $(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@
509   else
510 < %.o : %.f
510 > %.o : %.f $(MainMakefile)
511          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
512   endif
513  
514   # .F90 -> .o
515 < $(PackageTargetDir)/%.o : %.F90
515 > $(PackageTargetDir)/%.o : %.F90 $(MainMakefile)
516          $(F90Compiler) $(F90Options) $(IncludePath) -c $< -o $@
517 <        if test -f *.$(ModSuffix); then \
518 <          $(Move) *.$(ModSuffix) $(PackageTargetDir);\
517 >        if test -n "`ls *.$(ModSuffix)`"; then \
518 >          $(Move) `ls *.$(ModSuffix)` $(PackageTargetDir);\
519          fi
520  
521 < $(PackageParallelTargetDir)/%.o : %.F90
521 > $(PackageParallelTargetDir)/%.o : %.F90 $(MainMakefile)
522          $(F90Compiler) $(F90ParallelOptions) $(IncludePath) -c $< -o $@
523 <        if test -f *.$(ModSuffix); then \
524 <          $(Move) *.$(ModSuffix) $(PackageParallelTargetDir);\
523 >        if test -n "`ls *.$(ModSuffix)`"; then \
524 >          $(Move) "`ls *.$(ModSuffix)`" $(PackageParallelTargetDir);\
525          fi
526  
527   ifeq "$(UseMPI)" "yes"
528 < %.o : %.F90
528 > %.o : %.F90 $(MainMakefile)
529          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
530 <        if test -f *.$(ModSuffix); then \
531 <          $(Move) *.$(ModSuffix) $(PackageTargetDir);\
532 <        fi
530 >        if test -n "`ls *.$(ModSuffix)`"; then\
531 >          $(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\
532 >        fi
533  
534          $(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@
535 <        if test -f *.$(ModSuffix); then \
536 <          $(Move) *.$(ModSuffix) $(PackageParallelTargetDir);\
535 >        if test -n "`ls *.$(ModSuffix)`"; then\
536 >          $(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\
537          fi
538  
539   else
540 < %.o : %.F90
540 > %.o : %.F90 $(MainMakefile)
541          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
542 <        if test -f *.$(ModSuffix); then \
543 <          $(Move) *.$(ModSuffix) $(PackageTargetDir);\
544 <        fi
449 <
542 >        if test -n "`ls *.$(ModSuffix)`"; then\
543 >          $(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\
544 >        fi
545   endif
546  
547  
# Line 549 | Line 644 | find_objs = $(shell $(StaticArchiver) -t $(1))
644          $(Doxygen) $(DEV_ROOT)/make/Doxyfile
645  
646   #GUN make funtions to merge the libraries
647 < find_objs = $(shell $(StaticArchiver) -t $(1))
647 > find_objs = $(shell $(StaticArchiver) -t $(1) | $(EGREP) -v "SYMDEF")
648   extract_objs = $(shell $(StaticArchiver) -x $(1) $(call find_objs, $(1)))
649   create_archive = $(shell  $(StaticArchiver) $(StaticArchiverOptions) $(2) $(call find_objs, $(1)))
650   remove_objs = $(shell $(Delete) $(call find_objs, $(1)))
651   do_create = $(call extract_objs,$(1))$(call create_archive,$(1),$(2))$(call remove_objs,$(1))  
652 + do_link = $(shell $(LN_S) $(1) $(2))
653 + all_objs = $(foreach thisLib,$(LibNames), $(call find_objs, $(thisLib)))
654 + all_parallel_objs = $(foreach thisLib,$(ParallelLibNames), $(call find_objs, $(thisLib)))
655 + all_lib_objs = $(patsubst %,$(TargetDir)/%,$(call all_objs))
656 + all_lib_parallel_objs = $(patsubst %,$(TargetDir)/%,$(call all_parallel_objs))
657  
658   $(CombinedStaticLib) : $(LibDir)/.stamp_UP
659 <        $(Print) create $@      
660 <        $(foreach thisLib,$(LibNames),$(call do_create,$(thisLib),$@))
659 >        $(Print) creating $@            
660 >        $(StaticArchiver) $(StaticArchiverOptions) $@ $(call all_lib_objs)
661          $(Ranlib) $(CombinedStaticLib)
662  
663   $(CombinedParallelStaticLib) : $(LibDir)/.stamp_MPI
664 <        $(Print) create $@
665 <        $(foreach thisLib,$(ParallelLibNames), $(call do_create, $(thisLib), $@))
664 >        $(Print) creating $@
665 >        $(StaticArchiver) $(StaticArchiverOptions) $@ $(call all_lib_parallel_objs)
666          $(Ranlib) $(CombinedParallelStaticLib)
667  
668   # Executable
669 < $(Executable) : $(CombinedStaticLib) $(ObjectFiles)
670 <        $(Linker) $(ObjectFiles) $(LinkOptions) $(LibDirs) $(CombinedStaticLib) $(Libraries) -o $@
669 > $(Executable) : $(CombinedStaticLib) $(ObjectFiles) $(BinDir)
670 >        $(Linker) $(ObjectFiles) $(CombinedStaticLib) $(LinkOptions) $(LibDirs) $(Libraries) -o $@
671  
672 < $(ParallelExecutable) : $(CombinedParallelStaticLib) $(ParallelObjectFiles)
673 <        $(Linker) $(ParallelObjectFiles) $(ParallelLinkOptions) $(LibDirs) $(CombinedParallelStaticLib) $(Libraries) -o $@
672 > $(ParallelExecutable) : $(CombinedParallelStaticLib) $(ParallelObjectFiles) $(BinDir)
673 >        $(Linker) $(ParallelObjectFiles) $(CombinedParallelStaticLib) $(ParallelLinkOptions) $(LibDirs) $(Libraries) -o $@
674  
675   # Anything else is just copied from source to target
676   $(PackageTargetDir)/% : $(PackageSourceDir)/%
# Line 613 | Line 713 | endif
713          $(Executable)
714   endif
715  
716 + echo : $(PackageListLoop)
717 +        $(Print) Done echo.
718  
719 + _echoall :
720 +        $(Print) $(Modules)
721 +
722   # make clean
723   clean : $(PackageListLoop)
724          $(Print) Done clean.    
725  
726   _cleanall :
727 <        $(Delete) $(ObjectFiles) $(ParallelObjectFiles)
727 >        $(Delete) \
728 >                $(ObjectFiles) \
729 >                $(ModuleFiles) \
730 >                $(ParallelObjectFiles) \
731 >                $(ParallelModuleFiles) \
732 >                $(JarFile) \
733 >                $(SharedLibrary) \
734 >                $(StaticLibrary) \
735 >                $(ParallelSharedLibrary) \
736 >                $(ParallelStaticLibrary) \
737 >                $(CombinedStaticLib) \
738 >                $(CombinedParallelStaticLib)
739  
740   # make distclean
741   distclean : $(PackageListLoop)
742          $(Print) Done clean.    
743  
744 < _distcleanall :
745 <        $(Delete) $(ObjectFiles) \
630 <                  $(ParallelObjectFiles) \
631 <                        $(JarFile) \
632 <                  $(SharedLibrary) \
633 <                  $(StaticLibrary) \
634 <                  $(ParallelSharedLibrary) \
635 <                  $(ParallelStaticLibrary) \
636 <                  $(Executable) \
744 > _distcleanall : _cleanall
745 >        $(Delete) $(Executable) \
746                    $(ParallelExecutable) \
747                    $(DependencyFile)
748  
640
749   # make depend
750   depend : $(PackageListLoop)
751          $(Print) Done dependencies.
# Line 705 | Line 813 | _installall : _buildall _installdata
813   install : $(InstallListLoop)
814          $(Print) Done Install
815  
816 < _installall : _buildall _installdata
816 > _installall : _buildall _installdata _installlinks
817  
818   $(MyInstallDir) :
819          $(MkDir) $@
# Line 713 | Line 821 | ifneq "$(words $(InstallFiles))" "0"
821   _installdata :  $(MyInstallDir)
822          $(Print) $(InstallFiles)
823   ifneq "$(words $(InstallFiles))" "0"
824 <        $(InstallData) $(InstallFiles) $(MyInstallDir)
824 >        $(InstallCommand) $(InstallFiles) $(MyInstallDir)
825   endif      
826 <        
826 >
827 > _installlinks :  $(MyInstallDir)
828 > ifneq "$(words $(MyLinkTargets))" "0"
829 >        @cd $(MyInstallDir)
830 >        $(foreach thisLink,$(MyLinkTargets),$(call do_link,$(MyLinkSource),$(thisLink)))
831 > endif      
832 >
833   # make statistics
834   _statisticsall :
835          @$(Print) $(patsubst %,$(CurrentDir)/%,$(SourceFiles)) >> $(DEV_ROOT)/files.tmp
# Line 726 | Line 840 | $(Executable).pure :
840          $(Print) Done statistics.
841  
842   # make pure
843 < $(Executable).pure :
844 <        $(Purify) $(PurifyOptions) $(CppCompiler) $(LinkOptions) $(LibDirs) \
845 <        $(LibList) $(ObjectFiles) -o $@
843 > #$(Executable).pure :
844 > #       $(Purify) $(PurifyOptions) $(CppCompiler) $(LinkOptions) $(LibDirs) \
845 > #       $(LibList) $(ObjectFiles) -o $@
846 > #
847 > #pure : $(Executable).pure
848  
733 pure : $(Executable).pure
734
849   #make cvslog
850   cvslog:
851 <        $(DEV_ROOT)/scripts/cvs2cl.pl
851 >        $(DEV_ROOT)/scripts/cvs2cl
852  
853   # Execute
854   _runexe :

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines