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 2023 by gezelter, Mon Feb 14 23:26:25 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 + Ps                     = @PS@
283 + PsType                 = @PSTYPE@
284  
260
285   MakeOptions            = -k
286   MakeDependOptions      =
287   StaticArchiverOptions  = rc
# Line 266 | Line 290 | COptions               = $(FrcDeclare)
290   JniOptions             =
291   RmiOptions             = -d $(TargetDir) -classpath $(ClassPath) \
292                           -sourcepath $(SourceDir)
293 < COptions               = $(FrcDeclare)
294 < CParallelOptions       = $(FrcDeclare) $(ParallelDeclare)
295 < CppOptions             = $(FrcDeclare)
296 < CppParallelOptions     = $(FrcDeclare) $(ParallelDeclare)
293 > COptions               = $(FrcDeclare) @CFLAGS@ -DPS=$(Ps) -DPSTYPE=$(PsType)
294 > CParallelOptions       = $(FrcDeclare) $(ParallelDeclare) @CFLAGS@
295 > CppOptions             = $(FrcDeclare) @CXXFLAGS@ @OOPSE_TEMPLATE_FLAGS@
296 > CppParallelOptions     = $(FrcDeclare) $(ParallelDeclare) @CXXFLAGS@ @OOPSE_TEMPLATE_FLAGS@
297   FortranOptions         =
298 < F90Options             =  @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) -module $(TargetDir)
299 < F90ParallelOptions     =  @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) -module $(ParallelTargetDir)  @PREPDEFFLAG@$(ParallelDeclare)
298 > F90Options             =  @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) @MODDIRFLAG@$(TargetDir)
299 > F90ParallelOptions     =  @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) @MODDIRFLAG@$(ParallelTargetDir)  @PREPDEFFLAG@$(ParallelDeclare)
300   JavaCompilerOptions    = -d $(TargetDir) -classpath $(ClassPath) \
301                           -sourcepath $(SourceDir) -deprecation
302   JavaRunOptions         = -classpath $(ClassPath)
# Line 298 | Line 322 | Space                  = $(Empty) $(Empty)
322  
323   #---------------------------------------------------------------------------
324   #
325 + #  Install
326 + #
327 + #---------------------------------------------------------------------------
328 +
329 + ifneq "$(words $(SampleFiles))" "0"
330 +  MySample                 = $(subst $(shell cd $(DEV_ROOT)/samples; pwd)/,,$(CurrentDir))
331 +  MyInstallDir             = $(SampleSimDir)/$(MySample)
332 +  InstallFiles             = $(SampleFiles)
333 +  InstallCommand           = $(InstallData)
334 + endif
335 +
336 + ifneq "$(words $(Main))" "0"
337 +  MyInstallDir             = $(InstallBinDir)
338 +  ifeq "$(UseMPI)" "yes"
339 +    InstallFiles             = $(Executable) $(ParallelExecutable)
340 +  else
341 +    InstallFiles             = $(Executable)
342 +  endif
343 +  InstallCommand           = $(InstallProgram)
344 + endif
345 +
346 + ifneq "$(words $(ForcefieldFiles))" "0"
347 +  MyInstallDir             = $(ForceParamDir)
348 +  InstallFiles             = $(ForcefieldFiles)
349 +  InstallCommand           = $(InstallData)
350 + endif
351 +
352 + ifneq "$(words $(InstallFiles))" "0"
353 +  InstallList            =
354 + else
355 +  InstallList            = $(patsubst %,$(DEV_ROOT)/%,$(Samples)) $(DEV_ROOT)/forceFields $(patsubst %, $(SourceDir)/%,$(Applications))
356 + endif
357 +
358 + InstallListLoop          = $(patsubst %,$(SourceDir)/%/.install,$(PackageList))  $(patsubst %,%/.install,$(InstallList))
359 +
360 +
361 +
362 + #---------------------------------------------------------------------------
363 + #
364   # Rules
365   #
366   #---------------------------------------------------------------------------
# Line 308 | Line 371 | $(PackageTargetDir) :
371  
372   # Create target directory
373   $(PackageTargetDir) :
374 <        $(MakeDir) $@
374 >        $(MkDir) $@
375  
376 + $(BinDir) :
377 +        $(MkDir) $@
378 +
379   # .c -> .o
380   $(PackageTargetDir)/%.o : %.c
381          $(Print) $@
# Line 363 | Line 429 | $(PackageTargetDir)/%.o : %.F90
429   # .F90 -> .o
430   $(PackageTargetDir)/%.o : %.F90
431          $(F90Compiler) $(F90Options) $(IncludePath) -c $< -o $@
432 +        if test -n "`ls *.$(ModSuffix)`"; then \
433 +          $(Move) `ls *.$(ModSuffix)` $(PackageTargetDir);\
434 +        fi
435  
436   $(PackageParallelTargetDir)/%.o : %.F90
437          $(F90Compiler) $(F90ParallelOptions) $(IncludePath) -c $< -o $@
438 +        if test -n "`ls *.$(ModSuffix)`"; then \
439 +          $(Move) "`ls *.$(ModSuffix)`" $(PackageParallelTargetDir);\
440 +        fi
441  
442   ifeq "$(UseMPI)" "yes"
443   %.o : %.F90
444          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
445 +        if test -n "`ls *.$(ModSuffix)`"; then\
446 +          $(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\
447 +        fi
448 +
449          $(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@
450 +        if test -n "`ls *.$(ModSuffix)`"; then\
451 +          $(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\
452 +        fi
453 +
454   else
455   %.o : %.F90
456          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
457 +        if test -n "`ls *.$(ModSuffix)`"; then\
458 +          $(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\
459 +        fi
460   endif
461  
462  
# Line 413 | Line 496 | $(LibDir)/%_UP.a : $(ObjectFiles)
496  
497   $(LibDir)/%_UP.a : $(ObjectFiles)
498          $(StaticArchiver) $(StaticArchiverOptions) $@ $(ObjectFiles)
499 <        touch $(LibDir)/.stamp_UP
499 >        @touch $(LibDir)/.stamp_UP
500  
501   $(LibDir)/%_MPI.a: $(ParallelObjectFiles)
502          $(StaticArchiver) $(StaticArchiverOptions) $@ $(ParallelObjectFiles)
503 <        touch $(LibDir)/.stamp_MPI
503 >        @touch $(LibDir)/.stamp_MPI
504  
505   %_UP.a : $(ObjectFiles)
506          $(MAKE) $(MakeOptions) $(LibDir)/$@
# Line 470 | Line 553 | $(PackageTargetDir)/%_Skel.class : $(PackageTargetDir)
553   %_Skel.class : %.class
554          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
555  
556 + document :
557 +        $(Print) Generate Documentation for OOPSE-2.0
558 +        @cd $(DEV_ROOT)/src    
559 +        $(Doxygen) $(DEV_ROOT)/make/Doxyfile
560 +
561   #GUN make funtions to merge the libraries
562   find_objs = $(shell $(StaticArchiver) -t $(1))
563   extract_objs = $(shell $(StaticArchiver) -x $(1) $(call find_objs, $(1)))
# Line 477 | Line 565 | $(CombinedStaticLib) : $(LibDir)/.stamp_UP
565   remove_objs = $(shell $(Delete) $(call find_objs, $(1)))
566   do_create = $(call extract_objs,$(1))$(call create_archive,$(1),$(2))$(call remove_objs,$(1))  
567  
568 < $(CombinedStaticLib) : $(LibDir)/.stamp_UP
568 > $(CombinedStaticLib) : $(LibDir)/.stamp_UP
569 >        $(Print) create $@      
570          $(foreach thisLib,$(LibNames),$(call do_create,$(thisLib),$@))
571          $(Ranlib) $(CombinedStaticLib)
572  
573   $(CombinedParallelStaticLib) : $(LibDir)/.stamp_MPI
574 +        $(Print) create $@
575          $(foreach thisLib,$(ParallelLibNames), $(call do_create, $(thisLib), $@))
576          $(Ranlib) $(CombinedParallelStaticLib)
577  
578   # Executable
579 < $(Executable) : $(CombinedStaticLib) $(ObjectFiles)
580 <        $(Linker) $(ObjectFiles) $(LinkOptions) $(LibDirs) $(CombinedStaticLib) $(Libraries) -o $@
579 > $(Executable) : $(CombinedStaticLib) $(ObjectFiles) $(BinDir)
580 >        $(Linker) $(ObjectFiles) $(CombinedStaticLib) $(LinkOptions) $(LibDirs) $(Libraries) -o $@
581  
582 < $(ParallelExecutable) : $(CombinedParallelStaticLib) $(ParallelObjectFiles)
583 <        $(Linker) $(ParallelObjectFiles) $(ParallelLinkOptions) $(LibDirs) $(CombinedParallelStaticLib) $(Libraries) -o $@
582 > $(ParallelExecutable) : $(CombinedParallelStaticLib) $(ParallelObjectFiles) $(BinDir)
583 >        $(Linker) $(ParallelObjectFiles) $(CombinedParallelStaticLib) $(ParallelLinkOptions) $(LibDirs) $(Libraries) -o $@
584  
585   # Anything else is just copied from source to target
586   $(PackageTargetDir)/% : $(PackageSourceDir)/%
# Line 503 | Line 593 | ifeq "$(UseMPI)" "yes"
593  
594   _all : _buildall
595  
596 + _buildall :
597   ifeq "$(UseMPI)" "yes"
598   _buildall : \
599          $(DependencyFile) \
# Line 567 | Line 658 | $(DependencyFile) : $(DerivedSource)
658          $(Print) $@
659          @cd $(PackageSourceDir)
660  
570        @touch Make.ctemp
571        @touch Make.ctemp
572
661   ifneq "$(words $(CppFiles))" "0"
662 <        $(CppCompiler) $(IncludePath) -MM $(CppFiles)  > Make.cpptemp
663 <        cat Make.cpptemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/obj\/&/g' >> $(DependencyFile)
664 <        cat Make.cpptemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/MPIobj\/&/g' >> $(DependencyFile)
662 >        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(TargetDir)/' -MM $(CppFiles)>> Make.cpptemp
663 >        @cat Make.cpptemp  >> $(DependencyFile)
664 >        $(Delete) Make.cpptemp
665 >
666 >  ifeq "$(UseMPI)" "yes"
667 >        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) -MM $(CppFiles)>> Make.cpptemp
668 >        @cat Make.cpptemp  >> $(DependencyFile)
669 >        @$(Delete) Make.cpptemp
670 >  endif
671 >
672   endif
673  
674   ifneq "$(words $(CFiles))" "0"
675 <        $(CCompiler)   $(IncludePath) -MM $(CFiles) $(DerivedCFiles)   > Make.ctemp
676 <        cat Make.ctemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/obj\/&/g' >> $(DependencyFile)
677 <        cat Make.ctemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/MPIobj\/&/g' >> $(DependencyFile)
675 >        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(TargetDir)/'  -MM $(CFiles) $(DerivedCFiles)  >> Make.ctemp
676 >        @cat Make.ctemp  >> $(DependencyFile)
677 >        $(Delete) Make.ctemp
678  
679 +  ifeq "$(UseMPI)" "yes"
680 +        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) -MM $(CFiles) $(DerivedCFiles)  >> Make.ctemp
681 +        @cat Make.ctemp  >> $(DependencyFile)
682 +        @$(Delete) Make.ctemp
683 +  endif
684 +
685   endif
686  
687   ifneq "$(words $(F90Files))" "0"
688 <        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(DEV_ROOT)/obj/' -D__FORTRAN90  $(F90Files) > Make.ftemp
689 <        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(DEV_ROOT)/MPIobj/' -DIS_MPI -D__FORTRAN90  $(F90Files) >> Make.ftemp
690 <        cat Make.ftemp >> $(DependencyFile)
688 >        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(TargetDir)/' $(F90Declare) -MM -mc $(ModuleCase) -ms $(ModSuffix) $(F90Files) > Make.ftemp
689 >        @cat Make.ftemp >> $(DependencyFile)
690 >        @$(Delete) Make.ftemp
691 >
692 >  ifeq "$(UseMPI)" "yes"
693 >        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) $(F90Declare) -MM -mc $(ModuleCase) -ms $(ModSuffix)  $(F90Files) >> Make.ftemp
694 >        @cat Make.ftemp >> $(DependencyFile)
695 >        @$(Delete) Make.ftemp
696 >  endif
697 >
698   endif
591        $(Delete) Make.cpptemp Make.ctemp Make.ftemp
699  
700   # make lib
701   lib    : $(PackageListLoop)
# Line 601 | Line 708 | jarsign : $(JarFile)
708   jarsign : $(JarFile)
709          $(JarSigner) -keystore GeoSoftKeystore $(JarFile) myself
710  
711 + #make install
712 + %.install :
713 +        @$(MAKE) $(MakeOptions) -C $(subst .install,,$@) _installall    
714 +
715 + install : $(InstallListLoop)
716 +        $(Print) Done Install
717 +
718 + _installall : _buildall _installdata
719 +
720 + $(MyInstallDir) :
721 +        $(MkDir) $@
722 +
723 + _installdata :  $(MyInstallDir)
724 +        $(Print) $(InstallFiles)
725 + ifneq "$(words $(InstallFiles))" "0"
726 +        $(InstallData) $(InstallFiles) $(MyInstallDir)
727 + endif      
728 +
729   # make statistics
730   _statisticsall :
731 <        @$(Print) $(SourceFiles) >> $(DEV_ROOT)/files.tmp
731 >        @$(Print) $(patsubst %,$(CurrentDir)/%,$(SourceFiles)) >> $(DEV_ROOT)/files.tmp
732  
733   statistics : $(PackageListLoop)
734          @$(List) $(DEV_ROOT)/files.tmp | xargs $(WordCount) $(WordCountOptions)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines