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 1552 by gezelter, Mon Oct 11 15:43:16 2004 UTC vs.
Revision 2126 by gezelter, Mon Mar 21 19:22:55 2005 UTC

# Line 38 | Line 38 | PackageLibs = \
38   #packages containing libraries
39   PackageLibs = \
40          utils \
41 +        visitors \
42          math \
43          types \
44          primitives \
44        visitors \
45          UseTheForce/DarkSide \
46          UseTheForce \
47          brains \
48          io \
49 <        integrators \
50 <        minimizers \
49 >        integrators\
50          constraints \
51 <        profiling \
51 >        minimizers \
52 >        selection \
53          restraints \
54  
55   #packages containing applications
56   Applications = \
57          applications/oopse \
58          applications/dump2Xyz \
59 <        applications/simpleBuilder
59 >        applications/simpleBuilder\
60 >        applications/staticProps \
61 >        applications/dynamicProps \
62  
63   Samples = \
64          samples/argon \
# Line 73 | Line 75 | IncludeDirs = \
75          samples/zcons \
76  
77   IncludeDirs = \
76        @SPRNG_INC_DIR@ \
78          @MPI_INC_DIR@
79  
80   LibraryDirs = \
80        @SPRNG_LIB_DIR@ \
81          @MPI_LIB_DIR@
82  
83   Libraries = \
84        @SPRNG_LIB@ \
84          @MPI_LIB@ \
85          @MPI_F90_LIB@
86  
# Line 125 | Line 124 | Package          = $(subst $(shell cd $(SourceDir); pw
124   # /home/maul/gezelter/src/code/src/UseTheForce/Darkside --> UseTheForce/Darkside
125   #Package          = $(shell echo $(CurrentDir) | sed -e 's/^.*\/src\/\(.*\)/\1/g')
126   #use shell script to get the absolute path and then rip it off from $(CurrentDir)
127 < Package          = $(subst $(shell cd $(SourceDir); pwd)/,,$(CurrentDir))
127 > #Package          = $(subst $(shell cd $(SourceDir); pwd)/,,$(CurrentDir))
128 > # REMINDER: We are now using the Package line in each subdir makefile.
129 > # This avoids the strange path problem and the subshell
130  
131   PackageList              = $(Package)
132   PackageSourceDir         = $(SourceDir)/$(Package)
# Line 215 | Line 216 | ifneq  "$(words $(ObjectFiles) $(ParallelObjectFiles))
216   #if Main is defined, do not build library. It may not be true sometimes
217   ifneq  "$(words $(ObjectFiles) $(ParallelObjectFiles))" "0"
218    DependencyFile    = $(PackageSourceDir)/Makedepend
219 <  ifneq "$(Main)" ""
219 >  ifneq "$(words $(Main))" "0"
220      Executable             = $(BinDir)/$(Main)
221      ParallelExecutable     = $(BinDir)/$(Main)_MPI
222    else
# Line 247 | Line 248 | Move                   = mv
248   #
249   #---------------------------------------------------------------------------
250   Print                  = @echo
251 < Move                   = mv
251 > Move                   = mv -f
252   Copy                   = cp
253   CCompiler              = @CC@
254   CppCompiler            = @CXX@
# Line 255 | Line 256 | InstallData            = @INSTALL_DATA@
256   MakeDepend             = makedepend
257   INSTALL                = @INSTALL@
258   InstallProgram         = @INSTALL_PROGRAM@
259 + InstallScript          = @INSTALL_SCRIPT@
260   InstallData            = @INSTALL_DATA@
261 < MkDir                = @MKINSTALLDIRS@
261 > MkDir                  = @MKINSTALLDIRS@
262   Delete                 = rm -fr
263   StaticArchiver         = @AR@
264   DynamicArchiver        = @CC@
# Line 285 | Line 287 | COptions               = $(FrcDeclare)
287   JniOptions             =
288   RmiOptions             = -d $(TargetDir) -classpath $(ClassPath) \
289                           -sourcepath $(SourceDir)
290 < COptions               = $(FrcDeclare)
291 < CParallelOptions       = $(FrcDeclare) $(ParallelDeclare)
292 < CppOptions             = $(FrcDeclare)
293 < CppParallelOptions     = $(FrcDeclare) $(ParallelDeclare)
290 > COptions               = $(FrcDeclare) @CFLAGS@
291 > CParallelOptions       = $(FrcDeclare) $(ParallelDeclare) @CFLAGS@
292 > CppOptions             = $(FrcDeclare) @CXXFLAGS@ @OOPSE_TEMPLATE_FLAGS@
293 > CppParallelOptions     = $(FrcDeclare) $(ParallelDeclare) @CXXFLAGS@ @OOPSE_TEMPLATE_FLAGS@
294   FortranOptions         =
295 < F90Options             =  @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) -module $(TargetDir)
296 < F90ParallelOptions     =  @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) -module $(ParallelTargetDir)  @PREPDEFFLAG@$(ParallelDeclare)
295 > F90Options             =  @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) @MODDIRFLAG@$(TargetDir)
296 > F90ParallelOptions     =  @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) @MODDIRFLAG@$(ParallelTargetDir)  @PREPDEFFLAG@$(ParallelDeclare)
297   JavaCompilerOptions    = -d $(TargetDir) -classpath $(ClassPath) \
298                           -sourcepath $(SourceDir) -deprecation
299   JavaRunOptions         = -classpath $(ClassPath)
# Line 366 | Line 368 | $(PackageTargetDir) :
368  
369   # Create target directory
370   $(PackageTargetDir) :
371 <        $(MakeDir) $@
371 >        $(MkDir) $@
372  
373 + $(BinDir) :
374 +        $(MkDir) $@
375 +
376   # .c -> .o
377   $(PackageTargetDir)/%.o : %.c
378          $(Print) $@
# Line 421 | Line 426 | $(PackageTargetDir)/%.o : %.F90
426   # .F90 -> .o
427   $(PackageTargetDir)/%.o : %.F90
428          $(F90Compiler) $(F90Options) $(IncludePath) -c $< -o $@
429 +        if test -n "`ls *.$(ModSuffix)`"; then \
430 +          $(Move) `ls *.$(ModSuffix)` $(PackageTargetDir);\
431 +        fi
432  
433   $(PackageParallelTargetDir)/%.o : %.F90
434          $(F90Compiler) $(F90ParallelOptions) $(IncludePath) -c $< -o $@
435 +        if test -n "`ls *.$(ModSuffix)`"; then \
436 +          $(Move) "`ls *.$(ModSuffix)`" $(PackageParallelTargetDir);\
437 +        fi
438  
439   ifeq "$(UseMPI)" "yes"
440   %.o : %.F90
441          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
442 +        if test -n "`ls *.$(ModSuffix)`"; then\
443 +          $(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\
444 +        fi
445 +
446          $(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@
447 +        if test -n "`ls *.$(ModSuffix)`"; then\
448 +          $(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\
449 +        fi
450 +
451   else
452   %.o : %.F90
453          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
454 +        if test -n "`ls *.$(ModSuffix)`"; then\
455 +          $(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\
456 +        fi
457   endif
458  
459  
# Line 551 | Line 573 | $(Executable) : $(CombinedStaticLib) $(ObjectFiles)
573          $(Ranlib) $(CombinedParallelStaticLib)
574  
575   # Executable
576 < $(Executable) : $(CombinedStaticLib) $(ObjectFiles)
577 <        $(Linker) $(ObjectFiles) $(LinkOptions) $(LibDirs) $(CombinedStaticLib) $(Libraries) -o $@
576 > $(Executable) : $(CombinedStaticLib) $(ObjectFiles) $(BinDir)
577 >        $(Linker) $(ObjectFiles) $(CombinedStaticLib) $(LinkOptions) $(LibDirs) $(Libraries) -o $@
578  
579 < $(ParallelExecutable) : $(CombinedParallelStaticLib) $(ParallelObjectFiles)
580 <        $(Linker) $(ParallelObjectFiles) $(ParallelLinkOptions) $(LibDirs) $(CombinedParallelStaticLib) $(Libraries) -o $@
579 > $(ParallelExecutable) : $(CombinedParallelStaticLib) $(ParallelObjectFiles) $(BinDir)
580 >        $(Linker) $(ParallelObjectFiles) $(CombinedParallelStaticLib) $(ParallelLinkOptions) $(LibDirs) $(Libraries) -o $@
581  
582   # Anything else is just copied from source to target
583   $(PackageTargetDir)/% : $(PackageSourceDir)/%
# Line 604 | Line 626 | _cleanall :
626          $(Print) Done clean.    
627  
628   _cleanall :
629 <        $(Delete) $(ObjectFiles) $(ParallelObjectFiles)
629 >        $(Delete) \
630 >                $(ObjectFiles) \
631 >                $(ParallelObjectFiles) \
632 >                $(JarFile) \
633 >                $(SharedLibrary) \
634 >                $(StaticLibrary) \
635 >                $(ParallelSharedLibrary) \
636 >                $(ParallelStaticLibrary) \
637 >                $(CombinedStaticLib) \
638 >                $(CombinedParallelStaticLib)
639  
640   # make distclean
641   distclean : $(PackageListLoop)
642          $(Print) Done clean.    
643  
644 < _distcleanall :
645 <        $(Delete) $(ObjectFiles) \
615 <                  $(ParallelObjectFiles) \
616 <                        $(JarFile) \
617 <                  $(SharedLibrary) \
618 <                  $(StaticLibrary) \
619 <                  $(ParallelSharedLibrary) \
620 <                  $(ParallelStaticLibrary) \
621 <                  $(Executable) \
644 > _distcleanall : _cleanall
645 >        $(Delete) $(Executable) \
646                    $(ParallelExecutable) \
647                    $(DependencyFile)
648  
625
649   # make depend
650   depend : $(PackageListLoop)
651          $(Print) Done dependencies.
# Line 634 | Line 657 | ifneq "$(words $(CppFiles))" "0"
657          @cd $(PackageSourceDir)
658  
659   ifneq "$(words $(CppFiles))" "0"
660 <        $(CppCompiler) $(CppOptions) $(IncludePath) -MM $(CppFiles) > Make.cpptemp
661 <        @cat Make.cpptemp | sed 's/^[a-zA-Z0-9]/$$\(TargetDir\)\/&/g' >> $(DependencyFile)
660 >        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(TargetDir)/' -MM $(CppFiles)>> Make.cpptemp
661 >        @cat Make.cpptemp  >> $(DependencyFile)
662          $(Delete) Make.cpptemp
663 <        $(CppCompiler) $(CppParallelOptions) $(IncludePath) -MM $(CppFiles) > Make.cpptemp
664 <        @cat Make.cpptemp | sed 's/^[a-zA-Z0-9]/$$\(ParallelTargetDir\)\/&/g' >> $(DependencyFile)
663 >
664 >  ifeq "$(UseMPI)" "yes"
665 >        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) -MM $(CppFiles)>> Make.cpptemp
666 >        @cat Make.cpptemp  >> $(DependencyFile)
667          @$(Delete) Make.cpptemp
668 +  endif
669 +
670   endif
671  
672   ifneq "$(words $(CFiles))" "0"
673 <        $(CCompiler) $(COptions) $(IncludePath) -MM $(CFiles) $(DerivedCFiles) > Make.ctemp
674 <        @cat Make.ctemp | sed 's/^[a-zA-Z0-9]/$$\(TargetDir\)\/&/g' >> $(DependencyFile)
673 >        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(TargetDir)/'  -MM $(CFiles) $(DerivedCFiles)  >> Make.ctemp
674 >        @cat Make.ctemp  >> $(DependencyFile)
675          $(Delete) Make.ctemp
676 <        $(CCompiler) $(CParallelOptions) $(IncludePath) -MM $(CFiles) $(DerivedCFiles) > Make.ctemp
677 <        @cat Make.ctemp | sed 's/^[a-zA-Z0-9]/$$\(ParallelTargetDir\)\/&/g' >> $(DependencyFile)
676 >
677 >  ifeq "$(UseMPI)" "yes"
678 >        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) -MM $(CFiles) $(DerivedCFiles)  >> Make.ctemp
679 >        @cat Make.ctemp  >> $(DependencyFile)
680          @$(Delete) Make.ctemp
681 +  endif
682 +
683   endif
684  
685   ifneq "$(words $(F90Files))" "0"
686 <        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(TargetDir)/' $(F90Declare) -mc $(ModuleCase) -ms $(ModSuffix) $(F90Files) > Make.ftemp
656 <        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) $(F90Declare) -mc $(ModuleCase) -ms $(ModSuffix)  $(F90Files) >> Make.ftemp
686 >        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(TargetDir)/' $(F90Declare) -MM -mc $(ModuleCase) -ms $(ModSuffix) $(F90Files) > Make.ftemp
687          @cat Make.ftemp >> $(DependencyFile)
688          @$(Delete) Make.ftemp
689 +
690 +  ifeq "$(UseMPI)" "yes"
691 +        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) $(F90Declare) -MM -mc $(ModuleCase) -ms $(ModSuffix)  $(F90Files) >> Make.ftemp
692 +        @cat Make.ftemp >> $(DependencyFile)
693 +        @$(Delete) Make.ftemp
694 +  endif
695 +
696   endif
697  
698   # make lib
# Line 684 | Line 721 | ifneq "$(words $(InstallFiles))" "0"
721   _installdata :  $(MyInstallDir)
722          $(Print) $(InstallFiles)
723   ifneq "$(words $(InstallFiles))" "0"
724 <        $(InstallData) $(InstallFiles) $(MyInstallDir)
724 >        $(InstallCommand) $(InstallFiles) $(MyInstallDir)
725   endif      
726 <        
726 >
727   # make statistics
728   _statisticsall :
729          @$(Print) $(patsubst %,$(CurrentDir)/%,$(SourceFiles)) >> $(DEV_ROOT)/files.tmp

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines