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

Comparing trunk/OOPSE-4/make/Makefile.in (file contents):
Revision 1940 by gezelter, Thu Jan 13 21:56:58 2005 UTC vs.
Revision 2217 by gezelter, Fri Apr 29 19:16:27 2005 UTC

# Line 49 | Line 49 | PackageLibs = \
49          integrators\
50          constraints \
51          minimizers \
52 +        selection \
53 +        restraints \
54 +        lattice \
55  
56   #packages containing applications
57   Applications = \
58          applications/oopse \
59          applications/dump2Xyz \
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 112 | Line 124 | BinDir            = $(DEV_ROOT)/bin
124   ParallelTargetDir = $(DEV_ROOT)/MPIobj
125   LibDir            = $(DEV_ROOT)/lib
126   MakeDir           = $(DEV_ROOT)/make
127 + MainMakefile      = $(MakeDir)/Makefile
128   BinDir            = $(DEV_ROOT)/bin
129   DocsDir           = $(DEV_ROOT)/docs
130   CurrentDir        = $(CURDIR)
# Line 123 | Line 136 | Package          = $(subst $(shell cd $(SourceDir); pw
136   # /home/maul/gezelter/src/code/src/UseTheForce/Darkside --> UseTheForce/Darkside
137   #Package          = $(shell echo $(CurrentDir) | sed -e 's/^.*\/src\/\(.*\)/\1/g')
138   #use shell script to get the absolute path and then rip it off from $(CurrentDir)
139 < Package          = $(subst $(shell cd $(SourceDir); pwd)/,,$(CurrentDir))
139 > #Package          = $(subst $(shell cd $(SourceDir); pwd)/,,$(CurrentDir))
140 > # REMINDER: We are now using the Package line in each subdir makefile.
141 > # This avoids the strange path problem and the subshell
142  
143   PackageList              = $(Package)
144   PackageSourceDir         = $(SourceDir)/$(Package)
# Line 201 | Line 216 | OtherTargetFiles       = $(OtherSourceFiles:%=$(Packag
216                           $(LexFiles:%.l=     %.c)
217  
218   OtherTargetFiles       = $(OtherSourceFiles:%=$(PackageTargetDir)/%)
219 +
220 + ###########################################################################
221 + #
222 + # Figure out the names of the module files based on some work done by
223 + # configure.  The tr function below is from John Graham-Cumming
224 + # (http://www.jgc.org).
225 + #
226 + # The tr function.   Has three arguments:
227 + #
228 + # $1   The list of characters to translate from
229 + # $2   The list of characters to translate to
230 + # $3   The text to translate
231 + #
232 + # For example, $(call tr,A B C,1 2 3,CAPITAL) becomes 21PIT1L.
233 +
234 + tr = $(eval __t := $3)                                                    \
235 +     $(foreach c,                                                         \
236 +         $(join $(addsuffix :,$1),$2),                                    \
237 +         $(eval __t :=                                                    \
238 +             $(subst $(word 1,$(subst :, ,$c)),$(word 2,$(subst :, ,$c)), \
239 +                 $(__t))))$(__t)
240 +
241 + # Common character classes for use with the tr function.  Each of
242 + # these is actually a variable declaration and must be wrapped with
243 + # $() or ${} to be used.
244 +
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 + [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 #
247 + [0-9] := 0 1 2 3 4 5 6 7 8 9 #
248 + [A-F] := A B C D E F #
249 +
250 + # Figure out whether we have $(eval) or not (GNU Make 3.80 and above)
251 + # if we do not then we need to use the shell version of tr, and not the
252 + # faster tr function above:
253 +
254 + __have_eval := $(false)
255 + __ignore := $(eval __have_eval := $(true))
256 +
257 + ifndef __have_eval
258 +  uc = $(shell echo $1 | tr "a-z" "A-Z")
259 +  lc = $(shell echo $1 | tr "A-Z" "a-z")
260 + else
261 +  uc = $(call tr,$([a-z]),$([A-Z]),$1)
262 +  lc = $(call tr,$([A-Z]),$([a-z]),$1)
263 + endif
264 +
265 + # OK, now we can actually use these functions to figure out the names
266 + # of the module files:
267 +
268 + ifneq "$(words $(Modules))" "0"
269 + ifeq "$(ModuleCase)" "UPPER"
270 +  MODULES = $(call uc,$(Modules))
271 + else
272 +  ifeq "$(ModuleCase)" "lower"
273 +    MODULES = $(call lc,$(Modules))
274 +  else
275 +    MODULES = $(Modules)
276 +  endif
277 + endif
278 +  ModuleFiles = $(MODULES:%= $(PackageTargetDir)/%.$(ModSuffix))
279 +  ParallelModuleFiles = $(MODULES:%= $(PackageParallelTargetDir)/%.$(ModSuffix))
280 + endif
281 + #
282 + ###########################################################################
283  
284   ThirdPartyJarsTmp = $(patsubst %,$(LibDir)/%,$(JavaLibraries))
285   ThirdPartyJars    = $(subst $(Space),$(X),$(ThirdPartyJarsTmp))
# Line 213 | Line 292 | ifneq  "$(words $(ObjectFiles) $(ParallelObjectFiles))
292   #if Main is defined, do not build library. It may not be true sometimes
293   ifneq  "$(words $(ObjectFiles) $(ParallelObjectFiles))" "0"
294    DependencyFile    = $(PackageSourceDir)/Makedepend
295 <  ifneq "$(Main)" ""
295 >  ifneq "$(words $(Main))" "0"
296      Executable             = $(BinDir)/$(Main)
297 <    ParallelExecutable     = $(BinDir)/$(Main)_MPI
297 >    ifeq "$(BuiltParallelExe)" "1"
298 >      ParallelExecutable     = $(BinDir)/$(Main)_MPI
299 >    endif
300    else
301      SharedLibrary          = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package)))_UP.so
302      StaticLibrary          = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package)))_UP.a
# Line 253 | Line 334 | InstallData            = @INSTALL_DATA@
334   MakeDepend             = makedepend
335   INSTALL                = @INSTALL@
336   InstallProgram         = @INSTALL_PROGRAM@
337 + InstallScript          = @INSTALL_SCRIPT@
338   InstallData            = @INSTALL_DATA@
339   MkDir                  = @MKINSTALLDIRS@
340 < Delete                 = rm -fr
340 > Delete                 = rm -f
341   StaticArchiver         = @AR@
342   DynamicArchiver        = @CC@
343   FortranCompiler        = @FC@
# Line 370 | Line 452 | $(PackageTargetDir)/%.o : %.c
452          $(MkDir) $@
453  
454   # .c -> .o
455 < $(PackageTargetDir)/%.o : %.c
455 > $(PackageTargetDir)/%.o : %.c $(MainMakefile)
456          $(Print) $@
457          $(CCompiler) $(COptions) -c $(IncludePath) $< -o $@
458  
459 < $(PackageParallelTargetDir)/%.o : %.c
459 > $(PackageParallelTargetDir)/%.o : %.c $(MainMakefile)
460          $(Print) $@
461          $(CCompiler) $(CParallelOptions) -c $(IncludePath) $< -o $@
462  
463   ifeq "$(UseMPI)" "yes"
464 < %.o : %.c
464 > %.o : %.c $(MainMakefile)
465          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
466          $(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@
467   else
468 < %.o : %.c
468 > %.o : %.c $(MainMakefile)
469          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
470   endif
471  
472   # .cpp -> .o
473 < $(PackageTargetDir)/%.o : %.cpp
473 > $(PackageTargetDir)/%.o : %.cpp $(MainMakefile)
474          $(CppCompiler) $(CppOptions) -c $(IncludePath) $< -o $@
475  
476 < $(PackageParallelTargetDir)/%.o : %.cpp
476 > $(PackageParallelTargetDir)/%.o : %.cpp $(MainMakefile)
477          $(CppCompiler) $(CppParallelOptions) -c $(IncludePath) $< -o $@
478  
479   ifeq "$(UseMPI)" "yes"
480 < %.o : %.cpp
480 > %.o : %.cpp $(MainMakefile)
481          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
482          $(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@
483   else
484 < %.o : %.cpp
484 > %.o : %.cpp $(MainMakefile)
485          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
486   endif
487  
488   # .f -> .o
489 < $(PackageTargetDir)/%.o : %.f
489 > $(PackageTargetDir)/%.o : %.f $(MainMakefile)
490          $(FortranCompiler) $(FortranOptions) -c $< -o $@
491  
492 < $(PackageParallelTargetDir)/%.o : %.f
492 > $(PackageParallelTargetDir)/%.o : %.f $(MainMakefile)
493          $(FortranCompiler) $(FortranParallelOptions) -c $< -o $@
494  
495   ifeq "$(UseMPI)" "yes"
496 < %.o : %.f
496 > %.o : %.f $(MainMakefile)
497          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
498          $(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@
499   else
500 < %.o : %.f
500 > %.o : %.f $(MainMakefile)
501          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
502   endif
503  
504   # .F90 -> .o
505 < $(PackageTargetDir)/%.o : %.F90
505 > $(PackageTargetDir)/%.o : %.F90 $(MainMakefile)
506          $(F90Compiler) $(F90Options) $(IncludePath) -c $< -o $@
507          if test -n "`ls *.$(ModSuffix)`"; then \
508            $(Move) `ls *.$(ModSuffix)` $(PackageTargetDir);\
509          fi
510  
511 < $(PackageParallelTargetDir)/%.o : %.F90
511 > $(PackageParallelTargetDir)/%.o : %.F90 $(MainMakefile)
512          $(F90Compiler) $(F90ParallelOptions) $(IncludePath) -c $< -o $@
513          if test -n "`ls *.$(ModSuffix)`"; then \
514            $(Move) "`ls *.$(ModSuffix)`" $(PackageParallelTargetDir);\
515          fi
516  
517   ifeq "$(UseMPI)" "yes"
518 < %.o : %.F90
518 > %.o : %.F90 $(MainMakefile)
519          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
520          if test -n "`ls *.$(ModSuffix)`"; then\
521            $(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\
# Line 445 | Line 527 | else
527          fi
528  
529   else
530 < %.o : %.F90
530 > %.o : %.F90 $(MainMakefile)
531          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
532          if test -n "`ls *.$(ModSuffix)`"; then\
533            $(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\
# Line 616 | Line 698 | endif
698          $(Executable)
699   endif
700  
701 + echo : $(PackageListLoop)
702 +        $(Print) Done echo.
703  
704 + _echoall :
705 +        $(Print) $(Modules)
706 +
707   # make clean
708   clean : $(PackageListLoop)
709          $(Print) Done clean.    
710  
711   _cleanall :
712 <        $(Delete) $(ObjectFiles) $(ParallelObjectFiles)
712 >        $(Delete) \
713 >                $(ObjectFiles) \
714 >                $(ModuleFiles) \
715 >                $(ParallelObjectFiles) \
716 >                $(ParallelModuleFiles) \
717 >                $(JarFile) \
718 >                $(SharedLibrary) \
719 >                $(StaticLibrary) \
720 >                $(ParallelSharedLibrary) \
721 >                $(ParallelStaticLibrary) \
722 >                $(CombinedStaticLib) \
723 >                $(CombinedParallelStaticLib)
724  
725   # make distclean
726   distclean : $(PackageListLoop)
727          $(Print) Done clean.    
728  
729 < _distcleanall :
730 <        $(Delete) $(ObjectFiles) \
633 <                  $(ParallelObjectFiles) \
634 <                        $(JarFile) \
635 <                  $(SharedLibrary) \
636 <                  $(StaticLibrary) \
637 <                  $(ParallelSharedLibrary) \
638 <                  $(ParallelStaticLibrary) \
639 <                  $(Executable) \
729 > _distcleanall : _cleanall
730 >        $(Delete) $(Executable) \
731                    $(ParallelExecutable) \
732                    $(DependencyFile)
733  
643
734   # make depend
735   depend : $(PackageListLoop)
736          $(Print) Done dependencies.
# Line 716 | Line 806 | ifneq "$(words $(InstallFiles))" "0"
806   _installdata :  $(MyInstallDir)
807          $(Print) $(InstallFiles)
808   ifneq "$(words $(InstallFiles))" "0"
809 <        $(InstallData) $(InstallFiles) $(MyInstallDir)
809 >        $(InstallCommand) $(InstallFiles) $(MyInstallDir)
810   endif      
811  
812   # make statistics
# Line 737 | Line 827 | cvslog:
827  
828   #make cvslog
829   cvslog:
830 <        $(DEV_ROOT)/scripts/cvs2cl.pl
830 >        $(DEV_ROOT)/scripts/cvs2cl
831  
832   # Execute
833   _runexe :

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines