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 2157 by gezelter, Mon Apr 11 16:14:05 2005 UTC vs.
Revision 2622 by tim, Wed Mar 15 15:50:11 2006 UTC

# Line 51 | Line 51 | PackageLibs = \
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 \
59        applications/simpleBuilder\
62          applications/staticProps \
63          applications/dynamicProps \
64 +        applications/simpleBuilder\
65 +        applications/nanoRodBuilder \
66 +        applications/atom2mdin \
67 +        applications/hydrodynamics
68  
69   Samples = \
70 +        samples/alkane \
71          samples/argon \
72 <        samples/water/dimer \
72 >        samples/cutoff \
73 >        samples/dipole \
74 >        samples/gbljtest \
75 >        samples/lipid \
76 >        samples/metals/EAM \
77 >        samples/metals/EAM/nanoparticle \
78 >        samples/metals/EAM/nanorod \
79 >        samples/metals/Sutton-Chen \
80 >        samples/minimizer \
81 >        samples/shape \
82 >        samples/thermoIntegration/liquid \
83 >        samples/thermoIntegration/solid \
84 >        samples/water/dimer \
85          samples/water/spce \
86          samples/water/ssd \
87          samples/water/ssde \
88 +        samples/water/ssdrf \
89 +        samples/water/ssd-ion \
90          samples/water/tip3p_ice \
91          samples/water/tip4p \
92 <        samples/lipid \
72 <        samples/alkane \
73 <        samples/minimizer \
74 <        samples/metals \
75 <        samples/zcons \
92 >        samples/zcons
93  
94   IncludeDirs = \
95 <        @MPI_INC_DIR@
95 >        @CGAL_INC_DIR@ \
96 >        @MPI_INC_DIR@
97  
98   LibraryDirs = \
99 +        @CGAL_LIB_DIR@ \
100          @MPI_LIB_DIR@
101  
102   Libraries = \
103 +        @LIBS@ \
104 +        @CGAL_LIBS@ \
105          @MPI_LIB@ \
106 <        @MPI_F90_LIB@
106 >        @MPI_F90_LIB@
107  
108   OopseHome       = @OOPSE_HOME@
109   ForceParamDir   = $(OopseHome)/share/forceFields
# Line 96 | Line 117 | LinkOptions = \
117   ModuleCase      = @F90_MODULE_NAMES@
118   ModSuffix       = @MOD@
119   LinkOptions = \
120 <        @F90LIBS@
120 >        @FCLIBS@ \
121 >        @CXXFLAGS@
122  
123   ParallelLinkOptions = \
124 <        @F90LIBS@
124 >        @FCLIBS@ \
125 >        @CXXFLAGS@
126  
127  
128   #---------------------------------------------------------------------------
# Line 113 | Line 136 | BinDir            = $(DEV_ROOT)/bin
136   ParallelTargetDir = $(DEV_ROOT)/MPIobj
137   LibDir            = $(DEV_ROOT)/lib
138   MakeDir           = $(DEV_ROOT)/make
139 + MainMakefile      = $(MakeDir)/Makefile
140   BinDir            = $(DEV_ROOT)/bin
141   DocsDir           = $(DEV_ROOT)/docs
142   CurrentDir        = $(CURDIR)
# Line 235 | Line 259 | tr = $(eval __t := $3)                                
259   [0-9] := 0 1 2 3 4 5 6 7 8 9 #
260   [A-F] := A B C D E F #
261  
262 < # Upper case and lower case functions.  Each function has a single
263 < # argument which is the text to alter
262 > # Figure out whether we have $(eval) or not (GNU Make 3.80 and above)
263 > # if we do not then we need to use the shell version of tr, and not the
264 > # faster tr function above:
265  
266 < uc = $(call tr,$([a-z]),$([A-Z]),$1)
267 < lc = $(call tr,$([A-Z]),$([a-z]),$1)
266 > __have_eval := $(false)
267 > __ignore := $(eval __have_eval := $(true))
268  
269 + ifndef __have_eval
270 +  uc = $(shell echo $1 | tr "a-z" "A-Z")
271 +  lc = $(shell echo $1 | tr "A-Z" "a-z")
272 + else
273 +  uc = $(call tr,$([a-z]),$([A-Z]),$1)
274 +  lc = $(call tr,$([A-Z]),$([a-z]),$1)
275 + endif
276 +
277   # OK, now we can actually use these functions to figure out the names
278   # of the module files:
279  
# Line 311 | Line 344 | INSTALL                = @INSTALL@
344   CppCompiler            = @CXX@
345   Linker                 = @CXX@
346   MakeDepend             = makedepend
347 + LN_S                   = @LN_S@
348   INSTALL                = @INSTALL@
349 + EGREP                  = @EGREP@
350   InstallProgram         = @INSTALL_PROGRAM@
351   InstallScript          = @INSTALL_SCRIPT@
352   InstallData            = @INSTALL_DATA@
353   MkDir                  = @MKINSTALLDIRS@
354 < Delete                 = rm -fr
354 > Delete                 = rm -f
355   StaticArchiver         = @AR@
356   DynamicArchiver        = @CC@
357   FortranCompiler        = @FC@
323 F90Compiler            = @F90@
358   JavaCompiler           = $(JAVA_HOME)/bin/javac
359   JavaArchiver           = $(JAVA_HOME)/bin/jar
360   JarSigner              = $(JAVA_HOME)/bin/jarsigner
# Line 346 | Line 380 | CppOptions             = $(FrcDeclare) @CXXFLAGS@ @OOP
380                           -sourcepath $(SourceDir)
381   COptions               = $(FrcDeclare) @CFLAGS@
382   CParallelOptions       = $(FrcDeclare) $(ParallelDeclare) @CFLAGS@
383 < CppOptions             = $(FrcDeclare) @CXXFLAGS@ @OOPSE_TEMPLATE_FLAGS@
384 < CppParallelOptions     = $(FrcDeclare) $(ParallelDeclare) @CXXFLAGS@ @OOPSE_TEMPLATE_FLAGS@
385 < FortranOptions         =
386 < F90Options             =  @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) @MODDIRFLAG@$(TargetDir)
353 < F90ParallelOptions     =  @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) @MODDIRFLAG@$(ParallelTargetDir)  @PREPDEFFLAG@$(ParallelDeclare)
383 > CppOptions             = $(FrcDeclare) @CXXFLAGS@
384 > CppParallelOptions     = $(FrcDeclare) $(ParallelDeclare) @CXXFLAGS@
385 > FortranOptions         =  @FCFLAGS@ @MODDIRFLAG@$(SourceDir) @MODDIRFLAG@$(TargetDir) @FCFLAGS_SRCEXT@
386 > FortranParallelOptions =  @FCFLAGS@ @MODDIRFLAG@$(SourceDir) @MODDIRFLAG@$(ParallelTargetDir) @PREPDEFFLAG@$(ParallelDeclar) @FCFLAGS_SRCEXT@
387   JavaCompilerOptions    = -d $(TargetDir) -classpath $(ClassPath) \
388                           -sourcepath $(SourceDir) -deprecation
389   JavaRunOptions         = -classpath $(ClassPath)
# Line 395 | Line 428 | endif
428      InstallFiles             = $(Executable)
429    endif
430    InstallCommand           = $(InstallProgram)
431 +  ifneq "$(words $(LinkTargets))" "0"
432 +    MyLinkSource = $(patsubst %, $(MyInstallDir)/%,$(Main))
433 +    MyLinkTargets = $(patsubst %, $(MyInstallDir)/%,$(LinkTargets))
434 +  endif
435   endif
436  
437   ifneq "$(words $(ForcefieldFiles))" "0"
# Line 431 | Line 468 | $(PackageTargetDir)/%.o : %.c
468          $(MkDir) $@
469  
470   # .c -> .o
471 < $(PackageTargetDir)/%.o : %.c
471 > $(PackageTargetDir)/%.o : %.c $(MainMakefile)
472          $(Print) $@
473          $(CCompiler) $(COptions) -c $(IncludePath) $< -o $@
474  
475 < $(PackageParallelTargetDir)/%.o : %.c
475 > $(PackageParallelTargetDir)/%.o : %.c $(MainMakefile)
476          $(Print) $@
477          $(CCompiler) $(CParallelOptions) -c $(IncludePath) $< -o $@
478  
479   ifeq "$(UseMPI)" "yes"
480 < %.o : %.c
480 > %.o : %.c $(MainMakefile)
481          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
482          $(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@
483   else
484 < %.o : %.c
484 > %.o : %.c $(MainMakefile)
485          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
486   endif
487  
488   # .cpp -> .o
489 < $(PackageTargetDir)/%.o : %.cpp
489 > $(PackageTargetDir)/%.o : %.cpp $(MainMakefile)
490          $(CppCompiler) $(CppOptions) -c $(IncludePath) $< -o $@
491  
492 < $(PackageParallelTargetDir)/%.o : %.cpp
492 > $(PackageParallelTargetDir)/%.o : %.cpp $(MainMakefile)
493          $(CppCompiler) $(CppParallelOptions) -c $(IncludePath) $< -o $@
494  
495   ifeq "$(UseMPI)" "yes"
496 < %.o : %.cpp
496 > %.o : %.cpp $(MainMakefile)
497          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
498          $(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@
499   else
500 < %.o : %.cpp
500 > %.o : %.cpp $(MainMakefile)
501          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
502   endif
503  
504   # .f -> .o
505 < $(PackageTargetDir)/%.o : %.f
505 > $(PackageTargetDir)/%.o : %.f $(MainMakefile)
506          $(FortranCompiler) $(FortranOptions) -c $< -o $@
507  
508 < $(PackageParallelTargetDir)/%.o : %.f
508 > $(PackageParallelTargetDir)/%.o : %.f $(MainMakefile)
509          $(FortranCompiler) $(FortranParallelOptions) -c $< -o $@
510  
511   ifeq "$(UseMPI)" "yes"
512 < %.o : %.f
512 > %.o : %.f $(MainMakefile)
513          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
514          $(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@
515   else
516 < %.o : %.f
516 > %.o : %.f $(MainMakefile)
517          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
518   endif
519  
520   # .F90 -> .o
521 < $(PackageTargetDir)/%.o : %.F90
522 <        $(F90Compiler) $(F90Options) $(IncludePath) -c $< -o $@
521 > $(PackageTargetDir)/%.o : %.F90 $(MainMakefile)
522 >        $(FortranCompiler) $(FortranOptions) $(IncludePath) -c $< -o $@
523          if test -n "`ls *.$(ModSuffix)`"; then \
524            $(Move) `ls *.$(ModSuffix)` $(PackageTargetDir);\
525          fi
526  
527 < $(PackageParallelTargetDir)/%.o : %.F90
528 <        $(F90Compiler) $(F90ParallelOptions) $(IncludePath) -c $< -o $@
527 > $(PackageParallelTargetDir)/%.o : %.F90 $(MainMakefile)
528 >        $(FortranCompiler) $(FortranParallelOptions) $(IncludePath) -c $< -o $@
529          if test -n "`ls *.$(ModSuffix)`"; then \
530            $(Move) "`ls *.$(ModSuffix)`" $(PackageParallelTargetDir);\
531          fi
532  
533   ifeq "$(UseMPI)" "yes"
534 < %.o : %.F90
534 > %.o : %.F90 $(MainMakefile)
535          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
536          if test -n "`ls *.$(ModSuffix)`"; then\
537            $(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\
# Line 506 | Line 543 | else
543          fi
544  
545   else
546 < %.o : %.F90
546 > %.o : %.F90 $(MainMakefile)
547          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
548          if test -n "`ls *.$(ModSuffix)`"; then\
549            $(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\
# Line 613 | Line 650 | find_objs = $(shell $(StaticArchiver) -t $(1))
650          $(Doxygen) $(DEV_ROOT)/make/Doxyfile
651  
652   #GUN make funtions to merge the libraries
653 < find_objs = $(shell $(StaticArchiver) -t $(1))
653 > find_objs = $(shell $(StaticArchiver) -t $(1) | $(EGREP) -v "SYMDEF")
654   extract_objs = $(shell $(StaticArchiver) -x $(1) $(call find_objs, $(1)))
655   create_archive = $(shell  $(StaticArchiver) $(StaticArchiverOptions) $(2) $(call find_objs, $(1)))
656   remove_objs = $(shell $(Delete) $(call find_objs, $(1)))
657   do_create = $(call extract_objs,$(1))$(call create_archive,$(1),$(2))$(call remove_objs,$(1))  
658 + do_link = $(shell $(LN_S) $(1) $(2))
659 + all_objs = $(foreach thisLib,$(LibNames), $(call find_objs, $(thisLib)))
660 + all_parallel_objs = $(foreach thisLib,$(ParallelLibNames), $(call find_objs, $(thisLib)))
661 + all_lib_objs = $(patsubst %,$(TargetDir)/%,$(call all_objs))
662 + all_lib_parallel_objs = $(patsubst %,$(ParallelTargetDir)/%,$(call all_parallel_objs))
663  
664   $(CombinedStaticLib) : $(LibDir)/.stamp_UP
665 <        $(Print) create $@      
666 <        $(foreach thisLib,$(LibNames),$(call do_create,$(thisLib),$@))
665 >        $(Print) creating $@            
666 >        $(StaticArchiver) $(StaticArchiverOptions) $@ $(call all_lib_objs)
667          $(Ranlib) $(CombinedStaticLib)
668  
669   $(CombinedParallelStaticLib) : $(LibDir)/.stamp_MPI
670 <        $(Print) create $@
671 <        $(foreach thisLib,$(ParallelLibNames), $(call do_create, $(thisLib), $@))
670 >        $(Print) creating $@
671 >        $(StaticArchiver) $(StaticArchiverOptions) $@ $(call all_lib_parallel_objs)
672          $(Ranlib) $(CombinedParallelStaticLib)
673  
674   # Executable
675 < $(Executable) : $(CombinedStaticLib) $(ObjectFiles) $(BinDir)
675 > $(Executable) : $(CombinedStaticLib) $(ObjectFiles)
676 >        if test ! -d $(BinDir); then \
677 >                $(MkDir) $(BinDir) ;\
678 >        fi
679          $(Linker) $(ObjectFiles) $(CombinedStaticLib) $(LinkOptions) $(LibDirs) $(Libraries) -o $@
680  
681 < $(ParallelExecutable) : $(CombinedParallelStaticLib) $(ParallelObjectFiles) $(BinDir)
681 > $(ParallelExecutable) : $(CombinedParallelStaticLib) $(ParallelObjectFiles)
682 >        if test ! -d $(BinDir); then \
683 >                $(MkDir) $(BinDir) ;\
684 >        fi
685          $(Linker) $(ParallelObjectFiles) $(CombinedParallelStaticLib) $(ParallelLinkOptions) $(LibDirs) $(Libraries) -o $@
686  
687   # Anything else is just copied from source to target
# Line 777 | Line 825 | _installall : _buildall _installdata
825   install : $(InstallListLoop)
826          $(Print) Done Install
827  
828 < _installall : _buildall _installdata
828 > _installall : _buildall _installdata _installlinks
829  
830   $(MyInstallDir) :
831          $(MkDir) $@
# Line 788 | Line 836 | endif      
836          $(InstallCommand) $(InstallFiles) $(MyInstallDir)
837   endif      
838  
839 + _installlinks :  $(MyInstallDir)
840 + ifneq "$(words $(MyLinkTargets))" "0"
841 +        @cd $(MyInstallDir)
842 +        $(foreach thisLink,$(MyLinkTargets),$(call do_link,$(MyLinkSource),$(thisLink)))
843 + endif      
844 +
845   # make statistics
846   _statisticsall :
847          @$(Print) $(patsubst %,$(CurrentDir)/%,$(SourceFiles)) >> $(DEV_ROOT)/files.tmp
# Line 798 | Line 852 | $(Executable).pure :
852          $(Print) Done statistics.
853  
854   # make pure
855 < $(Executable).pure :
856 <        $(Purify) $(PurifyOptions) $(CppCompiler) $(LinkOptions) $(LibDirs) \
857 <        $(LibList) $(ObjectFiles) -o $@
855 > #$(Executable).pure :
856 > #       $(Purify) $(PurifyOptions) $(CppCompiler) $(LinkOptions) $(LibDirs) \
857 > #       $(LibList) $(ObjectFiles) -o $@
858 > #
859 > #pure : $(Executable).pure
860  
805 pure : $(Executable).pure
806
861   #make cvslog
862   cvslog:
863 <        $(DEV_ROOT)/scripts/cvs2cl.pl
863 >        $(DEV_ROOT)/scripts/cvs2cl
864  
865   # Execute
866   _runexe :

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines