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 2023 by gezelter, Mon Feb 14 23:26:25 2005 UTC vs.
Revision 2457 by tim, Fri Nov 18 20:17:14 2005 UTC

# Line 50 | Line 50 | PackageLibs = \
50          constraints \
51          minimizers \
52          selection \
53 +        restraints \
54 +        lattice \
55 +        openbabel
56  
57   #packages containing applications
58   Applications = \
59          applications/oopse \
60          applications/dump2Xyz \
58        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 115 | 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 207 | 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 218 | 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 256 | Line 335 | INSTALL                = @INSTALL@
335   CppCompiler            = @CXX@
336   Linker                 = @CXX@
337   MakeDepend             = makedepend
338 + LN_S                   = @LN_S@
339   INSTALL                = @INSTALL@
340   InstallProgram         = @INSTALL_PROGRAM@
341 + InstallScript          = @INSTALL_SCRIPT@
342   InstallData            = @INSTALL_DATA@
343   MkDir                  = @MKINSTALLDIRS@
344 < Delete                 = rm -fr
344 > Delete                 = rm -f
345   StaticArchiver         = @AR@
346   DynamicArchiver        = @CC@
347   FortranCompiler        = @FC@
# Line 279 | Line 360 | Ps                     = @PS@
360   Lex                    = @LEX@
361   Ranlib                 = @RANLIB@
362   Doxygen                = @DOXYGEN@
282 Ps                     = @PS@
283 PsType                 = @PSTYPE@
363  
364   MakeOptions            = -k
365   MakeDependOptions      =
# Line 290 | Line 369 | COptions               = $(FrcDeclare) @CFLAGS@ -DPS=$
369   JniOptions             =
370   RmiOptions             = -d $(TargetDir) -classpath $(ClassPath) \
371                           -sourcepath $(SourceDir)
372 < COptions               = $(FrcDeclare) @CFLAGS@ -DPS=$(Ps) -DPSTYPE=$(PsType)
372 > COptions               = $(FrcDeclare) @CFLAGS@
373   CParallelOptions       = $(FrcDeclare) $(ParallelDeclare) @CFLAGS@
374   CppOptions             = $(FrcDeclare) @CXXFLAGS@ @OOPSE_TEMPLATE_FLAGS@
375   CppParallelOptions     = $(FrcDeclare) $(ParallelDeclare) @CXXFLAGS@ @OOPSE_TEMPLATE_FLAGS@
# Line 341 | Line 420 | endif
420      InstallFiles             = $(Executable)
421    endif
422    InstallCommand           = $(InstallProgram)
423 +  ifneq "$(words $(LinkTargets))" "0"
424 +    MyLinkSource = $(patsubst %, $(MyInstallDir)/%,$(Main))
425 +    MyLinkTargets = $(patsubst %, $(MyInstallDir)/%,$(LinkTargets))
426 +  endif
427   endif
428  
429   ifneq "$(words $(ForcefieldFiles))" "0"
# Line 377 | Line 460 | $(PackageTargetDir)/%.o : %.c
460          $(MkDir) $@
461  
462   # .c -> .o
463 < $(PackageTargetDir)/%.o : %.c
463 > $(PackageTargetDir)/%.o : %.c $(MainMakefile)
464          $(Print) $@
465          $(CCompiler) $(COptions) -c $(IncludePath) $< -o $@
466  
467 < $(PackageParallelTargetDir)/%.o : %.c
467 > $(PackageParallelTargetDir)/%.o : %.c $(MainMakefile)
468          $(Print) $@
469          $(CCompiler) $(CParallelOptions) -c $(IncludePath) $< -o $@
470  
471   ifeq "$(UseMPI)" "yes"
472 < %.o : %.c
472 > %.o : %.c $(MainMakefile)
473          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
474          $(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@
475   else
476 < %.o : %.c
476 > %.o : %.c $(MainMakefile)
477          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
478   endif
479  
480   # .cpp -> .o
481 < $(PackageTargetDir)/%.o : %.cpp
481 > $(PackageTargetDir)/%.o : %.cpp $(MainMakefile)
482          $(CppCompiler) $(CppOptions) -c $(IncludePath) $< -o $@
483  
484 < $(PackageParallelTargetDir)/%.o : %.cpp
484 > $(PackageParallelTargetDir)/%.o : %.cpp $(MainMakefile)
485          $(CppCompiler) $(CppParallelOptions) -c $(IncludePath) $< -o $@
486  
487   ifeq "$(UseMPI)" "yes"
488 < %.o : %.cpp
488 > %.o : %.cpp $(MainMakefile)
489          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
490          $(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@
491   else
492 < %.o : %.cpp
492 > %.o : %.cpp $(MainMakefile)
493          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
494   endif
495  
496   # .f -> .o
497 < $(PackageTargetDir)/%.o : %.f
497 > $(PackageTargetDir)/%.o : %.f $(MainMakefile)
498          $(FortranCompiler) $(FortranOptions) -c $< -o $@
499  
500 < $(PackageParallelTargetDir)/%.o : %.f
500 > $(PackageParallelTargetDir)/%.o : %.f $(MainMakefile)
501          $(FortranCompiler) $(FortranParallelOptions) -c $< -o $@
502  
503   ifeq "$(UseMPI)" "yes"
504 < %.o : %.f
504 > %.o : %.f $(MainMakefile)
505          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
506          $(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@
507   else
508 < %.o : %.f
508 > %.o : %.f $(MainMakefile)
509          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
510   endif
511  
512   # .F90 -> .o
513 < $(PackageTargetDir)/%.o : %.F90
513 > $(PackageTargetDir)/%.o : %.F90 $(MainMakefile)
514          $(F90Compiler) $(F90Options) $(IncludePath) -c $< -o $@
515          if test -n "`ls *.$(ModSuffix)`"; then \
516            $(Move) `ls *.$(ModSuffix)` $(PackageTargetDir);\
517          fi
518  
519 < $(PackageParallelTargetDir)/%.o : %.F90
519 > $(PackageParallelTargetDir)/%.o : %.F90 $(MainMakefile)
520          $(F90Compiler) $(F90ParallelOptions) $(IncludePath) -c $< -o $@
521          if test -n "`ls *.$(ModSuffix)`"; then \
522            $(Move) "`ls *.$(ModSuffix)`" $(PackageParallelTargetDir);\
523          fi
524  
525   ifeq "$(UseMPI)" "yes"
526 < %.o : %.F90
526 > %.o : %.F90 $(MainMakefile)
527          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
528          if test -n "`ls *.$(ModSuffix)`"; then\
529            $(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\
# Line 452 | Line 535 | else
535          fi
536  
537   else
538 < %.o : %.F90
538 > %.o : %.F90 $(MainMakefile)
539          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
540          if test -n "`ls *.$(ModSuffix)`"; then\
541            $(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\
# Line 564 | Line 647 | do_create = $(call extract_objs,$(1))$(call create_arc
647   create_archive = $(shell  $(StaticArchiver) $(StaticArchiverOptions) $(2) $(call find_objs, $(1)))
648   remove_objs = $(shell $(Delete) $(call find_objs, $(1)))
649   do_create = $(call extract_objs,$(1))$(call create_archive,$(1),$(2))$(call remove_objs,$(1))  
650 + do_link = $(shell $(LN_S) $(1) $(2))
651  
652   $(CombinedStaticLib) : $(LibDir)/.stamp_UP
653          $(Print) create $@      
# Line 623 | Line 707 | endif
707          $(Executable)
708   endif
709  
710 + echo : $(PackageListLoop)
711 +        $(Print) Done echo.
712  
713 + _echoall :
714 +        $(Print) $(Modules)
715 +
716   # make clean
717   clean : $(PackageListLoop)
718          $(Print) Done clean.    
719  
720   _cleanall :
721 <        $(Delete) $(ObjectFiles) $(ParallelObjectFiles)
721 >        $(Delete) \
722 >                $(ObjectFiles) \
723 >                $(ModuleFiles) \
724 >                $(ParallelObjectFiles) \
725 >                $(ParallelModuleFiles) \
726 >                $(JarFile) \
727 >                $(SharedLibrary) \
728 >                $(StaticLibrary) \
729 >                $(ParallelSharedLibrary) \
730 >                $(ParallelStaticLibrary) \
731 >                $(CombinedStaticLib) \
732 >                $(CombinedParallelStaticLib)
733  
734   # make distclean
735   distclean : $(PackageListLoop)
736          $(Print) Done clean.    
737  
738 < _distcleanall :
739 <        $(Delete) $(ObjectFiles) \
640 <                  $(ParallelObjectFiles) \
641 <                        $(JarFile) \
642 <                  $(SharedLibrary) \
643 <                  $(StaticLibrary) \
644 <                  $(ParallelSharedLibrary) \
645 <                  $(ParallelStaticLibrary) \
646 <                  $(Executable) \
738 > _distcleanall : _cleanall
739 >        $(Delete) $(Executable) \
740                    $(ParallelExecutable) \
741                    $(DependencyFile)
742  
650
743   # make depend
744   depend : $(PackageListLoop)
745          $(Print) Done dependencies.
# Line 715 | Line 807 | _installall : _buildall _installdata
807   install : $(InstallListLoop)
808          $(Print) Done Install
809  
810 < _installall : _buildall _installdata
810 > _installall : _buildall _installdata _installlinks
811  
812   $(MyInstallDir) :
813          $(MkDir) $@
# Line 723 | Line 815 | ifneq "$(words $(InstallFiles))" "0"
815   _installdata :  $(MyInstallDir)
816          $(Print) $(InstallFiles)
817   ifneq "$(words $(InstallFiles))" "0"
818 <        $(InstallData) $(InstallFiles) $(MyInstallDir)
818 >        $(InstallCommand) $(InstallFiles) $(MyInstallDir)
819   endif      
820  
821 + _installlinks :  $(MyInstallDir)
822 + ifneq "$(words $(MyLinkTargets))" "0"
823 +        @cd $(MyInstallDir)
824 +        $(foreach thisLink,$(MyLinkTargets),$(call do_link,$(MyLinkSource),$(thisLink)))
825 + endif      
826 +
827   # make statistics
828   _statisticsall :
829          @$(Print) $(patsubst %,$(CurrentDir)/%,$(SourceFiles)) >> $(DEV_ROOT)/files.tmp
# Line 736 | Line 834 | $(Executable).pure :
834          $(Print) Done statistics.
835  
836   # make pure
837 < $(Executable).pure :
838 <        $(Purify) $(PurifyOptions) $(CppCompiler) $(LinkOptions) $(LibDirs) \
839 <        $(LibList) $(ObjectFiles) -o $@
837 > #$(Executable).pure :
838 > #       $(Purify) $(PurifyOptions) $(CppCompiler) $(LinkOptions) $(LibDirs) \
839 > #       $(LibList) $(ObjectFiles) -o $@
840 > #
841 > #pure : $(Executable).pure
842  
743 pure : $(Executable).pure
744
843   #make cvslog
844   cvslog:
845 <        $(DEV_ROOT)/scripts/cvs2cl.pl
845 >        $(DEV_ROOT)/scripts/cvs2cl
846  
847   # Execute
848   _runexe :

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines