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 2067 by gezelter, Tue Mar 1 15:44:45 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 \
52 <        restraints \
51 >        minimizers \
52 >        selection \
53  
54   #packages containing applications
55   Applications = \
56          applications/oopse \
57          applications/dump2Xyz \
58 <        applications/simpleBuilder
58 >        applications/simpleBuilder\
59 >        applications/staticProps \
60 >        applications/dynamicProps \
61  
62 + Samples = \
63 +        samples/argon \
64 +        samples/water/dimer \
65 +        samples/water/spce \
66 +        samples/water/ssd \
67 +        samples/water/ssde \
68 +        samples/water/tip3p_ice \
69 +        samples/water/tip4p \
70 +        samples/lipid \
71 +        samples/alkane \
72 +        samples/minimizer \
73 +        samples/metals \
74 +        samples/zcons \
75 +
76   IncludeDirs = \
77          @SPRNG_INC_DIR@ \
78          @MPI_INC_DIR@
# Line 72 | Line 87 | ForceParamDir   = @OOPSE_HOME@/share/forceFields/
87          @MPI_F90_LIB@
88  
89   OopseHome       = @OOPSE_HOME@
90 < ForceParamDir   = @OOPSE_HOME@/share/forceFields/
91 < SampleSimDir    = @OOPSE_HOME@/share/samples/
90 > ForceParamDir   = $(OopseHome)/share/forceFields
91 > SampleSimDir    = $(OopseHome)/share/samples
92 > InstallBinDir   = $(OopseHome)/bin
93 > DocDir          = $(OopseHome)/doc
94   FrcDeclare      = -DFRC_PATH="$(ForceParamDir)"
95 + F90Declare      = -D__FORTRAN90
96   ParallelDeclare = -DIS_MPI
97   UseMPI          = @USE_MPI@
98 + ModuleCase      = @F90_MODULE_NAMES@
99 + ModSuffix       = @MOD@
100   LinkOptions = \
101          @F90LIBS@
102  
# Line 94 | Line 114 | ParallelLibDir    = $(DEV_ROOT)/MPIlib
114   TargetDir         = $(DEV_ROOT)/obj
115   ParallelTargetDir = $(DEV_ROOT)/MPIobj
116   LibDir            = $(DEV_ROOT)/lib
97 ParallelLibDir    = $(DEV_ROOT)/MPIlib
117   MakeDir           = $(DEV_ROOT)/make
118   BinDir            = $(DEV_ROOT)/bin
119   DocsDir           = $(DEV_ROOT)/docs
# Line 107 | Line 126 | Package          = $(subst $(shell cd $(SourceDir); pw
126   # /home/maul/gezelter/src/code/src/UseTheForce/Darkside --> UseTheForce/Darkside
127   #Package          = $(shell echo $(CurrentDir) | sed -e 's/^.*\/src\/\(.*\)/\1/g')
128   #use shell script to get the absolute path and then rip it off from $(CurrentDir)
129 < Package          = $(subst $(shell cd $(SourceDir); pwd)/,,$(CurrentDir))
129 > #Package          = $(subst $(shell cd $(SourceDir); pwd)/,,$(CurrentDir))
130 > # REMINDER: We are now using the Package line in each subdir makefile.
131 > # This avoids the strange path problem and the subshell
132  
133   PackageList              = $(Package)
134   PackageSourceDir         = $(SourceDir)/$(Package)
# Line 207 | Line 228 | endif
228      ParallelStaticLibrary  = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package)))_MPI.a
229    endif
230   endif
231 +
232   #
233   # Misc
234   #
# Line 228 | Line 250 | Move                   = mv
250   #
251   #---------------------------------------------------------------------------
252   Print                  = @echo
253 < Move                   = mv
253 > Move                   = mv -f
254   Copy                   = cp
255   CCompiler              = @CC@
256   CppCompiler            = @CXX@
257   Linker                 = @CXX@
258   MakeDepend             = makedepend
259 < Install                = @INSTALL@
259 > INSTALL                = @INSTALL@
260   InstallProgram         = @INSTALL_PROGRAM@
261   InstallData            = @INSTALL_DATA@
262 < MakeDir                = @MKINSTALLDIRS@
262 > MkDir                  = @MKINSTALLDIRS@
263   Delete                 = rm -fr
264   StaticArchiver         = @AR@
265   DynamicArchiver        = @CC@
# Line 256 | Line 278 | Ranlib                 = @RANLIB@
278   Yacc                   = @YACC@
279   Lex                    = @LEX@
280   Ranlib                 = @RANLIB@
281 + Doxygen                = @DOXYGEN@
282  
260
283   MakeOptions            = -k
284   MakeDependOptions      =
285   StaticArchiverOptions  = rc
# Line 266 | Line 288 | COptions               = $(FrcDeclare)
288   JniOptions             =
289   RmiOptions             = -d $(TargetDir) -classpath $(ClassPath) \
290                           -sourcepath $(SourceDir)
291 < COptions               = $(FrcDeclare)
292 < CParallelOptions       = $(FrcDeclare) $(ParallelDeclare)
293 < CppOptions             = $(FrcDeclare)
294 < CppParallelOptions     = $(FrcDeclare) $(ParallelDeclare)
291 > COptions               = $(FrcDeclare) @CFLAGS@
292 > CParallelOptions       = $(FrcDeclare) $(ParallelDeclare) @CFLAGS@
293 > CppOptions             = $(FrcDeclare) @CXXFLAGS@ @OOPSE_TEMPLATE_FLAGS@
294 > CppParallelOptions     = $(FrcDeclare) $(ParallelDeclare) @CXXFLAGS@ @OOPSE_TEMPLATE_FLAGS@
295   FortranOptions         =
296 < F90Options             =  @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) -module $(TargetDir)
297 < F90ParallelOptions     =  @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) -module $(ParallelTargetDir)  @PREPDEFFLAG@$(ParallelDeclare)
296 > F90Options             =  @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) @MODDIRFLAG@$(TargetDir)
297 > F90ParallelOptions     =  @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) @MODDIRFLAG@$(ParallelTargetDir)  @PREPDEFFLAG@$(ParallelDeclare)
298   JavaCompilerOptions    = -d $(TargetDir) -classpath $(ClassPath) \
299                           -sourcepath $(SourceDir) -deprecation
300   JavaRunOptions         = -classpath $(ClassPath)
# Line 298 | Line 320 | Space                  = $(Empty) $(Empty)
320  
321   #---------------------------------------------------------------------------
322   #
323 + #  Install
324 + #
325 + #---------------------------------------------------------------------------
326 +
327 + ifneq "$(words $(SampleFiles))" "0"
328 +  MySample                 = $(subst $(shell cd $(DEV_ROOT)/samples; pwd)/,,$(CurrentDir))
329 +  MyInstallDir             = $(SampleSimDir)/$(MySample)
330 +  InstallFiles             = $(SampleFiles)
331 +  InstallCommand           = $(InstallData)
332 + endif
333 +
334 + ifneq "$(words $(Main))" "0"
335 +  MyInstallDir             = $(InstallBinDir)
336 +  ifeq "$(UseMPI)" "yes"
337 +    InstallFiles             = $(Executable) $(ParallelExecutable)
338 +  else
339 +    InstallFiles             = $(Executable)
340 +  endif
341 +  InstallCommand           = $(InstallProgram)
342 + endif
343 +
344 + ifneq "$(words $(ForcefieldFiles))" "0"
345 +  MyInstallDir             = $(ForceParamDir)
346 +  InstallFiles             = $(ForcefieldFiles)
347 +  InstallCommand           = $(InstallData)
348 + endif
349 +
350 + ifneq "$(words $(InstallFiles))" "0"
351 +  InstallList            =
352 + else
353 +  InstallList            = $(patsubst %,$(DEV_ROOT)/%,$(Samples)) $(DEV_ROOT)/forceFields $(patsubst %, $(SourceDir)/%,$(Applications))
354 + endif
355 +
356 + InstallListLoop          = $(patsubst %,$(SourceDir)/%/.install,$(PackageList))  $(patsubst %,%/.install,$(InstallList))
357 +
358 +
359 +
360 + #---------------------------------------------------------------------------
361 + #
362   # Rules
363   #
364   #---------------------------------------------------------------------------
# Line 308 | Line 369 | $(PackageTargetDir) :
369  
370   # Create target directory
371   $(PackageTargetDir) :
372 <        $(MakeDir) $@
372 >        $(MkDir) $@
373  
374 + $(BinDir) :
375 +        $(MkDir) $@
376 +
377   # .c -> .o
378   $(PackageTargetDir)/%.o : %.c
379          $(Print) $@
# Line 363 | Line 427 | $(PackageTargetDir)/%.o : %.F90
427   # .F90 -> .o
428   $(PackageTargetDir)/%.o : %.F90
429          $(F90Compiler) $(F90Options) $(IncludePath) -c $< -o $@
430 +        if test -n "`ls *.$(ModSuffix)`"; then \
431 +          $(Move) `ls *.$(ModSuffix)` $(PackageTargetDir);\
432 +        fi
433  
434   $(PackageParallelTargetDir)/%.o : %.F90
435          $(F90Compiler) $(F90ParallelOptions) $(IncludePath) -c $< -o $@
436 +        if test -n "`ls *.$(ModSuffix)`"; then \
437 +          $(Move) "`ls *.$(ModSuffix)`" $(PackageParallelTargetDir);\
438 +        fi
439  
440   ifeq "$(UseMPI)" "yes"
441   %.o : %.F90
442          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
443 +        if test -n "`ls *.$(ModSuffix)`"; then\
444 +          $(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\
445 +        fi
446 +
447          $(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@
448 +        if test -n "`ls *.$(ModSuffix)`"; then\
449 +          $(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\
450 +        fi
451 +
452   else
453   %.o : %.F90
454          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
455 +        if test -n "`ls *.$(ModSuffix)`"; then\
456 +          $(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\
457 +        fi
458   endif
459  
460  
# Line 413 | Line 494 | $(LibDir)/%_UP.a : $(ObjectFiles)
494  
495   $(LibDir)/%_UP.a : $(ObjectFiles)
496          $(StaticArchiver) $(StaticArchiverOptions) $@ $(ObjectFiles)
497 <        touch $(LibDir)/.stamp_UP
497 >        @touch $(LibDir)/.stamp_UP
498  
499   $(LibDir)/%_MPI.a: $(ParallelObjectFiles)
500          $(StaticArchiver) $(StaticArchiverOptions) $@ $(ParallelObjectFiles)
501 <        touch $(LibDir)/.stamp_MPI
501 >        @touch $(LibDir)/.stamp_MPI
502  
503   %_UP.a : $(ObjectFiles)
504          $(MAKE) $(MakeOptions) $(LibDir)/$@
# Line 470 | Line 551 | $(PackageTargetDir)/%_Skel.class : $(PackageTargetDir)
551   %_Skel.class : %.class
552          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
553  
554 + document :
555 +        $(Print) Generate Documentation for OOPSE-2.0
556 +        @cd $(DEV_ROOT)/src    
557 +        $(Doxygen) $(DEV_ROOT)/make/Doxyfile
558 +
559   #GUN make funtions to merge the libraries
560   find_objs = $(shell $(StaticArchiver) -t $(1))
561   extract_objs = $(shell $(StaticArchiver) -x $(1) $(call find_objs, $(1)))
# Line 477 | Line 563 | $(CombinedStaticLib) : $(LibDir)/.stamp_UP
563   remove_objs = $(shell $(Delete) $(call find_objs, $(1)))
564   do_create = $(call extract_objs,$(1))$(call create_archive,$(1),$(2))$(call remove_objs,$(1))  
565  
566 < $(CombinedStaticLib) : $(LibDir)/.stamp_UP
566 > $(CombinedStaticLib) : $(LibDir)/.stamp_UP
567 >        $(Print) create $@      
568          $(foreach thisLib,$(LibNames),$(call do_create,$(thisLib),$@))
569          $(Ranlib) $(CombinedStaticLib)
570  
571   $(CombinedParallelStaticLib) : $(LibDir)/.stamp_MPI
572 +        $(Print) create $@
573          $(foreach thisLib,$(ParallelLibNames), $(call do_create, $(thisLib), $@))
574          $(Ranlib) $(CombinedParallelStaticLib)
575  
576   # Executable
577 < $(Executable) : $(CombinedStaticLib) $(ObjectFiles)
578 <        $(Linker) $(ObjectFiles) $(LinkOptions) $(LibDirs) $(CombinedStaticLib) $(Libraries) -o $@
577 > $(Executable) : $(CombinedStaticLib) $(ObjectFiles) $(BinDir)
578 >        $(Linker) $(ObjectFiles) $(CombinedStaticLib) $(LinkOptions) $(LibDirs) $(Libraries) -o $@
579  
580 < $(ParallelExecutable) : $(CombinedParallelStaticLib) $(ParallelObjectFiles)
581 <        $(Linker) $(ParallelObjectFiles) $(ParallelLinkOptions) $(LibDirs) $(CombinedParallelStaticLib) $(Libraries) -o $@
580 > $(ParallelExecutable) : $(CombinedParallelStaticLib) $(ParallelObjectFiles) $(BinDir)
581 >        $(Linker) $(ParallelObjectFiles) $(CombinedParallelStaticLib) $(ParallelLinkOptions) $(LibDirs) $(Libraries) -o $@
582  
583   # Anything else is just copied from source to target
584   $(PackageTargetDir)/% : $(PackageSourceDir)/%
# Line 503 | Line 591 | ifeq "$(UseMPI)" "yes"
591  
592   _all : _buildall
593  
594 + _buildall :
595   ifeq "$(UseMPI)" "yes"
596   _buildall : \
597          $(DependencyFile) \
# Line 538 | Line 627 | _cleanall :
627          $(Print) Done clean.    
628  
629   _cleanall :
630 <        $(Delete) $(ObjectFiles) $(ParallelObjectFiles)
630 >        $(Delete) \
631 >                $(ObjectFiles) \
632 >                $(ParallelObjectFiles) \
633 >                $(JarFile) \
634 >                $(SharedLibrary) \
635 >                $(StaticLibrary) \
636 >                $(ParallelSharedLibrary) \
637 >                $(ParallelStaticLibrary) \
638 >                $(CombinedStaticLib) \
639 >                $(CombinedParallelStaticLib)
640  
641   # make distclean
642   distclean : $(PackageListLoop)
643          $(Print) Done clean.    
644  
645 < _distcleanall :
646 <        $(Delete) $(ObjectFiles) \
549 <                  $(ParallelObjectFiles) \
550 <                        $(JarFile) \
551 <                  $(SharedLibrary) \
552 <                  $(StaticLibrary) \
553 <                  $(ParallelSharedLibrary) \
554 <                  $(ParallelStaticLibrary) \
555 <                  $(Executable) \
645 > _distcleanall : _cleanall
646 >        $(Delete) $(Executable) \
647                    $(ParallelExecutable) \
648                    $(DependencyFile)
649  
559
650   # make depend
651   depend : $(PackageListLoop)
652          $(Print) Done dependencies.
# Line 567 | Line 657 | $(DependencyFile) : $(DerivedSource)
657          $(Print) $@
658          @cd $(PackageSourceDir)
659  
570        @touch Make.ctemp
571        @touch Make.ctemp
572
660   ifneq "$(words $(CppFiles))" "0"
661 <        $(CppCompiler) $(IncludePath) -MM $(CppFiles)  > Make.cpptemp
662 <        cat Make.cpptemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/obj\/&/g' >> $(DependencyFile)
663 <        cat Make.cpptemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/MPIobj\/&/g' >> $(DependencyFile)
661 >        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(TargetDir)/' -MM $(CppFiles)>> Make.cpptemp
662 >        @cat Make.cpptemp  >> $(DependencyFile)
663 >        $(Delete) Make.cpptemp
664 >
665 >  ifeq "$(UseMPI)" "yes"
666 >        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) -MM $(CppFiles)>> Make.cpptemp
667 >        @cat Make.cpptemp  >> $(DependencyFile)
668 >        @$(Delete) Make.cpptemp
669 >  endif
670 >
671   endif
672  
673   ifneq "$(words $(CFiles))" "0"
674 <        $(CCompiler)   $(IncludePath) -MM $(CFiles) $(DerivedCFiles)   > Make.ctemp
675 <        cat Make.ctemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/obj\/&/g' >> $(DependencyFile)
676 <        cat Make.ctemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/MPIobj\/&/g' >> $(DependencyFile)
674 >        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(TargetDir)/'  -MM $(CFiles) $(DerivedCFiles)  >> Make.ctemp
675 >        @cat Make.ctemp  >> $(DependencyFile)
676 >        $(Delete) Make.ctemp
677  
678 +  ifeq "$(UseMPI)" "yes"
679 +        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) -MM $(CFiles) $(DerivedCFiles)  >> Make.ctemp
680 +        @cat Make.ctemp  >> $(DependencyFile)
681 +        @$(Delete) Make.ctemp
682 +  endif
683 +
684   endif
685  
686   ifneq "$(words $(F90Files))" "0"
687 <        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(DEV_ROOT)/obj/' -D__FORTRAN90  $(F90Files) > Make.ftemp
688 <        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(DEV_ROOT)/MPIobj/' -DIS_MPI -D__FORTRAN90  $(F90Files) >> Make.ftemp
689 <        cat Make.ftemp >> $(DependencyFile)
687 >        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(TargetDir)/' $(F90Declare) -MM -mc $(ModuleCase) -ms $(ModSuffix) $(F90Files) > Make.ftemp
688 >        @cat Make.ftemp >> $(DependencyFile)
689 >        @$(Delete) Make.ftemp
690 >
691 >  ifeq "$(UseMPI)" "yes"
692 >        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) $(F90Declare) -MM -mc $(ModuleCase) -ms $(ModSuffix)  $(F90Files) >> Make.ftemp
693 >        @cat Make.ftemp >> $(DependencyFile)
694 >        @$(Delete) Make.ftemp
695 >  endif
696 >
697   endif
591        $(Delete) Make.cpptemp Make.ctemp Make.ftemp
698  
699   # make lib
700   lib    : $(PackageListLoop)
# Line 601 | Line 707 | jarsign : $(JarFile)
707   jarsign : $(JarFile)
708          $(JarSigner) -keystore GeoSoftKeystore $(JarFile) myself
709  
710 + #make install
711 + %.install :
712 +        @$(MAKE) $(MakeOptions) -C $(subst .install,,$@) _installall    
713 +
714 + install : $(InstallListLoop)
715 +        $(Print) Done Install
716 +
717 + _installall : _buildall _installdata
718 +
719 + $(MyInstallDir) :
720 +        $(MkDir) $@
721 +
722 + _installdata :  $(MyInstallDir)
723 +        $(Print) $(InstallFiles)
724 + ifneq "$(words $(InstallFiles))" "0"
725 +        $(InstallData) $(InstallFiles) $(MyInstallDir)
726 + endif      
727 +
728   # make statistics
729   _statisticsall :
730 <        @$(Print) $(SourceFiles) >> $(DEV_ROOT)/files.tmp
730 >        @$(Print) $(patsubst %,$(CurrentDir)/%,$(SourceFiles)) >> $(DEV_ROOT)/files.tmp
731  
732   statistics : $(PackageListLoop)
733          @$(List) $(DEV_ROOT)/files.tmp | xargs $(WordCount) $(WordCountOptions)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines