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 1527 by tim, Tue Oct 5 22:57:01 2004 UTC vs.
Revision 2217 by gezelter, Fri Apr 29 19:16:27 2005 UTC

# Line 34 | Line 34 | IS_UNIX=1
34   #
35   #---------------------------------------------------------------------------
36   IS_UNIX=1
37 < #packages to be made
38 < Packages = \
37 >
38 > #packages containing libraries
39 > PackageLibs = \
40          utils \
41 +        visitors \
42          math \
43          types \
44          primitives \
43        visitors \
45          UseTheForce/DarkSide \
46          UseTheForce \
47          brains \
48          io \
49 <        integrators \
49 <        minimizers \
49 >        integrators\
50          constraints \
51 <        profiling \
51 >        minimizers \
52 >        selection \
53          restraints \
54 +        lattice \
55 +
56 + #packages containing applications
57 + Applications = \
58          applications/oopse \
59          applications/dump2Xyz \
60 <        applications/simpleBuilder \
60 >        applications/staticProps \
61 >        applications/dynamicProps \
62 >        applications/simpleBuilder\
63 >        applications/nanoRodBuilder \
64  
65 < #packages contain libraries
66 < PackageLibs = \
67 <        utils \
68 <        math \
69 <        types \
70 <        primitives \
71 <        visitors \
72 <        UseTheForce/DarkSide \
73 <        UseTheForce \
74 <        brains \
75 <        io \
76 <        integrators \
77 <        minimizers \
78 <        constraints \
79 <        profiling \
80 <        restraints \
65 > Samples = \
66 >        samples/argon \
67 >        samples/water/dimer \
68 >        samples/water/spce \
69 >        samples/water/ssd \
70 >        samples/water/ssde \
71 >        samples/water/ssdrf \
72 >        samples/water/ssd-ion \
73 >        samples/water/tip3p_ice \
74 >        samples/water/tip4p \
75 >        samples/lipid \
76 >        samples/alkane \
77 >        samples/minimizer \
78 >        samples/metals \
79 >        samples/thermoIntegration/liquid \
80 >        samples/thermoIntegration/solid \
81 >        samples/dipole \
82 >        samples/shape \
83 >        samples/zcons \
84  
85   IncludeDirs = \
86 <        @SPRNG_INC_DIR@ \
87 <        @MPI_INC_DIR@
86 >        @CGAL_INC_DIR@ \
87 >        @MPI_INC_DIR@
88  
89   LibraryDirs = \
90 <        @SPRNG_LIB_DIR@ \
90 >        @CGAL_LIB_DIR@ \
91          @MPI_LIB_DIR@
92  
93   Libraries = \
94 <        @SPRNG_LIB@ \
94 >        @CGAL_LIBS@ \
95          @MPI_LIB@ \
96 <        @MPI_F90_LIB@
96 >        @MPI_F90_LIB@
97  
98   OopseHome       = @OOPSE_HOME@
99 < ForceParamDir   = @OOPSE_HOME@/share/forceFields/
100 < SampleSimDir    = @OOPSE_HOME@/share/samples/
99 > ForceParamDir   = $(OopseHome)/share/forceFields
100 > SampleSimDir    = $(OopseHome)/share/samples
101 > InstallBinDir   = $(OopseHome)/bin
102 > DocDir          = $(OopseHome)/doc
103   FrcDeclare      = -DFRC_PATH="$(ForceParamDir)"
104 + F90Declare      = -D__FORTRAN90
105   ParallelDeclare = -DIS_MPI
106   UseMPI          = @USE_MPI@
107 + ModuleCase      = @F90_MODULE_NAMES@
108 + ModSuffix       = @MOD@
109 + LinkOptions = \
110 +        @F90LIBS@
111  
112 + ParallelLinkOptions = \
113 +        @F90LIBS@
114 +
115 +
116   #---------------------------------------------------------------------------
117   #
118   #  Directories
# Line 101 | Line 123 | ParallelLibDir    = $(DEV_ROOT)/MPIlib
123   TargetDir         = $(DEV_ROOT)/obj
124   ParallelTargetDir = $(DEV_ROOT)/MPIobj
125   LibDir            = $(DEV_ROOT)/lib
104 ParallelLibDir    = $(DEV_ROOT)/MPIlib
126   MakeDir           = $(DEV_ROOT)/make
127 + MainMakefile      = $(MakeDir)/Makefile
128   BinDir            = $(DEV_ROOT)/bin
129   DocsDir           = $(DEV_ROOT)/docs
130   CurrentDir        = $(CURDIR)
131 < RPath = $(shell cd $(DEV_ROOT); pwd)/lib:$(OopseHome)/lib
132 < ParallelRPath = $(shell cd $(DEV_ROOT); pwd)/MPIlib:$(OopseHome)/MPIlib
111 < LinkOptions = \
112 <        @F90LIBS@ \
113 <        -Wl,-R$(RPath)
131 > CombinedStaticLib = $(LibDir)/libOOPSE.a
132 > CombinedParallelStaticLib = $(LibDir)/libOOPSE_MPI.a
133  
115 ParallelLinkOptions = \
116        @F90LIBS@ \
117        -Wl,-R$(ParallelRPath)
118
134   ifdef Source
135   #get the relative path of current package to source directory
136   # /home/maul/gezelter/src/code/src/UseTheForce/Darkside --> UseTheForce/Darkside
137   #Package          = $(shell echo $(CurrentDir) | sed -e 's/^.*\/src\/\(.*\)/\1/g')
138   #use shell script to get the absolute path and then rip it off from $(CurrentDir)
139 < Package          = $(subst $(shell cd $(SourceDir); pwd)/,,$(CurrentDir))
139 > #Package          = $(subst $(shell cd $(SourceDir); pwd)/,,$(CurrentDir))
140 > # REMINDER: We are now using the Package line in each subdir makefile.
141 > # This avoids the strange path problem and the subshell
142  
143   PackageList              = $(Package)
144   PackageSourceDir         = $(SourceDir)/$(Package)
# Line 129 | Line 146 | PackageList              = $(Packages) $(JavaPackages)
146   PackageParallelTargetDir = $(ParallelTargetDir)
147   JavaMainClass            = $(subst /,.,$(Package)).$(Main)
148   else
149 < PackageList              = $(Packages) $(JavaPackages)
149 > PackageList              = $(PackageLibs) $(JavaPackages) $(Applications)
150   endif
151  
152   PackageListLoop          = $(patsubst %,$(SourceDir)/%/.loop,$(PackageList))
# Line 200 | Line 217 | ThirdPartyJarsTmp = $(patsubst %,$(LibDir)/%,$(JavaLib
217  
218   OtherTargetFiles       = $(OtherSourceFiles:%=$(PackageTargetDir)/%)
219  
220 + ###########################################################################
221 + #
222 + # Figure out the names of the module files based on some work done by
223 + # configure.  The tr function below is from John Graham-Cumming
224 + # (http://www.jgc.org).
225 + #
226 + # The tr function.   Has three arguments:
227 + #
228 + # $1   The list of characters to translate from
229 + # $2   The list of characters to translate to
230 + # $3   The text to translate
231 + #
232 + # For example, $(call tr,A B C,1 2 3,CAPITAL) becomes 21PIT1L.
233 +
234 + tr = $(eval __t := $3)                                                    \
235 +     $(foreach c,                                                         \
236 +         $(join $(addsuffix :,$1),$2),                                    \
237 +         $(eval __t :=                                                    \
238 +             $(subst $(word 1,$(subst :, ,$c)),$(word 2,$(subst :, ,$c)), \
239 +                 $(__t))))$(__t)
240 +
241 + # Common character classes for use with the tr function.  Each of
242 + # these is actually a variable declaration and must be wrapped with
243 + # $() or ${} to be used.
244 +
245 + [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 #
246 + [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 #
247 + [0-9] := 0 1 2 3 4 5 6 7 8 9 #
248 + [A-F] := A B C D E F #
249 +
250 + # Figure out whether we have $(eval) or not (GNU Make 3.80 and above)
251 + # if we do not then we need to use the shell version of tr, and not the
252 + # faster tr function above:
253 +
254 + __have_eval := $(false)
255 + __ignore := $(eval __have_eval := $(true))
256 +
257 + ifndef __have_eval
258 +  uc = $(shell echo $1 | tr "a-z" "A-Z")
259 +  lc = $(shell echo $1 | tr "A-Z" "a-z")
260 + else
261 +  uc = $(call tr,$([a-z]),$([A-Z]),$1)
262 +  lc = $(call tr,$([A-Z]),$([a-z]),$1)
263 + endif
264 +
265 + # OK, now we can actually use these functions to figure out the names
266 + # of the module files:
267 +
268 + ifneq "$(words $(Modules))" "0"
269 + ifeq "$(ModuleCase)" "UPPER"
270 +  MODULES = $(call uc,$(Modules))
271 + else
272 +  ifeq "$(ModuleCase)" "lower"
273 +    MODULES = $(call lc,$(Modules))
274 +  else
275 +    MODULES = $(Modules)
276 +  endif
277 + endif
278 +  ModuleFiles = $(MODULES:%= $(PackageTargetDir)/%.$(ModSuffix))
279 +  ParallelModuleFiles = $(MODULES:%= $(PackageParallelTargetDir)/%.$(ModSuffix))
280 + endif
281 + #
282 + ###########################################################################
283 +
284   ThirdPartyJarsTmp = $(patsubst %,$(LibDir)/%,$(JavaLibraries))
285   ThirdPartyJars    = $(subst $(Space),$(X),$(ThirdPartyJarsTmp))
286  
# Line 211 | Line 292 | ifneq  "$(words $(ObjectFiles) $(ParallelObjectFiles))
292   #if Main is defined, do not build library. It may not be true sometimes
293   ifneq  "$(words $(ObjectFiles) $(ParallelObjectFiles))" "0"
294    DependencyFile    = $(PackageSourceDir)/Makedepend
295 <  ifneq "$(Main)" ""
295 >  ifneq "$(words $(Main))" "0"
296      Executable             = $(BinDir)/$(Main)
297 <    ParallelExecutable     = $(BinDir)/$(Main)_MPI
297 >    ifeq "$(BuiltParallelExe)" "1"
298 >      ParallelExecutable     = $(BinDir)/$(Main)_MPI
299 >    endif
300    else
301 <    SharedLibrary          = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package))).so
302 <    StaticLibrary          = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package))).a
303 <    ParallelSharedLibrary  = $(ParallelLibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package))).so
304 <    ParallelStaticLibrary  = $(ParallelLibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package))).a
301 >    SharedLibrary          = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package)))_UP.so
302 >    StaticLibrary          = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package)))_UP.a
303 >    ParallelSharedLibrary  = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package)))_MPI.so
304 >    ParallelStaticLibrary  = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package)))_MPI.a
305    endif
306   endif
307 +
308   #
309   # Misc
310   #
# Line 228 | Line 312 | ParallelLibDirs  = -L$(ParallelLibDir)  $(LibraryDirs:
312   JavaPackageNames = $(subst /,.,$(JavaPackages))
313   IncludePath      = -I$(SourceDir) $(IncludeDirs:%=-I%)
314   LibDirs          = -L$(LibDir)    $(LibraryDirs:%=-L%)
315 < ParallelLibDirs  = -L$(ParallelLibDir)  $(LibraryDirs:%=-L%)
316 < LocalLibs        = $(subst /,,$(patsubst %, oopse_%, $(PackageLibs)))
233 < ParallelLocalLibs= $(subst /,,$(patsubst %, oopse_%, $(PackageLibs)))
315 > LocalLibs        = $(subst /,,$(patsubst %, oopse_%_UP, $(PackageLibs)))
316 > ParallelLocalLibs= $(subst /,,$(patsubst %, oopse_%_MPI, $(PackageLibs)))
317   LibList          = $(LocalLibs:%=-l%) $(Libraries)
318 + LibNames         = $(LocalLibs:%=$(LibDir)/lib%.a)
319   ParallelLibList  = $(ParallelLocalLibs:%=-l%) $(Libraries)
320 + ParallelLibNames = $(ParallelLocalLibs:%=$(LibDir)/lib%.a)
321  
322  
323   #---------------------------------------------------------------------------
# Line 241 | Line 326 | Move                   = mv
326   #
327   #---------------------------------------------------------------------------
328   Print                  = @echo
329 < Move                   = mv
329 > Move                   = mv -f
330   Copy                   = cp
331   CCompiler              = @CC@
332   CppCompiler            = @CXX@
333   Linker                 = @CXX@
334   MakeDepend             = makedepend
335 < Install                = @INSTALL@
335 > INSTALL                = @INSTALL@
336   InstallProgram         = @INSTALL_PROGRAM@
337 + InstallScript          = @INSTALL_SCRIPT@
338   InstallData            = @INSTALL_DATA@
339 < MakeDir                = @MKINSTALLDIRS@
340 < Delete                 = rm -fr
339 > MkDir                  = @MKINSTALLDIRS@
340 > Delete                 = rm -f
341   StaticArchiver         = @AR@
342   DynamicArchiver        = @CC@
343   FortranCompiler        = @FC@
# Line 268 | Line 354 | Lex                    = @LEX@
354   List                   = cat
355   Yacc                   = @YACC@
356   Lex                    = @LEX@
357 + Ranlib                 = @RANLIB@
358 + Doxygen                = @DOXYGEN@
359  
272
360   MakeOptions            = -k
361   MakeDependOptions      =
362   StaticArchiverOptions  = rc
# Line 278 | Line 365 | COptions               = $(FrcDeclare)
365   JniOptions             =
366   RmiOptions             = -d $(TargetDir) -classpath $(ClassPath) \
367                           -sourcepath $(SourceDir)
368 < COptions               = $(FrcDeclare)
369 < CParallelOptions       = $(FrcDeclare) $(ParallelDeclare)
370 < CppOptions             = $(FrcDeclare)
371 < CppParallelOptions     = $(FrcDeclare) $(ParallelDeclare)
368 > COptions               = $(FrcDeclare) @CFLAGS@
369 > CParallelOptions       = $(FrcDeclare) $(ParallelDeclare) @CFLAGS@
370 > CppOptions             = $(FrcDeclare) @CXXFLAGS@ @OOPSE_TEMPLATE_FLAGS@
371 > CppParallelOptions     = $(FrcDeclare) $(ParallelDeclare) @CXXFLAGS@ @OOPSE_TEMPLATE_FLAGS@
372   FortranOptions         =
373 < F90Options             =  @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) -module $(TargetDir)
374 < F90ParallelOptions     =  @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) -module $(ParallelTargetDir)  @PREPDEFFLAG@$(ParallelDeclare)
373 > F90Options             =  @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) @MODDIRFLAG@$(TargetDir)
374 > F90ParallelOptions     =  @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) @MODDIRFLAG@$(ParallelTargetDir)  @PREPDEFFLAG@$(ParallelDeclare)
375   JavaCompilerOptions    = -d $(TargetDir) -classpath $(ClassPath) \
376                           -sourcepath $(SourceDir) -deprecation
377   JavaRunOptions         = -classpath $(ClassPath)
# Line 306 | Line 393 | Space                  = $(Empty) $(Empty)
393  
394   Empty                  =
395   Space                  = $(Empty) $(Empty)
396 +
397 +
398 + #---------------------------------------------------------------------------
399 + #
400 + #  Install
401 + #
402 + #---------------------------------------------------------------------------
403 +
404 + ifneq "$(words $(SampleFiles))" "0"
405 +  MySample                 = $(subst $(shell cd $(DEV_ROOT)/samples; pwd)/,,$(CurrentDir))
406 +  MyInstallDir             = $(SampleSimDir)/$(MySample)
407 +  InstallFiles             = $(SampleFiles)
408 +  InstallCommand           = $(InstallData)
409 + endif
410 +
411 + ifneq "$(words $(Main))" "0"
412 +  MyInstallDir             = $(InstallBinDir)
413 +  ifeq "$(UseMPI)" "yes"
414 +    InstallFiles             = $(Executable) $(ParallelExecutable)
415 +  else
416 +    InstallFiles             = $(Executable)
417 +  endif
418 +  InstallCommand           = $(InstallProgram)
419 + endif
420 +
421 + ifneq "$(words $(ForcefieldFiles))" "0"
422 +  MyInstallDir             = $(ForceParamDir)
423 +  InstallFiles             = $(ForcefieldFiles)
424 +  InstallCommand           = $(InstallData)
425 + endif
426  
427 + ifneq "$(words $(InstallFiles))" "0"
428 +  InstallList            =
429 + else
430 +  InstallList            = $(patsubst %,$(DEV_ROOT)/%,$(Samples)) $(DEV_ROOT)/forceFields $(patsubst %, $(SourceDir)/%,$(Applications))
431 + endif
432  
433 + InstallListLoop          = $(patsubst %,$(SourceDir)/%/.install,$(PackageList))  $(patsubst %,%/.install,$(InstallList))
434 +
435 +
436 +
437   #---------------------------------------------------------------------------
438   #
439   # Rules
# Line 320 | Line 446 | $(PackageTargetDir) :
446  
447   # Create target directory
448   $(PackageTargetDir) :
449 <        $(MakeDir) $@
449 >        $(MkDir) $@
450  
451 + $(BinDir) :
452 +        $(MkDir) $@
453 +
454   # .c -> .o
455 < $(PackageTargetDir)/%.o : %.c
455 > $(PackageTargetDir)/%.o : %.c $(MainMakefile)
456          $(Print) $@
457          $(CCompiler) $(COptions) -c $(IncludePath) $< -o $@
458  
459 < $(PackageParallelTargetDir)/%.o : %.c
459 > $(PackageParallelTargetDir)/%.o : %.c $(MainMakefile)
460          $(Print) $@
461          $(CCompiler) $(CParallelOptions) -c $(IncludePath) $< -o $@
462  
463   ifeq "$(UseMPI)" "yes"
464 < %.o : %.c
464 > %.o : %.c $(MainMakefile)
465          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
466          $(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@
467   else
468 < %.o : %.c
468 > %.o : %.c $(MainMakefile)
469          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
470   endif
471  
472   # .cpp -> .o
473 < $(PackageTargetDir)/%.o : %.cpp
473 > $(PackageTargetDir)/%.o : %.cpp $(MainMakefile)
474          $(CppCompiler) $(CppOptions) -c $(IncludePath) $< -o $@
475  
476 < $(PackageParallelTargetDir)/%.o : %.cpp
476 > $(PackageParallelTargetDir)/%.o : %.cpp $(MainMakefile)
477          $(CppCompiler) $(CppParallelOptions) -c $(IncludePath) $< -o $@
478  
479   ifeq "$(UseMPI)" "yes"
480 < %.o : %.cpp
480 > %.o : %.cpp $(MainMakefile)
481          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
482          $(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@
483   else
484 < %.o : %.cpp
484 > %.o : %.cpp $(MainMakefile)
485          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
486   endif
487  
488   # .f -> .o
489 < $(PackageTargetDir)/%.o : %.f
489 > $(PackageTargetDir)/%.o : %.f $(MainMakefile)
490          $(FortranCompiler) $(FortranOptions) -c $< -o $@
491  
492 < $(PackageParallelTargetDir)/%.o : %.f
492 > $(PackageParallelTargetDir)/%.o : %.f $(MainMakefile)
493          $(FortranCompiler) $(FortranParallelOptions) -c $< -o $@
494  
495   ifeq "$(UseMPI)" "yes"
496 < %.o : %.f
496 > %.o : %.f $(MainMakefile)
497          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
498          $(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@
499   else
500 < %.o : %.f
500 > %.o : %.f $(MainMakefile)
501          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
502   endif
503  
504   # .F90 -> .o
505 < $(PackageTargetDir)/%.o : %.F90
505 > $(PackageTargetDir)/%.o : %.F90 $(MainMakefile)
506          $(F90Compiler) $(F90Options) $(IncludePath) -c $< -o $@
507 +        if test -n "`ls *.$(ModSuffix)`"; then \
508 +          $(Move) `ls *.$(ModSuffix)` $(PackageTargetDir);\
509 +        fi
510  
511 < $(PackageParallelTargetDir)/%.o : %.F90
511 > $(PackageParallelTargetDir)/%.o : %.F90 $(MainMakefile)
512          $(F90Compiler) $(F90ParallelOptions) $(IncludePath) -c $< -o $@
513 +        if test -n "`ls *.$(ModSuffix)`"; then \
514 +          $(Move) "`ls *.$(ModSuffix)`" $(PackageParallelTargetDir);\
515 +        fi
516  
517   ifeq "$(UseMPI)" "yes"
518 < %.o : %.F90
518 > %.o : %.F90 $(MainMakefile)
519          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
520 +        if test -n "`ls *.$(ModSuffix)`"; then\
521 +          $(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\
522 +        fi
523 +
524          $(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@
525 +        if test -n "`ls *.$(ModSuffix)`"; then\
526 +          $(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\
527 +        fi
528 +
529   else
530 < %.o : %.F90
530 > %.o : %.F90 $(MainMakefile)
531          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
532 +        if test -n "`ls *.$(ModSuffix)`"; then\
533 +          $(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\
534 +        fi
535   endif
536  
537  
# Line 423 | Line 569 | $(LibDir)/%.a : $(ObjectFiles)
569  
570   # .o -> .a
571  
572 < $(LibDir)/%.a : $(ObjectFiles)
572 > $(LibDir)/%_UP.a : $(ObjectFiles)
573          $(StaticArchiver) $(StaticArchiverOptions) $@ $(ObjectFiles)
574 +        @touch $(LibDir)/.stamp_UP
575  
576 < $(ParallelLibDir)/%.a: $(ParallelObjectFiles)
576 > $(LibDir)/%_MPI.a: $(ParallelObjectFiles)
577          $(StaticArchiver) $(StaticArchiverOptions) $@ $(ParallelObjectFiles)
578 +        @touch $(LibDir)/.stamp_MPI
579  
580 < ifeq "$(UseMPI)" "yes"
433 < %.a : $(ObjectFiles) $(ParallelObjectFiles)
580 > %_UP.a : $(ObjectFiles)
581          $(MAKE) $(MakeOptions) $(LibDir)/$@
582 <        $(MAKE) $(MakeOptions) $(ParallelLibDir)/$@
583 < else
437 < %.a : $(ObjectFiles)
582 >
583 > %_MPI.a : $(ParallelObjectFiles)
584          $(MAKE) $(MakeOptions) $(LibDir)/$@
439 endif
585  
586   # .o -> .so
587 < $(LibDir)/%.so : $(ObjectFiles)
587 > $(LibDir)/%_UP.so : $(ObjectFiles)
588          $(DynamicArchiver) $(ObjectFiles) $(DynamicArchiverOptions) -o $@
589  
590 < $(ParallelLibDir)/%.so : $(ParallelObjectFiles)
590 > $(LibDir)/%_MPI.so : $(ParallelObjectFiles)
591          $(DynamicArchiver) $(ParallelObjectFiles) $(DynamicArchiverOptions) -o $@
592  
593 < ifeq "$(UseMPI)" "yes"
449 < %.so : $(ObjectFiles) $(ParallelObjectFiles)
593 > %_UP.so : $(ObjectFiles)
594          $(MAKE) $(MakeOptions) $(LibDir)/$@
595 <        $(MAKE) $(MakeOptions) $(ParallelLibDir)/$@
596 < else
453 < %.so : $(ObjectFiles)
595 >
596 > %_MPI.so : $(ParallelObjectFiles)
597          $(MAKE) $(MakeOptions) $(LibDir)/$@
455 endif
598  
599   # .class -> .jar
600   $(LibDir)/%.jar : $(JavaClassFiles) $(OtherTargetFiles)
# Line 486 | Line 628 | $(PackageTargetDir)/%_Skel.class : $(PackageTargetDir)
628   %_Skel.class : %.class
629          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
630  
631 < # Executable
632 < $(Executable) : $(ObjectFiles)
633 <        $(Linker) $(ObjectFiles) $(LinkOptions) $(LibDirs) $(LibList) -o $@
631 > document :
632 >        $(Print) Generate Documentation for OOPSE-2.0
633 >        @cd $(DEV_ROOT)/src    
634 >        $(Doxygen) $(DEV_ROOT)/make/Doxyfile
635  
636 < $(ParallelExecutable) : $(ParallelObjectFiles)
637 <        $(Linker) $(ParallelObjectFiles)  $(ParallelLinkOptions) $(ParallelLibDirs) $(LibList) -o $@
636 > #GUN make funtions to merge the libraries
637 > find_objs = $(shell $(StaticArchiver) -t $(1))
638 > extract_objs = $(shell $(StaticArchiver) -x $(1) $(call find_objs, $(1)))
639 > create_archive = $(shell  $(StaticArchiver) $(StaticArchiverOptions) $(2) $(call find_objs, $(1)))
640 > remove_objs = $(shell $(Delete) $(call find_objs, $(1)))
641 > do_create = $(call extract_objs,$(1))$(call create_archive,$(1),$(2))$(call remove_objs,$(1))  
642 >
643 > $(CombinedStaticLib) : $(LibDir)/.stamp_UP
644 >        $(Print) create $@      
645 >        $(foreach thisLib,$(LibNames),$(call do_create,$(thisLib),$@))
646 >        $(Ranlib) $(CombinedStaticLib)
647  
648 + $(CombinedParallelStaticLib) : $(LibDir)/.stamp_MPI
649 +        $(Print) create $@
650 +        $(foreach thisLib,$(ParallelLibNames), $(call do_create, $(thisLib), $@))
651 +        $(Ranlib) $(CombinedParallelStaticLib)
652 +
653 + # Executable
654 + $(Executable) : $(CombinedStaticLib) $(ObjectFiles) $(BinDir)
655 +        $(Linker) $(ObjectFiles) $(CombinedStaticLib) $(LinkOptions) $(LibDirs) $(Libraries) -o $@
656 +
657 + $(ParallelExecutable) : $(CombinedParallelStaticLib) $(ParallelObjectFiles) $(BinDir)
658 +        $(Linker) $(ParallelObjectFiles) $(CombinedParallelStaticLib) $(ParallelLinkOptions) $(LibDirs) $(Libraries) -o $@
659 +
660   # Anything else is just copied from source to target
661   $(PackageTargetDir)/% : $(PackageSourceDir)/%
662          $(Print) $@
# Line 504 | Line 668 | ifeq "$(UseMPI)" "yes"
668  
669   _all : _buildall
670  
671 + _buildall :
672   ifeq "$(UseMPI)" "yes"
673   _buildall : \
674          $(DependencyFile) \
# Line 514 | Line 679 | _buildall : \
679          $(RmiStubFiles) \
680          $(RmiSkeletonFiles) \
681          $(OtherTargetFiles) \
517        $(SharedLibrary) \
682          $(StaticLibrary) \
519        $(ParallelSharedLibrary) \
683          $(ParallelStaticLibrary) \
684          $(JarFile) \
685          $(Executable) \
# Line 530 | Line 693 | _buildall : \
693          $(RmiStubFiles) \
694          $(RmiSkeletonFiles) \
695          $(OtherTargetFiles) \
533        $(SharedLibrary) \
696          $(StaticLibrary) \
697          $(JarFile) \
698          $(Executable)
699   endif
700  
701 + echo : $(PackageListLoop)
702 +        $(Print) Done echo.
703  
704 + _echoall :
705 +        $(Print) $(Modules)
706 +
707   # make clean
708   clean : $(PackageListLoop)
709          $(Print) Done clean.    
710  
711   _cleanall :
712 <        $(Delete) $(ObjectFiles) $(ParallelObjectFiles)
712 >        $(Delete) \
713 >                $(ObjectFiles) \
714 >                $(ModuleFiles) \
715 >                $(ParallelObjectFiles) \
716 >                $(ParallelModuleFiles) \
717 >                $(JarFile) \
718 >                $(SharedLibrary) \
719 >                $(StaticLibrary) \
720 >                $(ParallelSharedLibrary) \
721 >                $(ParallelStaticLibrary) \
722 >                $(CombinedStaticLib) \
723 >                $(CombinedParallelStaticLib)
724  
725   # make distclean
726   distclean : $(PackageListLoop)
727          $(Print) Done clean.    
728  
729 < _distcleanall :
730 <        $(Delete) $(ObjectFiles) \
553 <                  $(ParallelObjectFiles) \
554 <                        $(JarFile) \
555 <                  $(SharedLibrary) \
556 <                  $(StaticLibrary) \
557 <                  $(ParallelSharedLibrary) \
558 <                  $(ParallelStaticLibrary) \
559 <                  $(Executable) \
729 > _distcleanall : _cleanall
730 >        $(Delete) $(Executable) \
731                    $(ParallelExecutable) \
732                    $(DependencyFile)
733  
563
734   # make depend
735   depend : $(PackageListLoop)
736          $(Print) Done dependencies.
# Line 571 | Line 741 | $(DependencyFile) : $(DerivedSource)
741          $(Print) $@
742          @cd $(PackageSourceDir)
743  
574        @touch Make.ctemp
575        @touch Make.ctemp
576
744   ifneq "$(words $(CppFiles))" "0"
745 <        $(CppCompiler) $(IncludePath) -MM $(CppFiles)  > Make.cpptemp
746 <        cat Make.cpptemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/obj\/&/g' >> $(DependencyFile)
747 <        cat Make.cpptemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/MPIobj\/&/g' >> $(DependencyFile)
745 >        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(TargetDir)/' -MM $(CppFiles)>> Make.cpptemp
746 >        @cat Make.cpptemp  >> $(DependencyFile)
747 >        $(Delete) Make.cpptemp
748 >
749 >  ifeq "$(UseMPI)" "yes"
750 >        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) -MM $(CppFiles)>> Make.cpptemp
751 >        @cat Make.cpptemp  >> $(DependencyFile)
752 >        @$(Delete) Make.cpptemp
753 >  endif
754 >
755   endif
756  
757   ifneq "$(words $(CFiles))" "0"
758 <        $(CCompiler)   $(IncludePath) -MM $(CFiles) $(DerivedCFiles)   > Make.ctemp
759 <        cat Make.ctemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/obj\/&/g' >> $(DependencyFile)
760 <        cat Make.ctemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/MPIobj\/&/g' >> $(DependencyFile)
758 >        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(TargetDir)/'  -MM $(CFiles) $(DerivedCFiles)  >> Make.ctemp
759 >        @cat Make.ctemp  >> $(DependencyFile)
760 >        $(Delete) Make.ctemp
761  
762 +  ifeq "$(UseMPI)" "yes"
763 +        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) -MM $(CFiles) $(DerivedCFiles)  >> Make.ctemp
764 +        @cat Make.ctemp  >> $(DependencyFile)
765 +        @$(Delete) Make.ctemp
766 +  endif
767 +
768   endif
769  
770   ifneq "$(words $(F90Files))" "0"
771 <        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(DEV_ROOT)/obj/' -D__FORTRAN90  $(F90Files) > Make.ftemp
772 <        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(DEV_ROOT)/MPIobj/' -DIS_MPI -D__FORTRAN90  $(F90Files) >> Make.ftemp
773 <        cat Make.ftemp >> $(DependencyFile)
771 >        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(TargetDir)/' $(F90Declare) -MM -mc $(ModuleCase) -ms $(ModSuffix) $(F90Files) > Make.ftemp
772 >        @cat Make.ftemp >> $(DependencyFile)
773 >        @$(Delete) Make.ftemp
774 >
775 >  ifeq "$(UseMPI)" "yes"
776 >        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) $(F90Declare) -MM -mc $(ModuleCase) -ms $(ModSuffix)  $(F90Files) >> Make.ftemp
777 >        @cat Make.ftemp >> $(DependencyFile)
778 >        @$(Delete) Make.ftemp
779 >  endif
780 >
781   endif
595        $(Delete) Make.cpptemp Make.ctemp Make.ftemp
782  
783   # make lib
784   lib    : $(PackageListLoop)
# Line 605 | Line 791 | jarsign : $(JarFile)
791   jarsign : $(JarFile)
792          $(JarSigner) -keystore GeoSoftKeystore $(JarFile) myself
793  
794 + #make install
795 + %.install :
796 +        @$(MAKE) $(MakeOptions) -C $(subst .install,,$@) _installall    
797 +
798 + install : $(InstallListLoop)
799 +        $(Print) Done Install
800 +
801 + _installall : _buildall _installdata
802 +
803 + $(MyInstallDir) :
804 +        $(MkDir) $@
805 +
806 + _installdata :  $(MyInstallDir)
807 +        $(Print) $(InstallFiles)
808 + ifneq "$(words $(InstallFiles))" "0"
809 +        $(InstallCommand) $(InstallFiles) $(MyInstallDir)
810 + endif      
811 +
812   # make statistics
813   _statisticsall :
814 <        @$(Print) $(SourceFiles) >> $(DEV_ROOT)/files.tmp
814 >        @$(Print) $(patsubst %,$(CurrentDir)/%,$(SourceFiles)) >> $(DEV_ROOT)/files.tmp
815  
816   statistics : $(PackageListLoop)
817          @$(List) $(DEV_ROOT)/files.tmp | xargs $(WordCount) $(WordCountOptions)
# Line 623 | Line 827 | cvslog:
827  
828   #make cvslog
829   cvslog:
830 <        $(DEV_ROOT)/scripts/cvs2cl.pl
830 >        $(DEV_ROOT)/scripts/cvs2cl
831  
832   # Execute
833   _runexe :

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines