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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines