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 1529 by tim, Wed Oct 6 18:18:47 2004 UTC vs.
Revision 1712 by tim, Thu Nov 4 20:55:01 2004 UTC

# Line 41 | Line 41 | PackageLibs = \
41          math \
42          types \
43          primitives \
44        visitors \
44          UseTheForce/DarkSide \
45          UseTheForce \
46          brains \
47          io \
49        integrators \
50        minimizers \
48          constraints \
49          profiling \
50          restraints \
# Line 58 | Line 55 | IncludeDirs = \
55          applications/dump2Xyz \
56          applications/simpleBuilder
57  
58 + Samples = \
59 +        samples/argon \
60 +        samples/water/dimer \
61 +        samples/water/spce \
62 +        samples/water/ssd \
63 +        samples/water/ssde \
64 +        samples/water/tip3p_ice \
65 +        samples/water/tip4p \
66 +        samples/lipid \
67 +        samples/alkane \
68 +        samples/minimizer \
69 +        samples/metals \
70 +        samples/zcons \
71 +
72   IncludeDirs = \
73          @SPRNG_INC_DIR@ \
74          @MPI_INC_DIR@
# Line 72 | Line 83 | ForceParamDir   = @OOPSE_HOME@/share/forceFields/
83          @MPI_F90_LIB@
84  
85   OopseHome       = @OOPSE_HOME@
86 < ForceParamDir   = @OOPSE_HOME@/share/forceFields/
87 < SampleSimDir    = @OOPSE_HOME@/share/samples/
86 > ForceParamDir   = $(OopseHome)/share/forceFields
87 > SampleSimDir    = $(OopseHome)/share/samples
88 > InstallBinDir   = $(OopseHome)/bin
89 > DocDir          = $(OopseHome)/doc
90   FrcDeclare      = -DFRC_PATH="$(ForceParamDir)"
91 + F90Declare      = -D__FORTRAN90
92   ParallelDeclare = -DIS_MPI
93   UseMPI          = @USE_MPI@
94 + ModuleCase      = @F90_MODULE_NAMES@
95 + ModSuffix       = @MOD@
96   LinkOptions = \
97          @F90LIBS@
98  
# Line 94 | Line 110 | ParallelLibDir    = $(DEV_ROOT)/MPIlib
110   TargetDir         = $(DEV_ROOT)/obj
111   ParallelTargetDir = $(DEV_ROOT)/MPIobj
112   LibDir            = $(DEV_ROOT)/lib
97 ParallelLibDir    = $(DEV_ROOT)/MPIlib
113   MakeDir           = $(DEV_ROOT)/make
114   BinDir            = $(DEV_ROOT)/bin
115   DocsDir           = $(DEV_ROOT)/docs
# Line 207 | Line 222 | endif
222      ParallelStaticLibrary  = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package)))_MPI.a
223    endif
224   endif
225 +
226   #
227   # Misc
228   #
# Line 234 | Line 250 | Install                = @INSTALL@
250   CppCompiler            = @CXX@
251   Linker                 = @CXX@
252   MakeDepend             = makedepend
253 < Install                = @INSTALL@
253 > INSTALL                = @INSTALL@
254   InstallProgram         = @INSTALL_PROGRAM@
255   InstallData            = @INSTALL_DATA@
256 < MakeDir                = @MKINSTALLDIRS@
256 > MkDir                = @MKINSTALLDIRS@
257   Delete                 = rm -fr
258   StaticArchiver         = @AR@
259   DynamicArchiver        = @CC@
# Line 256 | Line 272 | Ranlib                 = @RANLIB@
272   Yacc                   = @YACC@
273   Lex                    = @LEX@
274   Ranlib                 = @RANLIB@
275 + Doxygen                = @DOXYGEN@
276  
260
277   MakeOptions            = -k
278   MakeDependOptions      =
279   StaticArchiverOptions  = rc
# Line 266 | Line 282 | COptions               = $(FrcDeclare)
282   JniOptions             =
283   RmiOptions             = -d $(TargetDir) -classpath $(ClassPath) \
284                           -sourcepath $(SourceDir)
285 < COptions               = $(FrcDeclare)
286 < CParallelOptions       = $(FrcDeclare) $(ParallelDeclare)
287 < CppOptions             = $(FrcDeclare)
288 < CppParallelOptions     = $(FrcDeclare) $(ParallelDeclare)
285 > COptions               = $(FrcDeclare) @CFLAGS@
286 > CParallelOptions       = $(FrcDeclare) $(ParallelDeclare) @CFLAGS@
287 > CppOptions             = $(FrcDeclare) @CXXFLAGS@
288 > CppParallelOptions     = $(FrcDeclare) $(ParallelDeclare) @CXXFLAGS@
289   FortranOptions         =
290 < F90Options             =  @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) -module $(TargetDir)
291 < F90ParallelOptions     =  @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) -module $(ParallelTargetDir)  @PREPDEFFLAG@$(ParallelDeclare)
290 > F90Options             =  @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) @MODDIRFLAG@$(TargetDir)
291 > F90ParallelOptions     =  @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) @MODDIRFLAG@$(ParallelTargetDir)  @PREPDEFFLAG@$(ParallelDeclare)
292   JavaCompilerOptions    = -d $(TargetDir) -classpath $(ClassPath) \
293                           -sourcepath $(SourceDir) -deprecation
294   JavaRunOptions         = -classpath $(ClassPath)
# Line 298 | Line 314 | Space                  = $(Empty) $(Empty)
314  
315   #---------------------------------------------------------------------------
316   #
317 + #  Install
318 + #
319 + #---------------------------------------------------------------------------
320 +
321 + ifneq "$(words $(SampleFiles))" "0"
322 +  MySample                 = $(subst $(shell cd $(DEV_ROOT)/samples; pwd)/,,$(CurrentDir))
323 +  MyInstallDir             = $(SampleSimDir)/$(MySample)
324 +  InstallFiles             = $(SampleFiles)
325 +  InstallCommand           = $(InstallData)
326 + endif
327 +
328 + ifneq "$(words $(Main))" "0"
329 +  MyInstallDir             = $(InstallBinDir)
330 +  ifeq "$(UseMPI)" "yes"
331 +    InstallFiles             = $(Executable) $(ParallelExecutable)
332 +  else
333 +    InstallFiles             = $(Executable)
334 +  endif
335 +  InstallCommand           = $(InstallProgram)
336 + endif
337 +
338 + ifneq "$(words $(ForcefieldFiles))" "0"
339 +  MyInstallDir             = $(ForceParamDir)
340 +  InstallFiles             = $(ForcefieldFiles)
341 +  InstallCommand           = $(InstallData)
342 + endif
343 +
344 + ifneq "$(words $(InstallFiles))" "0"
345 +  InstallList            =
346 + else
347 +  InstallList            = $(patsubst %,$(DEV_ROOT)/%,$(Samples)) $(DEV_ROOT)/forceFields $(patsubst %, $(SourceDir)/%,$(Applications))
348 + endif
349 +
350 + InstallListLoop          = $(patsubst %,$(SourceDir)/%/.install,$(PackageList))  $(patsubst %,%/.install,$(InstallList))
351 +
352 +
353 +
354 + #---------------------------------------------------------------------------
355 + #
356   # Rules
357   #
358   #---------------------------------------------------------------------------
# Line 363 | Line 418 | $(PackageTargetDir)/%.o : %.F90
418   # .F90 -> .o
419   $(PackageTargetDir)/%.o : %.F90
420          $(F90Compiler) $(F90Options) $(IncludePath) -c $< -o $@
421 +        if test -f *.$(ModSuffix); then \
422 +          $(Move) *.$(ModSuffix) $(PackageTargetDir);\
423 +        fi
424  
425   $(PackageParallelTargetDir)/%.o : %.F90
426          $(F90Compiler) $(F90ParallelOptions) $(IncludePath) -c $< -o $@
427 +        if test -f *.$(ModSuffix); then \
428 +          $(Move) *.$(ModSuffix) $(PackageParallelTargetDir);\
429 +        fi
430  
431   ifeq "$(UseMPI)" "yes"
432   %.o : %.F90
433          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
434 +        if test -f *.$(ModSuffix); then \
435 +          $(Move) *.$(ModSuffix) $(PackageTargetDir);\
436 +        fi
437 +
438          $(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@
439 +        if test -f *.$(ModSuffix); then \
440 +          $(Move) *.$(ModSuffix) $(PackageParallelTargetDir);\
441 +        fi
442 +
443   else
444   %.o : %.F90
445          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
446 +        if test -f *.$(ModSuffix); then \
447 +          $(Move) *.$(ModSuffix) $(PackageTargetDir);\
448 +        fi
449 +
450   endif
451  
452  
# Line 413 | Line 486 | $(LibDir)/%_UP.a : $(ObjectFiles)
486  
487   $(LibDir)/%_UP.a : $(ObjectFiles)
488          $(StaticArchiver) $(StaticArchiverOptions) $@ $(ObjectFiles)
489 <        touch $(LibDir)/.stamp_UP
489 >        @touch $(LibDir)/.stamp_UP
490  
491   $(LibDir)/%_MPI.a: $(ParallelObjectFiles)
492          $(StaticArchiver) $(StaticArchiverOptions) $@ $(ParallelObjectFiles)
493 <        touch $(LibDir)/.stamp_MPI
493 >        @touch $(LibDir)/.stamp_MPI
494  
495   %_UP.a : $(ObjectFiles)
496          $(MAKE) $(MakeOptions) $(LibDir)/$@
# Line 470 | Line 543 | $(PackageTargetDir)/%_Skel.class : $(PackageTargetDir)
543   %_Skel.class : %.class
544          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
545  
546 + document :
547 +        $(Print) Generate Documentation for OOPSE-2.0
548 +        @cd $(DEV_ROOT)/src    
549 +        $(Doxygen) $(DEV_ROOT)/make/Doxyfile
550 +
551   #GUN make funtions to merge the libraries
552   find_objs = $(shell $(StaticArchiver) -t $(1))
553   extract_objs = $(shell $(StaticArchiver) -x $(1) $(call find_objs, $(1)))
# Line 477 | Line 555 | $(CombinedStaticLib) : $(LibDir)/.stamp_UP
555   remove_objs = $(shell $(Delete) $(call find_objs, $(1)))
556   do_create = $(call extract_objs,$(1))$(call create_archive,$(1),$(2))$(call remove_objs,$(1))  
557  
558 < $(CombinedStaticLib) : $(LibDir)/.stamp_UP
558 > $(CombinedStaticLib) : $(LibDir)/.stamp_UP
559 >        $(Print) create $@      
560          $(foreach thisLib,$(LibNames),$(call do_create,$(thisLib),$@))
561          $(Ranlib) $(CombinedStaticLib)
562  
563   $(CombinedParallelStaticLib) : $(LibDir)/.stamp_MPI
564 +        $(Print) create $@
565          $(foreach thisLib,$(ParallelLibNames), $(call do_create, $(thisLib), $@))
566          $(Ranlib) $(CombinedParallelStaticLib)
567  
# Line 503 | Line 583 | ifeq "$(UseMPI)" "yes"
583  
584   _all : _buildall
585  
586 + _buildall :
587   ifeq "$(UseMPI)" "yes"
588   _buildall : \
589          $(DependencyFile) \
# Line 567 | Line 648 | $(DependencyFile) : $(DerivedSource)
648          $(Print) $@
649          @cd $(PackageSourceDir)
650  
570        @touch Make.ctemp
571        @touch Make.ctemp
572
651   ifneq "$(words $(CppFiles))" "0"
652 <        $(CppCompiler) $(IncludePath) -MM $(CppFiles)  > Make.cpptemp
653 <        cat Make.cpptemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/obj\/&/g' >> $(DependencyFile)
654 <        cat Make.cpptemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/MPIobj\/&/g' >> $(DependencyFile)
652 >        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(TargetDir)/' -MM $(CppFiles)>> Make.cpptemp
653 >        @cat Make.cpptemp  >> $(DependencyFile)
654 >        $(Delete) Make.cpptemp
655 >
656 >  ifeq "$(UseMPI)" "yes"
657 >        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) -MM $(CppFiles)>> Make.cpptemp
658 >        @cat Make.cpptemp  >> $(DependencyFile)
659 >        @$(Delete) Make.cpptemp
660 >  endif
661 >
662   endif
663  
664   ifneq "$(words $(CFiles))" "0"
665 <        $(CCompiler)   $(IncludePath) -MM $(CFiles) $(DerivedCFiles)   > Make.ctemp
666 <        cat Make.ctemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/obj\/&/g' >> $(DependencyFile)
667 <        cat Make.ctemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/MPIobj\/&/g' >> $(DependencyFile)
665 >        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(TargetDir)/'  -MM $(CFiles) $(DerivedCFiles)  >> Make.ctemp
666 >        @cat Make.ctemp  >> $(DependencyFile)
667 >        $(Delete) Make.ctemp
668  
669 +  ifeq "$(UseMPI)" "yes"
670 +        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) -MM $(CFiles) $(DerivedCFiles)  >> Make.ctemp
671 +        @cat Make.ctemp  >> $(DependencyFile)
672 +        @$(Delete) Make.ctemp
673 +  endif
674 +
675   endif
676  
677   ifneq "$(words $(F90Files))" "0"
678 <        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(DEV_ROOT)/obj/' -D__FORTRAN90  $(F90Files) > Make.ftemp
679 <        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(DEV_ROOT)/MPIobj/' -DIS_MPI -D__FORTRAN90  $(F90Files) >> Make.ftemp
680 <        cat Make.ftemp >> $(DependencyFile)
678 >        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(TargetDir)/' $(F90Declare) -MM -mc $(ModuleCase) -ms $(ModSuffix) $(F90Files) > Make.ftemp
679 >        @cat Make.ftemp >> $(DependencyFile)
680 >        @$(Delete) Make.ftemp
681 >
682 >  ifeq "$(UseMPI)" "yes"
683 >        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) $(F90Declare) -MM -mc $(ModuleCase) -ms $(ModSuffix)  $(F90Files) >> Make.ftemp
684 >        @cat Make.ftemp >> $(DependencyFile)
685 >        @$(Delete) Make.ftemp
686 >  endif
687 >
688   endif
591        $(Delete) Make.cpptemp Make.ctemp Make.ftemp
689  
690   # make lib
691   lib    : $(PackageListLoop)
# Line 601 | Line 698 | jarsign : $(JarFile)
698   jarsign : $(JarFile)
699          $(JarSigner) -keystore GeoSoftKeystore $(JarFile) myself
700  
701 + #make install
702 + %.install :
703 +        @$(MAKE) $(MakeOptions) -C $(subst .install,,$@) _installall    
704 +
705 + install : $(InstallListLoop)
706 +        $(Print) Done Install
707 +
708 + _installall : _buildall _installdata
709 +
710 + $(MyInstallDir) :
711 +        $(MkDir) $@
712 +
713 + _installdata :  $(MyInstallDir)
714 +        $(Print) $(InstallFiles)
715 + ifneq "$(words $(InstallFiles))" "0"
716 +        $(InstallData) $(InstallFiles) $(MyInstallDir)
717 + endif      
718 +        
719   # make statistics
720   _statisticsall :
721 <        @$(Print) $(SourceFiles) >> $(DEV_ROOT)/files.tmp
721 >        @$(Print) $(patsubst %,$(CurrentDir)/%,$(SourceFiles)) >> $(DEV_ROOT)/files.tmp
722  
723   statistics : $(PackageListLoop)
724          @$(List) $(DEV_ROOT)/files.tmp | xargs $(WordCount) $(WordCountOptions)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines