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 2024 by gezelter, Tue Feb 15 05:05:33 2005 UTC vs.
Revision 2316 by gezelter, Tue Sep 20 22:13:44 2005 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines