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 1544 by tim, Fri Oct 8 22:10:22 2004 UTC vs.
Revision 1951 by gezelter, Fri Jan 14 21:13:24 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 \
53 <        restraints \
51 >        minimizers \
52  
53   #packages containing applications
54   Applications = \
55          applications/oopse \
56          applications/dump2Xyz \
57 <        applications/simpleBuilder
57 >        applications/simpleBuilder\
58  
59   Samples = \
60          samples/argon \
# Line 86 | Line 84 | ForceParamDir   = @OOPSE_HOME@/share/forceFields/
84          @MPI_F90_LIB@
85  
86   OopseHome       = @OOPSE_HOME@
87 < ForceParamDir   = @OOPSE_HOME@/share/forceFields/
88 < SampleSimDir    = @OOPSE_HOME@/share/samples/
89 < BinDir          = @OOPSE_HOME@/bin
90 < DocDir          = @OOPSE_HOME@/doc
87 > ForceParamDir   = $(OopseHome)/share/forceFields
88 > SampleSimDir    = $(OopseHome)/share/samples
89 > InstallBinDir   = $(OopseHome)/bin
90 > DocDir          = $(OopseHome)/doc
91   FrcDeclare      = -DFRC_PATH="$(ForceParamDir)"
92   F90Declare      = -D__FORTRAN90
93   ParallelDeclare = -DIS_MPI
# Line 125 | Line 123 | Package          = $(subst $(shell cd $(SourceDir); pw
123   # /home/maul/gezelter/src/code/src/UseTheForce/Darkside --> UseTheForce/Darkside
124   #Package          = $(shell echo $(CurrentDir) | sed -e 's/^.*\/src\/\(.*\)/\1/g')
125   #use shell script to get the absolute path and then rip it off from $(CurrentDir)
126 < Package          = $(subst $(shell cd $(SourceDir); pwd)/,,$(CurrentDir))
126 > #Package          = $(subst $(shell cd $(SourceDir); pwd)/,,$(CurrentDir))
127 > # REMINDER: We are now using the Package line in each subdir makefile.
128 > # This avoids the strange path problem and the subshell
129  
130   PackageList              = $(Package)
131   PackageSourceDir         = $(SourceDir)/$(Package)
# Line 247 | Line 247 | Move                   = mv
247   #
248   #---------------------------------------------------------------------------
249   Print                  = @echo
250 < Move                   = mv
250 > Move                   = mv -f
251   Copy                   = cp
252   CCompiler              = @CC@
253   CppCompiler            = @CXX@
254   Linker                 = @CXX@
255   MakeDepend             = makedepend
256 < Install                = @INSTALL@
256 > INSTALL                = @INSTALL@
257   InstallProgram         = @INSTALL_PROGRAM@
258   InstallData            = @INSTALL_DATA@
259 < MkDir                = @MKINSTALLDIRS@
259 > MkDir                  = @MKINSTALLDIRS@
260   Delete                 = rm -fr
261   StaticArchiver         = @AR@
262   DynamicArchiver        = @CC@
# Line 285 | Line 285 | COptions               = $(FrcDeclare)
285   JniOptions             =
286   RmiOptions             = -d $(TargetDir) -classpath $(ClassPath) \
287                           -sourcepath $(SourceDir)
288 < COptions               = $(FrcDeclare)
289 < CParallelOptions       = $(FrcDeclare) $(ParallelDeclare)
290 < CppOptions             = $(FrcDeclare)
291 < CppParallelOptions     = $(FrcDeclare) $(ParallelDeclare)
288 > COptions               = $(FrcDeclare) @CFLAGS@
289 > CParallelOptions       = $(FrcDeclare) $(ParallelDeclare) @CFLAGS@
290 > CppOptions             = $(FrcDeclare) @CXXFLAGS@ @OOPSE_TEMPLATE_FLAGS@
291 > CppParallelOptions     = $(FrcDeclare) $(ParallelDeclare) @CXXFLAGS@ @OOPSE_TEMPLATE_FLAGS@
292   FortranOptions         =
293 < F90Options             =  @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) -module $(TargetDir)
294 < F90ParallelOptions     =  @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) -module $(ParallelTargetDir)  @PREPDEFFLAG@$(ParallelDeclare)
293 > F90Options             =  @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) @MODDIRFLAG@$(TargetDir)
294 > F90ParallelOptions     =  @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) @MODDIRFLAG@$(ParallelTargetDir)  @PREPDEFFLAG@$(ParallelDeclare)
295   JavaCompilerOptions    = -d $(TargetDir) -classpath $(ClassPath) \
296                           -sourcepath $(SourceDir) -deprecation
297   JavaRunOptions         = -classpath $(ClassPath)
# Line 322 | Line 322 | MySample                 = $(subst $(shell cd $(DEV_RO
322   #---------------------------------------------------------------------------
323  
324   ifneq "$(words $(SampleFiles))" "0"
325 < MySample                 = $(subst $(shell cd $(DEV_ROOT)/samples; pwd)/,,$(CurrentDir))
326 < MyInstallDir             = $(SampleSimDir)/$(MySample)
327 < InstallFiles             = $(SampleFiles)
328 < InstallCommand           = $(InstallData)
325 >  MySample                 = $(subst $(shell cd $(DEV_ROOT)/samples; pwd)/,,$(CurrentDir))
326 >  MyInstallDir             = $(SampleSimDir)/$(MySample)
327 >  InstallFiles             = $(SampleFiles)
328 >  InstallCommand           = $(InstallData)
329   endif
330  
331   ifneq "$(words $(Main))" "0"
332 < MyInstallDir             = $(BinDir)/
333 < InstallFiles             = $(Executable) $(ParallelExecutable)
334 < InstallCommand           = $(InstallProgram)
332 >  MyInstallDir             = $(InstallBinDir)
333 >  ifeq "$(UseMPI)" "yes"
334 >    InstallFiles             = $(Executable) $(ParallelExecutable)
335 >  else
336 >    InstallFiles             = $(Executable)
337 >  endif
338 >  InstallCommand           = $(InstallProgram)
339   endif
340  
341 < ifneq "$(words $(ForcefiledFiles))" "0"
342 < MyInstallDir             = $(ForceParamDir)
343 < InstallFiles             = $(ForcefiledFiles)/
344 < InstallCommand           = $(InstallData)
341 > ifneq "$(words $(ForcefieldFiles))" "0"
342 >  MyInstallDir             = $(ForceParamDir)
343 >  InstallFiles             = $(ForcefieldFiles)
344 >  InstallCommand           = $(InstallData)
345   endif
346  
347   ifneq "$(words $(InstallFiles))" "0"
348    InstallList            =
349   else
350 <  InstallList            = $(patsubst %,$(DEV_ROOT)/%,$(Samples)) $(patsubst %, $(DEV_ROOT)/%,$(Forcefield)) $(patsubst %, $(SourceDir)/%,$(Applications))
350 >  InstallList            = $(patsubst %,$(DEV_ROOT)/%,$(Samples)) $(DEV_ROOT)/forceFields $(patsubst %, $(SourceDir)/%,$(Applications))
351   endif
352  
353   InstallListLoop          = $(patsubst %,$(SourceDir)/%/.install,$(PackageList))  $(patsubst %,%/.install,$(InstallList))
# Line 362 | Line 366 | $(PackageTargetDir) :
366  
367   # Create target directory
368   $(PackageTargetDir) :
369 <        $(MakeDir) $@
369 >        $(MkDir) $@
370 >
371 > $(BinDir) :
372 >        $(MkDir) $@
373  
374   # .c -> .o
375   $(PackageTargetDir)/%.o : %.c
# Line 417 | Line 424 | $(PackageTargetDir)/%.o : %.F90
424   # .F90 -> .o
425   $(PackageTargetDir)/%.o : %.F90
426          $(F90Compiler) $(F90Options) $(IncludePath) -c $< -o $@
427 +        if test -n "`ls *.$(ModSuffix)`"; then \
428 +          $(Move) `ls *.$(ModSuffix)` $(PackageTargetDir);\
429 +        fi
430  
431   $(PackageParallelTargetDir)/%.o : %.F90
432          $(F90Compiler) $(F90ParallelOptions) $(IncludePath) -c $< -o $@
433 +        if test -n "`ls *.$(ModSuffix)`"; then \
434 +          $(Move) "`ls *.$(ModSuffix)`" $(PackageParallelTargetDir);\
435 +        fi
436  
437   ifeq "$(UseMPI)" "yes"
438   %.o : %.F90
439          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
440 +        if test -n "`ls *.$(ModSuffix)`"; then\
441 +          $(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\
442 +        fi
443 +
444          $(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@
445 +        if test -n "`ls *.$(ModSuffix)`"; then\
446 +          $(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\
447 +        fi
448 +
449   else
450   %.o : %.F90
451          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
452 +        if test -n "`ls *.$(ModSuffix)`"; then\
453 +          $(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\
454 +        fi
455   endif
456  
457  
# Line 547 | Line 571 | $(Executable) : $(CombinedStaticLib) $(ObjectFiles)
571          $(Ranlib) $(CombinedParallelStaticLib)
572  
573   # Executable
574 < $(Executable) : $(CombinedStaticLib) $(ObjectFiles)
575 <        $(Linker) $(ObjectFiles) $(LinkOptions) $(LibDirs) $(CombinedStaticLib) $(Libraries) -o $@
574 > $(Executable) : $(CombinedStaticLib) $(ObjectFiles) $(BinDir)
575 >        $(Linker) $(ObjectFiles) $(CombinedStaticLib) $(LinkOptions) $(LibDirs) $(Libraries) -o $@
576  
577 < $(ParallelExecutable) : $(CombinedParallelStaticLib) $(ParallelObjectFiles)
578 <        $(Linker) $(ParallelObjectFiles) $(ParallelLinkOptions) $(LibDirs) $(CombinedParallelStaticLib) $(Libraries) -o $@
577 > $(ParallelExecutable) : $(CombinedParallelStaticLib) $(ParallelObjectFiles) $(BinDir)
578 >        $(Linker) $(ParallelObjectFiles) $(CombinedParallelStaticLib) $(ParallelLinkOptions) $(LibDirs) $(Libraries) -o $@
579  
580   # Anything else is just copied from source to target
581   $(PackageTargetDir)/% : $(PackageSourceDir)/%
# Line 630 | Line 654 | ifneq "$(words $(CppFiles))" "0"
654          @cd $(PackageSourceDir)
655  
656   ifneq "$(words $(CppFiles))" "0"
657 <        $(CppCompiler) $(CppOptions) $(IncludePath) -MM $(CppFiles) > Make.cpptemp
658 <        @cat Make.cpptemp | sed 's/^[a-zA-Z0-9]/$$\(TargetDir\)\/&/g' >> $(DependencyFile)
657 >        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(TargetDir)/' -MM $(CppFiles)>> Make.cpptemp
658 >        @cat Make.cpptemp  >> $(DependencyFile)
659          $(Delete) Make.cpptemp
660 <        $(CppCompiler) $(CppParallelOptions) $(IncludePath) -MM $(CppFiles) > Make.cpptemp
661 <        @cat Make.cpptemp | sed 's/^[a-zA-Z0-9]/$$\(ParallelTargetDir\)\/&/g' >> $(DependencyFile)
660 >
661 >  ifeq "$(UseMPI)" "yes"
662 >        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) -MM $(CppFiles)>> Make.cpptemp
663 >        @cat Make.cpptemp  >> $(DependencyFile)
664          @$(Delete) Make.cpptemp
665 +  endif
666 +
667   endif
668  
669   ifneq "$(words $(CFiles))" "0"
670 <        $(CCompiler) $(COptions) $(IncludePath) -MM $(CFiles) $(DerivedCFiles) > Make.ctemp
671 <        @cat Make.ctemp | sed 's/^[a-zA-Z0-9]/$$\(TargetDir\)\/&/g' >> $(DependencyFile)
670 >        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(TargetDir)/'  -MM $(CFiles) $(DerivedCFiles)  >> Make.ctemp
671 >        @cat Make.ctemp  >> $(DependencyFile)
672          $(Delete) Make.ctemp
673 <        $(CCompiler) $(CParallelOptions) $(IncludePath) -MM $(CFiles) $(DerivedCFiles) > Make.ctemp
674 <        @cat Make.ctemp | sed 's/^[a-zA-Z0-9]/$$\(ParallelTargetDir\)\/&/g' >> $(DependencyFile)
673 >
674 >  ifeq "$(UseMPI)" "yes"
675 >        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) -MM $(CFiles) $(DerivedCFiles)  >> Make.ctemp
676 >        @cat Make.ctemp  >> $(DependencyFile)
677          @$(Delete) Make.ctemp
678 +  endif
679 +
680   endif
681  
682   ifneq "$(words $(F90Files))" "0"
683 <        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(TargetDir)/' $(F90Declare) -mc $(ModuleCase) -ms $(ModSuffix) $(F90Files) > Make.ftemp
652 <        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) $(F90Declare) -mc $(ModuleCase) -ms $(ModSuffix)  $(F90Files) >> Make.ftemp
683 >        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(TargetDir)/' $(F90Declare) -MM -mc $(ModuleCase) -ms $(ModSuffix) $(F90Files) > Make.ftemp
684          @cat Make.ftemp >> $(DependencyFile)
685          @$(Delete) Make.ftemp
686 +
687 +  ifeq "$(UseMPI)" "yes"
688 +        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) $(F90Declare) -MM -mc $(ModuleCase) -ms $(ModSuffix)  $(F90Files) >> Make.ftemp
689 +        @cat Make.ftemp >> $(DependencyFile)
690 +        @$(Delete) Make.ftemp
691 +  endif
692 +
693   endif
694  
695   # make lib
# Line 683 | Line 721 | _installprogram:
721          $(InstallData) $(InstallFiles) $(MyInstallDir)
722   endif      
723  
686 _installprogram:
687        
724   # make statistics
725   _statisticsall :
726          @$(Print) $(patsubst %,$(CurrentDir)/%,$(SourceFiles)) >> $(DEV_ROOT)/files.tmp

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines