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 1544 by tim, Fri Oct 8 22:10:22 2004 UTC vs.
Revision 2754 by gezelter, Wed May 17 03:03:03 2006 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 \
51 >        minimizers \
52 >        selection \
53          restraints \
54 <
54 >        lattice \
55 >        hydrodynamics \
56 >        openbabel\
57 >        antlr\
58 >        mdParser
59   #packages containing applications
60   Applications = \
61          applications/oopse \
62          applications/dump2Xyz \
63 <        applications/simpleBuilder
63 >        applications/staticProps \
64 >        applications/dynamicProps \
65 >        applications/simpleBuilder \
66 >        applications/randomBuilder \
67 >        applications/nanoRodBuilder \
68 >        applications/nanoparticleBuilder \
69 >        applications/atom2mdin \
70 >        applications/hydrodynamics
71  
72 +
73   Samples = \
74 +        samples/alkane \
75          samples/argon \
76 <        samples/water/dimer \
76 >        samples/cutoff \
77 >        samples/dipole \
78 >        samples/gbljtest \
79 >        samples/lipid \
80 >        samples/metals/EAM \
81 >        samples/metals/EAM/nanoparticle \
82 >        samples/metals/EAM/nanorod \
83 >        samples/metals/Sutton-Chen \
84 >        samples/minimizer \
85 >        samples/shape \
86 >        samples/thermoIntegration/liquid \
87 >        samples/thermoIntegration/solid \
88 >        samples/water/dimer \
89          samples/water/spce \
90          samples/water/ssd \
91          samples/water/ssde \
92 +        samples/water/ssdrf \
93 +        samples/water/ssd-ion \
94          samples/water/tip3p_ice \
95          samples/water/tip4p \
96 <        samples/lipid \
70 <        samples/alkane \
71 <        samples/minimizer \
72 <        samples/metals \
73 <        samples/zcons \
96 >        samples/zcons
97  
98   IncludeDirs = \
99 <        @SPRNG_INC_DIR@ \
100 <        @MPI_INC_DIR@
99 >        @ZLIB_INC_DIR@ \
100 >        @FFTW_INC_DIR@ \
101 >        @CGAL_INC_DIR@ \
102 >        @MPI_INC_DIR@
103  
104   LibraryDirs = \
105 <        @SPRNG_LIB_DIR@ \
105 >        @ZLIB_LIB_DIR@ \
106 >        @FFTW_LIB_DIR@ \
107 >        @CGAL_LIB_DIR@ \
108          @MPI_LIB_DIR@
109  
110   Libraries = \
111 <        @SPRNG_LIB@ \
111 >        @LIBS@ \
112 >        @ZLIB@ \
113 >        @FFTW_LIBS@ \
114 >        @CGAL_LIBS@ \
115          @MPI_LIB@ \
116 <        @MPI_F90_LIB@
116 >        @MPI_F90_LIB@
117  
118   OopseHome       = @OOPSE_HOME@
119 < ForceParamDir   = @OOPSE_HOME@/share/forceFields/
120 < SampleSimDir    = @OOPSE_HOME@/share/samples/
121 < BinDir          = @OOPSE_HOME@/bin
122 < DocDir          = @OOPSE_HOME@/doc
119 > ForceParamDir   = $(OopseHome)/share/forceFields
120 > SampleSimDir    = $(OopseHome)/share/samples
121 > InstallBinDir   = $(OopseHome)/bin
122 > DocDir          = $(OopseHome)/doc
123   FrcDeclare      = -DFRC_PATH="$(ForceParamDir)"
124   F90Declare      = -D__FORTRAN90
125   ParallelDeclare = -DIS_MPI
# Line 97 | Line 127 | LinkOptions = \
127   ModuleCase      = @F90_MODULE_NAMES@
128   ModSuffix       = @MOD@
129   LinkOptions = \
130 <        @F90LIBS@
130 >        @LDFLAGS@ \
131 >        @FCLIBS@ \
132 >        @CXXFLAGS@
133 >        
134  
135   ParallelLinkOptions = \
136 <        @F90LIBS@
136 >        @LDFLAGS@ \
137 >        @FCLIBS@ \
138 >        @CXXFLAGS@
139  
140  
141   #---------------------------------------------------------------------------
# Line 114 | Line 149 | BinDir            = $(DEV_ROOT)/bin
149   ParallelTargetDir = $(DEV_ROOT)/MPIobj
150   LibDir            = $(DEV_ROOT)/lib
151   MakeDir           = $(DEV_ROOT)/make
152 + MainMakefile      = $(MakeDir)/Makefile
153   BinDir            = $(DEV_ROOT)/bin
154   DocsDir           = $(DEV_ROOT)/docs
155   CurrentDir        = $(CURDIR)
# Line 125 | Line 161 | Package          = $(subst $(shell cd $(SourceDir); pw
161   # /home/maul/gezelter/src/code/src/UseTheForce/Darkside --> UseTheForce/Darkside
162   #Package          = $(shell echo $(CurrentDir) | sed -e 's/^.*\/src\/\(.*\)/\1/g')
163   #use shell script to get the absolute path and then rip it off from $(CurrentDir)
164 < Package          = $(subst $(shell cd $(SourceDir); pwd)/,,$(CurrentDir))
164 > #Package          = $(subst $(shell cd $(SourceDir); pwd)/,,$(CurrentDir))
165 > # REMINDER: We are now using the Package line in each subdir makefile.
166 > # This avoids the strange path problem and the subshell
167  
168   PackageList              = $(Package)
169   PackageSourceDir         = $(SourceDir)/$(Package)
# Line 204 | Line 242 | ThirdPartyJarsTmp = $(patsubst %,$(LibDir)/%,$(JavaLib
242  
243   OtherTargetFiles       = $(OtherSourceFiles:%=$(PackageTargetDir)/%)
244  
245 + ###########################################################################
246 + #
247 + # Figure out the names of the module files based on some work done by
248 + # configure.  The tr function below is from John Graham-Cumming
249 + # (http://www.jgc.org).
250 + #
251 + # The tr function.   Has three arguments:
252 + #
253 + # $1   The list of characters to translate from
254 + # $2   The list of characters to translate to
255 + # $3   The text to translate
256 + #
257 + # For example, $(call tr,A B C,1 2 3,CAPITAL) becomes 21PIT1L.
258 +
259 + tr = $(eval __t := $3)                                                    \
260 +     $(foreach c,                                                         \
261 +         $(join $(addsuffix :,$1),$2),                                    \
262 +         $(eval __t :=                                                    \
263 +             $(subst $(word 1,$(subst :, ,$c)),$(word 2,$(subst :, ,$c)), \
264 +                 $(__t))))$(__t)
265 +
266 + # Common character classes for use with the tr function.  Each of
267 + # these is actually a variable declaration and must be wrapped with
268 + # $() or ${} to be used.
269 +
270 + [A-Z] := A B C D E F G H I J K L M N O P Q R S T U V W X Y Z #
271 + [a-z] := a b c d e f g h i j k l m n o p q r s t u v w x y z #
272 + [0-9] := 0 1 2 3 4 5 6 7 8 9 #
273 + [A-F] := A B C D E F #
274 +
275 + # Figure out whether we have $(eval) or not (GNU Make 3.80 and above)
276 + # if we do not then we need to use the shell version of tr, and not the
277 + # faster tr function above:
278 +
279 + __have_eval := $(false)
280 + __ignore := $(eval __have_eval := $(true))
281 +
282 + ifndef __have_eval
283 +  uc = $(shell echo $1 | tr "a-z" "A-Z")
284 +  lc = $(shell echo $1 | tr "A-Z" "a-z")
285 + else
286 +  uc = $(call tr,$([a-z]),$([A-Z]),$1)
287 +  lc = $(call tr,$([A-Z]),$([a-z]),$1)
288 + endif
289 +
290 + # OK, now we can actually use these functions to figure out the names
291 + # of the module files:
292 +
293 + ifneq "$(words $(Modules))" "0"
294 + ifeq "$(ModuleCase)" "UPPER"
295 +  MODULES = $(call uc,$(Modules))
296 + else
297 +  ifeq "$(ModuleCase)" "lower"
298 +    MODULES = $(call lc,$(Modules))
299 +  else
300 +    MODULES = $(Modules)
301 +  endif
302 + endif
303 +  ModuleFiles = $(MODULES:%= $(PackageTargetDir)/%.$(ModSuffix))
304 +  ParallelModuleFiles = $(MODULES:%= $(PackageParallelTargetDir)/%.$(ModSuffix))
305 + endif
306 + #
307 + ###########################################################################
308 +
309   ThirdPartyJarsTmp = $(patsubst %,$(LibDir)/%,$(JavaLibraries))
310   ThirdPartyJars    = $(subst $(Space),$(X),$(ThirdPartyJarsTmp))
311  
# Line 215 | Line 317 | ifneq  "$(words $(ObjectFiles) $(ParallelObjectFiles))
317   #if Main is defined, do not build library. It may not be true sometimes
318   ifneq  "$(words $(ObjectFiles) $(ParallelObjectFiles))" "0"
319    DependencyFile    = $(PackageSourceDir)/Makedepend
320 <  ifneq "$(Main)" ""
320 >  ifneq "$(words $(Main))" "0"
321      Executable             = $(BinDir)/$(Main)
322 <    ParallelExecutable     = $(BinDir)/$(Main)_MPI
322 >    ifeq "$(BuiltParallelExe)" "1"
323 >      ParallelExecutable     = $(BinDir)/$(Main)_MPI
324 >    endif
325    else
326      SharedLibrary          = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package)))_UP.so
327      StaticLibrary          = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package)))_UP.a
# Line 247 | Line 351 | Move                   = mv
351   #
352   #---------------------------------------------------------------------------
353   Print                  = @echo
354 < Move                   = mv
354 > Move                   = mv -f
355   Copy                   = cp
356   CCompiler              = @CC@
357   CppCompiler            = @CXX@
358   Linker                 = @CXX@
359   MakeDepend             = makedepend
360 < Install                = @INSTALL@
360 > LN_S                   = @LN_S@
361 > INSTALL                = @INSTALL@
362 > EGREP                  = @EGREP@
363   InstallProgram         = @INSTALL_PROGRAM@
364 + InstallScript          = @INSTALL_SCRIPT@
365   InstallData            = @INSTALL_DATA@
366 < MkDir                = @MKINSTALLDIRS@
367 < Delete                 = rm -fr
366 > MkDir                  = @MKINSTALLDIRS@
367 > Delete                 = rm -f
368   StaticArchiver         = @AR@
369   DynamicArchiver        = @CC@
370   FortranCompiler        = @FC@
264 F90Compiler            = @F90@
371   JavaCompiler           = $(JAVA_HOME)/bin/javac
372   JavaArchiver           = $(JAVA_HOME)/bin/jar
373   JarSigner              = $(JAVA_HOME)/bin/jarsigner
# Line 285 | Line 391 | COptions               = $(FrcDeclare)
391   JniOptions             =
392   RmiOptions             = -d $(TargetDir) -classpath $(ClassPath) \
393                           -sourcepath $(SourceDir)
394 < COptions               = $(FrcDeclare)
395 < CParallelOptions       = $(FrcDeclare) $(ParallelDeclare)
396 < CppOptions             = $(FrcDeclare)
397 < CppParallelOptions     = $(FrcDeclare) $(ParallelDeclare)
398 < FortranOptions         =
399 < F90Options             =  @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) -module $(TargetDir)
294 < F90ParallelOptions     =  @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) -module $(ParallelTargetDir)  @PREPDEFFLAG@$(ParallelDeclare)
394 > COptions               = $(FrcDeclare) @CPPFLAGS@ @CFLAGS@
395 > CParallelOptions       = $(FrcDeclare) $(ParallelDeclare) @CPPFLAGS@ @CFLAGS@
396 > CppOptions             = $(FrcDeclare) @CPPFLAGS@ @CXXFLAGS@
397 > CppParallelOptions     = $(FrcDeclare) $(ParallelDeclare) @CPPFLAGS@ @CXXFLAGS@
398 > FortranOptions         =  @FCFLAGS@ @MODDIRFLAG@$(SourceDir) @MODDIRFLAG@$(TargetDir) @FCFLAGS_SRCEXT@
399 > FortranParallelOptions =  @FCFLAGS@ @MODDIRFLAG@$(SourceDir) @MODDIRFLAG@$(ParallelTargetDir) @PREPDEFFLAG@$(ParallelDeclare) @FCFLAGS_SRCEXT@
400   JavaCompilerOptions    = -d $(TargetDir) -classpath $(ClassPath) \
401                           -sourcepath $(SourceDir) -deprecation
402   JavaRunOptions         = -classpath $(ClassPath)
# Line 322 | Line 427 | MySample                 = $(subst $(shell cd $(DEV_RO
427   #---------------------------------------------------------------------------
428  
429   ifneq "$(words $(SampleFiles))" "0"
430 < MySample                 = $(subst $(shell cd $(DEV_ROOT)/samples; pwd)/,,$(CurrentDir))
431 < MyInstallDir             = $(SampleSimDir)/$(MySample)
432 < InstallFiles             = $(SampleFiles)
433 < InstallCommand           = $(InstallData)
430 >  MySample                 = $(subst $(shell cd $(DEV_ROOT)/samples; pwd)/,,$(CurrentDir))
431 >  MyInstallDir             = $(SampleSimDir)/$(MySample)
432 >  InstallFiles             = $(SampleFiles)
433 >  InstallCommand           = $(InstallData)
434   endif
435  
436   ifneq "$(words $(Main))" "0"
437 < MyInstallDir             = $(BinDir)/
438 < InstallFiles             = $(Executable) $(ParallelExecutable)
439 < InstallCommand           = $(InstallProgram)
437 >  MyInstallDir             = $(InstallBinDir)
438 >  ifeq "$(UseMPI)" "yes"
439 >    InstallFiles             = $(Executable) $(ParallelExecutable)
440 >  else
441 >    InstallFiles             = $(Executable)
442 >  endif
443 >  InstallCommand           = $(InstallProgram)
444 >  ifneq "$(words $(LinkTargets))" "0"
445 >    MyLinkSource = $(patsubst %, $(MyInstallDir)/%,$(Main))
446 >    MyLinkTargets = $(patsubst %, $(MyInstallDir)/%,$(LinkTargets))
447 >  endif
448   endif
449  
450 < ifneq "$(words $(ForcefiledFiles))" "0"
451 < MyInstallDir             = $(ForceParamDir)
452 < InstallFiles             = $(ForcefiledFiles)/
453 < InstallCommand           = $(InstallData)
450 > ifneq "$(words $(ForcefieldFiles))" "0"
451 >  MyInstallDir             = $(ForceParamDir)
452 >  InstallFiles             = $(ForcefieldFiles)
453 >  InstallCommand           = $(InstallData)
454   endif
455  
456   ifneq "$(words $(InstallFiles))" "0"
457    InstallList            =
458   else
459 <  InstallList            = $(patsubst %,$(DEV_ROOT)/%,$(Samples)) $(patsubst %, $(DEV_ROOT)/%,$(Forcefield)) $(patsubst %, $(SourceDir)/%,$(Applications))
459 >  InstallList            = $(patsubst %,$(DEV_ROOT)/%,$(Samples)) $(DEV_ROOT)/forceFields $(patsubst %, $(SourceDir)/%,$(Applications))
460   endif
461  
462   InstallListLoop          = $(patsubst %,$(SourceDir)/%/.install,$(PackageList))  $(patsubst %,%/.install,$(InstallList))
# Line 362 | Line 475 | $(PackageTargetDir) :
475  
476   # Create target directory
477   $(PackageTargetDir) :
478 <        $(MakeDir) $@
478 >        $(MkDir) $@
479  
480 + $(BinDir) :
481 +        $(MkDir) $@
482 +
483   # .c -> .o
484 < $(PackageTargetDir)/%.o : %.c
484 > $(PackageTargetDir)/%.o : %.c $(MainMakefile)
485          $(Print) $@
486          $(CCompiler) $(COptions) -c $(IncludePath) $< -o $@
487  
488 < $(PackageParallelTargetDir)/%.o : %.c
488 > $(PackageParallelTargetDir)/%.o : %.c $(MainMakefile)
489          $(Print) $@
490          $(CCompiler) $(CParallelOptions) -c $(IncludePath) $< -o $@
491  
492   ifeq "$(UseMPI)" "yes"
493 < %.o : %.c
493 > %.o : %.c $(MainMakefile)
494          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
495          $(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@
496   else
497 < %.o : %.c
497 > %.o : %.c $(MainMakefile)
498          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
499   endif
500  
501   # .cpp -> .o
502 < $(PackageTargetDir)/%.o : %.cpp
502 > $(PackageTargetDir)/%.o : %.cpp $(MainMakefile)
503          $(CppCompiler) $(CppOptions) -c $(IncludePath) $< -o $@
504  
505 < $(PackageParallelTargetDir)/%.o : %.cpp
505 > $(PackageParallelTargetDir)/%.o : %.cpp $(MainMakefile)
506          $(CppCompiler) $(CppParallelOptions) -c $(IncludePath) $< -o $@
507  
508   ifeq "$(UseMPI)" "yes"
509 < %.o : %.cpp
509 > %.o : %.cpp $(MainMakefile)
510          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
511          $(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@
512   else
513 < %.o : %.cpp
513 > %.o : %.cpp $(MainMakefile)
514          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
515   endif
516  
517   # .f -> .o
518 < $(PackageTargetDir)/%.o : %.f
518 > $(PackageTargetDir)/%.o : %.f $(MainMakefile)
519          $(FortranCompiler) $(FortranOptions) -c $< -o $@
520  
521 < $(PackageParallelTargetDir)/%.o : %.f
521 > $(PackageParallelTargetDir)/%.o : %.f $(MainMakefile)
522          $(FortranCompiler) $(FortranParallelOptions) -c $< -o $@
523  
524   ifeq "$(UseMPI)" "yes"
525 < %.o : %.f
525 > %.o : %.f $(MainMakefile)
526          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
527          $(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@
528   else
529 < %.o : %.f
529 > %.o : %.f $(MainMakefile)
530          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
531   endif
532  
533   # .F90 -> .o
534 < $(PackageTargetDir)/%.o : %.F90
535 <        $(F90Compiler) $(F90Options) $(IncludePath) -c $< -o $@
534 > $(PackageTargetDir)/%.o : %.F90 $(MainMakefile)
535 >        $(FortranCompiler) $(FortranOptions) $(IncludePath) -c $< -o $@
536 >        if test -n "`ls *.$(ModSuffix)`"; then \
537 >          $(Move) `ls *.$(ModSuffix)` $(PackageTargetDir);\
538 >        fi
539  
540 < $(PackageParallelTargetDir)/%.o : %.F90
541 <        $(F90Compiler) $(F90ParallelOptions) $(IncludePath) -c $< -o $@
542 <
543 < ifeq "$(UseMPI)" "yes"
544 < %.o : %.F90
540 > $(PackageParallelTargetDir)/%.o : %.F90 $(MainMakefile)
541 >        $(FortranCompiler) $(FortranParallelOptions) $(IncludePath) -c $< -o $@
542 >        if test -n "`ls *.$(ModSuffix)`"; then \
543 >          $(Move) "`ls *.$(ModSuffix)`" $(PackageParallelTargetDir);\
544 >        fi
545 >
546 > ifeq "$(UseMPI)" "yes"
547 > %.o : %.F90 $(MainMakefile)
548          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
549 +        if test -n "`ls *.$(ModSuffix)`"; then\
550 +          $(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\
551 +        fi
552 +
553          $(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@
554 +        if test -n "`ls *.$(ModSuffix)`"; then\
555 +          $(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\
556 +        fi
557 +
558   else
559 < %.o : %.F90
559 > %.o : %.F90 $(MainMakefile)
560          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
561 +        if test -n "`ls *.$(ModSuffix)`"; then\
562 +          $(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\
563 +        fi
564   endif
565  
566  
# Line 530 | Line 663 | find_objs = $(shell $(StaticArchiver) -t $(1))
663          $(Doxygen) $(DEV_ROOT)/make/Doxyfile
664  
665   #GUN make funtions to merge the libraries
666 < find_objs = $(shell $(StaticArchiver) -t $(1))
666 > find_objs = $(shell $(StaticArchiver) -t $(1) | $(EGREP) -v "SYMDEF")
667   extract_objs = $(shell $(StaticArchiver) -x $(1) $(call find_objs, $(1)))
668   create_archive = $(shell  $(StaticArchiver) $(StaticArchiverOptions) $(2) $(call find_objs, $(1)))
669   remove_objs = $(shell $(Delete) $(call find_objs, $(1)))
670   do_create = $(call extract_objs,$(1))$(call create_archive,$(1),$(2))$(call remove_objs,$(1))  
671 + do_link = $(shell $(LN_S) $(1) $(2))
672 + all_objs = $(foreach thisLib,$(LibNames), $(call find_objs, $(thisLib)))
673 + all_parallel_objs = $(foreach thisLib,$(ParallelLibNames), $(call find_objs, $(thisLib)))
674 + all_lib_objs = $(patsubst %,$(TargetDir)/%,$(call all_objs))
675 + all_lib_parallel_objs = $(patsubst %,$(ParallelTargetDir)/%,$(call all_parallel_objs))
676  
677   $(CombinedStaticLib) : $(LibDir)/.stamp_UP
678 <        $(Print) create $@      
679 <        $(foreach thisLib,$(LibNames),$(call do_create,$(thisLib),$@))
678 >        $(Print) creating $@            
679 >        $(StaticArchiver) $(StaticArchiverOptions) $@ $(call all_lib_objs)
680          $(Ranlib) $(CombinedStaticLib)
681  
682   $(CombinedParallelStaticLib) : $(LibDir)/.stamp_MPI
683 <        $(Print) create $@
684 <        $(foreach thisLib,$(ParallelLibNames), $(call do_create, $(thisLib), $@))
683 >        $(Print) creating $@
684 >        $(StaticArchiver) $(StaticArchiverOptions) $@ $(call all_lib_parallel_objs)
685          $(Ranlib) $(CombinedParallelStaticLib)
686  
687   # Executable
688   $(Executable) : $(CombinedStaticLib) $(ObjectFiles)
689 <        $(Linker) $(ObjectFiles) $(LinkOptions) $(LibDirs) $(CombinedStaticLib) $(Libraries) -o $@
689 >        if test ! -d $(BinDir); then \
690 >                $(MkDir) $(BinDir) ;\
691 >        fi
692 >        $(Linker) $(ObjectFiles) $(CombinedStaticLib) $(LinkOptions) $(LibDirs) $(Libraries) -o $@
693  
694   $(ParallelExecutable) : $(CombinedParallelStaticLib) $(ParallelObjectFiles)
695 <        $(Linker) $(ParallelObjectFiles) $(ParallelLinkOptions) $(LibDirs) $(CombinedParallelStaticLib) $(Libraries) -o $@
695 >        if test ! -d $(BinDir); then \
696 >                $(MkDir) $(BinDir) ;\
697 >        fi
698 >        $(Linker) $(ParallelObjectFiles) $(CombinedParallelStaticLib) $(ParallelLinkOptions) $(LibDirs) $(Libraries) -o $@
699  
700   # Anything else is just copied from source to target
701   $(PackageTargetDir)/% : $(PackageSourceDir)/%
# Line 594 | Line 738 | endif
738          $(Executable)
739   endif
740  
741 + echo : $(PackageListLoop)
742 +        $(Print) Done echo.
743  
744 + _echoall :
745 +        $(Print) $(Modules)
746 +
747   # make clean
748   clean : $(PackageListLoop)
749          $(Print) Done clean.    
750  
751   _cleanall :
752 <        $(Delete) $(ObjectFiles) $(ParallelObjectFiles)
752 >        $(Delete) \
753 >                $(ObjectFiles) \
754 >                $(ModuleFiles) \
755 >                $(ParallelObjectFiles) \
756 >                $(ParallelModuleFiles) \
757 >                $(JarFile) \
758 >                $(SharedLibrary) \
759 >                $(StaticLibrary) \
760 >                $(ParallelSharedLibrary) \
761 >                $(ParallelStaticLibrary) \
762 >                $(CombinedStaticLib) \
763 >                $(CombinedParallelStaticLib)
764  
765   # make distclean
766   distclean : $(PackageListLoop)
767          $(Print) Done clean.    
768  
769 < _distcleanall :
770 <        $(Delete) $(ObjectFiles) \
611 <                  $(ParallelObjectFiles) \
612 <                        $(JarFile) \
613 <                  $(SharedLibrary) \
614 <                  $(StaticLibrary) \
615 <                  $(ParallelSharedLibrary) \
616 <                  $(ParallelStaticLibrary) \
617 <                  $(Executable) \
769 > _distcleanall : _cleanall
770 >        $(Delete) $(Executable) \
771                    $(ParallelExecutable) \
772                    $(DependencyFile)
773  
621
774   # make depend
775   depend : $(PackageListLoop)
776          $(Print) Done dependencies.
# Line 630 | Line 782 | ifneq "$(words $(CppFiles))" "0"
782          @cd $(PackageSourceDir)
783  
784   ifneq "$(words $(CppFiles))" "0"
785 <        $(CppCompiler) $(CppOptions) $(IncludePath) -MM $(CppFiles) > Make.cpptemp
786 <        @cat Make.cpptemp | sed 's/^[a-zA-Z0-9]/$$\(TargetDir\)\/&/g' >> $(DependencyFile)
785 >        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(TargetDir)/' -MM $(CppFiles)>> Make.cpptemp
786 >        @cat Make.cpptemp  >> $(DependencyFile)
787          $(Delete) Make.cpptemp
788 <        $(CppCompiler) $(CppParallelOptions) $(IncludePath) -MM $(CppFiles) > Make.cpptemp
789 <        @cat Make.cpptemp | sed 's/^[a-zA-Z0-9]/$$\(ParallelTargetDir\)\/&/g' >> $(DependencyFile)
788 >
789 >  ifeq "$(UseMPI)" "yes"
790 >        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) -MM $(CppFiles)>> Make.cpptemp
791 >        @cat Make.cpptemp  >> $(DependencyFile)
792          @$(Delete) Make.cpptemp
793 +  endif
794 +
795   endif
796  
797   ifneq "$(words $(CFiles))" "0"
798 <        $(CCompiler) $(COptions) $(IncludePath) -MM $(CFiles) $(DerivedCFiles) > Make.ctemp
799 <        @cat Make.ctemp | sed 's/^[a-zA-Z0-9]/$$\(TargetDir\)\/&/g' >> $(DependencyFile)
798 >        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(TargetDir)/'  -MM $(CFiles) $(DerivedCFiles)  >> Make.ctemp
799 >        @cat Make.ctemp  >> $(DependencyFile)
800          $(Delete) Make.ctemp
801 <        $(CCompiler) $(CParallelOptions) $(IncludePath) -MM $(CFiles) $(DerivedCFiles) > Make.ctemp
802 <        @cat Make.ctemp | sed 's/^[a-zA-Z0-9]/$$\(ParallelTargetDir\)\/&/g' >> $(DependencyFile)
801 >
802 >  ifeq "$(UseMPI)" "yes"
803 >        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) -MM $(CFiles) $(DerivedCFiles)  >> Make.ctemp
804 >        @cat Make.ctemp  >> $(DependencyFile)
805          @$(Delete) Make.ctemp
806 +  endif
807 +
808   endif
809  
810   ifneq "$(words $(F90Files))" "0"
811 <        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(TargetDir)/' $(F90Declare) -mc $(ModuleCase) -ms $(ModSuffix) $(F90Files) > Make.ftemp
652 <        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) $(F90Declare) -mc $(ModuleCase) -ms $(ModSuffix)  $(F90Files) >> Make.ftemp
811 >        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(TargetDir)/' $(F90Declare) -MM -mc $(ModuleCase) -ms $(ModSuffix) $(F90Files) > Make.ftemp
812          @cat Make.ftemp >> $(DependencyFile)
813          @$(Delete) Make.ftemp
814 +
815 +  ifeq "$(UseMPI)" "yes"
816 +        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) $(F90Declare) -MM -mc $(ModuleCase) -ms $(ModSuffix)  $(F90Files) >> Make.ftemp
817 +        @cat Make.ftemp >> $(DependencyFile)
818 +        @$(Delete) Make.ftemp
819 +  endif
820 +
821   endif
822  
823   # make lib
# Line 672 | Line 838 | _installall : _buildall _installdata
838   install : $(InstallListLoop)
839          $(Print) Done Install
840  
841 < _installall : _buildall _installdata
841 > _installall : _buildall _installdata _installlinks
842  
843   $(MyInstallDir) :
844          $(MkDir) $@
# Line 680 | Line 846 | ifneq "$(words $(InstallFiles))" "0"
846   _installdata :  $(MyInstallDir)
847          $(Print) $(InstallFiles)
848   ifneq "$(words $(InstallFiles))" "0"
849 <        $(InstallData) $(InstallFiles) $(MyInstallDir)
849 >        $(InstallCommand) $(InstallFiles) $(MyInstallDir)
850   endif      
851  
852 < _installprogram:
853 <        
852 > _installlinks :  $(MyInstallDir)
853 > ifneq "$(words $(MyLinkTargets))" "0"
854 >        @cd $(MyInstallDir)
855 >        $(foreach thisLink,$(MyLinkTargets),$(call do_link,$(MyLinkSource),$(thisLink)))
856 > endif      
857 >
858   # make statistics
859   _statisticsall :
860          @$(Print) $(patsubst %,$(CurrentDir)/%,$(SourceFiles)) >> $(DEV_ROOT)/files.tmp
# Line 695 | Line 865 | $(Executable).pure :
865          $(Print) Done statistics.
866  
867   # make pure
868 < $(Executable).pure :
869 <        $(Purify) $(PurifyOptions) $(CppCompiler) $(LinkOptions) $(LibDirs) \
870 <        $(LibList) $(ObjectFiles) -o $@
868 > #$(Executable).pure :
869 > #       $(Purify) $(PurifyOptions) $(CppCompiler) $(LinkOptions) $(LibDirs) \
870 > #       $(LibList) $(ObjectFiles) -o $@
871 > #
872 > #pure : $(Executable).pure
873  
702 pure : $(Executable).pure
703
874   #make cvslog
875   cvslog:
876 <        $(DEV_ROOT)/scripts/cvs2cl.pl
876 >        $(DEV_ROOT)/scripts/cvs2cl
877  
878   # Execute
879   _runexe :

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines