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 1529 by tim, Wed Oct 6 18:18:47 2004 UTC vs.
Revision 1715 by chrisfen, Fri Nov 5 21:04:12 2004 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines