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 2101 by chrisfen, Thu Mar 10 15:10:24 2005 UTC vs.
Revision 2470 by tim, Fri Dec 2 15:38:25 2005 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  
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 <        @MPI_INC_DIR@
89 >        @CGAL_INC_DIR@ \
90 >        @MPI_INC_DIR@
91  
92   LibraryDirs = \
93 +        @CGAL_LIB_DIR@ \
94          @MPI_LIB_DIR@
95  
96   Libraries = \
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 113 | 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 204 | Line 220 | OtherTargetFiles       = $(OtherSourceFiles:%=$(Packag
220                           $(LexFiles:%.l=     %.c)
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))
# Line 216 | 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 254 | Line 336 | INSTALL                = @INSTALL@
336   CppCompiler            = @CXX@
337   Linker                 = @CXX@
338   MakeDepend             = makedepend
339 + LN_S                   = @LN_S@
340   INSTALL                = @INSTALL@
341   InstallProgram         = @INSTALL_PROGRAM@
342 + InstallScript          = @INSTALL_SCRIPT@
343   InstallData            = @INSTALL_DATA@
344   MkDir                  = @MKINSTALLDIRS@
345 < Delete                 = rm -fr
345 > Delete                 = rm -f
346   StaticArchiver         = @AR@
347   DynamicArchiver        = @CC@
348   FortranCompiler        = @FC@
# Line 337 | Line 421 | endif
421      InstallFiles             = $(Executable)
422    endif
423    InstallCommand           = $(InstallProgram)
424 +  ifneq "$(words $(LinkTargets))" "0"
425 +    MyLinkSource = $(patsubst %, $(MyInstallDir)/%,$(Main))
426 +    MyLinkTargets = $(patsubst %, $(MyInstallDir)/%,$(LinkTargets))
427 +  endif
428   endif
429  
430   ifneq "$(words $(ForcefieldFiles))" "0"
# Line 373 | Line 461 | $(PackageTargetDir)/%.o : %.c
461          $(MkDir) $@
462  
463   # .c -> .o
464 < $(PackageTargetDir)/%.o : %.c
464 > $(PackageTargetDir)/%.o : %.c $(MainMakefile)
465          $(Print) $@
466          $(CCompiler) $(COptions) -c $(IncludePath) $< -o $@
467  
468 < $(PackageParallelTargetDir)/%.o : %.c
468 > $(PackageParallelTargetDir)/%.o : %.c $(MainMakefile)
469          $(Print) $@
470          $(CCompiler) $(CParallelOptions) -c $(IncludePath) $< -o $@
471  
472   ifeq "$(UseMPI)" "yes"
473 < %.o : %.c
473 > %.o : %.c $(MainMakefile)
474          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
475          $(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@
476   else
477 < %.o : %.c
477 > %.o : %.c $(MainMakefile)
478          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
479   endif
480  
481   # .cpp -> .o
482 < $(PackageTargetDir)/%.o : %.cpp
482 > $(PackageTargetDir)/%.o : %.cpp $(MainMakefile)
483          $(CppCompiler) $(CppOptions) -c $(IncludePath) $< -o $@
484  
485 < $(PackageParallelTargetDir)/%.o : %.cpp
485 > $(PackageParallelTargetDir)/%.o : %.cpp $(MainMakefile)
486          $(CppCompiler) $(CppParallelOptions) -c $(IncludePath) $< -o $@
487  
488   ifeq "$(UseMPI)" "yes"
489 < %.o : %.cpp
489 > %.o : %.cpp $(MainMakefile)
490          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
491          $(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@
492   else
493 < %.o : %.cpp
493 > %.o : %.cpp $(MainMakefile)
494          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
495   endif
496  
497   # .f -> .o
498 < $(PackageTargetDir)/%.o : %.f
498 > $(PackageTargetDir)/%.o : %.f $(MainMakefile)
499          $(FortranCompiler) $(FortranOptions) -c $< -o $@
500  
501 < $(PackageParallelTargetDir)/%.o : %.f
501 > $(PackageParallelTargetDir)/%.o : %.f $(MainMakefile)
502          $(FortranCompiler) $(FortranParallelOptions) -c $< -o $@
503  
504   ifeq "$(UseMPI)" "yes"
505 < %.o : %.f
505 > %.o : %.f $(MainMakefile)
506          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
507          $(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@
508   else
509 < %.o : %.f
509 > %.o : %.f $(MainMakefile)
510          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
511   endif
512  
513   # .F90 -> .o
514 < $(PackageTargetDir)/%.o : %.F90
514 > $(PackageTargetDir)/%.o : %.F90 $(MainMakefile)
515          $(F90Compiler) $(F90Options) $(IncludePath) -c $< -o $@
516          if test -n "`ls *.$(ModSuffix)`"; then \
517            $(Move) `ls *.$(ModSuffix)` $(PackageTargetDir);\
518          fi
519  
520 < $(PackageParallelTargetDir)/%.o : %.F90
520 > $(PackageParallelTargetDir)/%.o : %.F90 $(MainMakefile)
521          $(F90Compiler) $(F90ParallelOptions) $(IncludePath) -c $< -o $@
522          if test -n "`ls *.$(ModSuffix)`"; then \
523            $(Move) "`ls *.$(ModSuffix)`" $(PackageParallelTargetDir);\
524          fi
525  
526   ifeq "$(UseMPI)" "yes"
527 < %.o : %.F90
527 > %.o : %.F90 $(MainMakefile)
528          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
529          if test -n "`ls *.$(ModSuffix)`"; then\
530            $(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\
# Line 448 | Line 536 | else
536          fi
537  
538   else
539 < %.o : %.F90
539 > %.o : %.F90 $(MainMakefile)
540          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
541          if test -n "`ls *.$(ModSuffix)`"; then\
542            $(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\
# Line 560 | Line 648 | do_create = $(call extract_objs,$(1))$(call create_arc
648   create_archive = $(shell  $(StaticArchiver) $(StaticArchiverOptions) $(2) $(call find_objs, $(1)))
649   remove_objs = $(shell $(Delete) $(call find_objs, $(1)))
650   do_create = $(call extract_objs,$(1))$(call create_archive,$(1),$(2))$(call remove_objs,$(1))  
651 + do_link = $(shell $(LN_S) $(1) $(2))
652  
653   $(CombinedStaticLib) : $(LibDir)/.stamp_UP
654          $(Print) create $@      
# Line 619 | Line 708 | endif
708          $(Executable)
709   endif
710  
711 + echo : $(PackageListLoop)
712 +        $(Print) Done echo.
713  
714 + _echoall :
715 +        $(Print) $(Modules)
716 +
717   # make clean
718   clean : $(PackageListLoop)
719          $(Print) Done clean.    
# Line 627 | Line 721 | _cleanall :
721   _cleanall :
722          $(Delete) \
723                  $(ObjectFiles) \
724 +                $(ModuleFiles) \
725                  $(ParallelObjectFiles) \
726 +                $(ParallelModuleFiles) \
727                  $(JarFile) \
728                  $(SharedLibrary) \
729                  $(StaticLibrary) \
# Line 712 | Line 808 | _installall : _buildall _installdata
808   install : $(InstallListLoop)
809          $(Print) Done Install
810  
811 < _installall : _buildall _installdata
811 > _installall : _buildall _installdata _installlinks
812  
813   $(MyInstallDir) :
814          $(MkDir) $@
# Line 720 | Line 816 | ifneq "$(words $(InstallFiles))" "0"
816   _installdata :  $(MyInstallDir)
817          $(Print) $(InstallFiles)
818   ifneq "$(words $(InstallFiles))" "0"
819 <        $(InstallData) $(InstallFiles) $(MyInstallDir)
819 >        $(InstallCommand) $(InstallFiles) $(MyInstallDir)
820   endif      
821  
822 + _installlinks :  $(MyInstallDir)
823 + ifneq "$(words $(MyLinkTargets))" "0"
824 +        @cd $(MyInstallDir)
825 +        $(foreach thisLink,$(MyLinkTargets),$(call do_link,$(MyLinkSource),$(thisLink)))
826 + endif      
827 +
828   # make statistics
829   _statisticsall :
830          @$(Print) $(patsubst %,$(CurrentDir)/%,$(SourceFiles)) >> $(DEV_ROOT)/files.tmp
# Line 733 | Line 835 | $(Executable).pure :
835          $(Print) Done statistics.
836  
837   # make pure
838 < $(Executable).pure :
839 <        $(Purify) $(PurifyOptions) $(CppCompiler) $(LinkOptions) $(LibDirs) \
840 <        $(LibList) $(ObjectFiles) -o $@
838 > #$(Executable).pure :
839 > #       $(Purify) $(PurifyOptions) $(CppCompiler) $(LinkOptions) $(LibDirs) \
840 > #       $(LibList) $(ObjectFiles) -o $@
841 > #
842 > #pure : $(Executable).pure
843  
740 pure : $(Executable).pure
741
844   #make cvslog
845   cvslog:
846 <        $(DEV_ROOT)/scripts/cvs2cl.pl
846 >        $(DEV_ROOT)/scripts/cvs2cl
847  
848   # Execute
849   _runexe :

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines