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 1512 by tim, Wed Sep 29 21:54:03 2004 UTC vs.
Revision 1544 by tim, Fri Oct 8 22:10:22 2004 UTC

# Line 33 | Line 33
33   #  $<      - Current dependency
34   #
35   #---------------------------------------------------------------------------
36 + IS_UNIX=1
37  
38 < #---------------------------------------------------------------------------
39 < #
40 < #  Packages
41 < #
42 < #---------------------------------------------------------------------------
38 > #packages containing libraries
39 > PackageLibs = \
40 >        utils \
41 >        math \
42 >        types \
43 >        primitives \
44 >        visitors \
45 >        UseTheForce/DarkSide \
46 >        UseTheForce \
47 >        brains \
48 >        io \
49 >        integrators \
50 >        minimizers \
51 >        constraints \
52 >        profiling \
53 >        restraints \
54  
55 < #packages to be made
56 < Packages = \
57 <        utils \
58 <        math \
59 <        types \
48 <        primitives \
49 <        visitors \
50 <        UseTheForce/DarkSide \
51 <        UseTheForce \
52 <        brains \
53 <        io \
54 <        integrators \
55 <        minimizers \
56 <        constraints \
57 <        profiling \
58 <        restraints \
59 <        applications
55 > #packages containing applications
56 > Applications = \
57 >        applications/oopse \
58 >        applications/dump2Xyz \
59 >        applications/simpleBuilder
60  
61 < #packages contain libraries
62 < PackageLibs = \
63 <              utils \
64 <              math \
65 <              types \
66 <              primitives \
67 <              visitors \
68 <        UseTheForce/DarkSide \
69 <              UseTheForce \
70 <        brains \
71 <              io \
72 <              integrators \
73 <              minimizers \
74 <              constraints \
75 <              profiling \
76 <              restraints
61 > Samples = \
62 >        samples/argon \
63 >        samples/water/dimer \
64 >        samples/water/spce \
65 >        samples/water/ssd \
66 >        samples/water/ssde \
67 >        samples/water/tip3p_ice \
68 >        samples/water/tip4p \
69 >        samples/lipid \
70 >        samples/alkane \
71 >        samples/minimizer \
72 >        samples/metals \
73 >        samples/zcons \
74  
75 + IncludeDirs = \
76 +        @SPRNG_INC_DIR@ \
77 +        @MPI_INC_DIR@
78 +
79 + LibraryDirs = \
80 +        @SPRNG_LIB_DIR@ \
81 +        @MPI_LIB_DIR@
82 +
83 + Libraries = \
84 +        @SPRNG_LIB@ \
85 +        @MPI_LIB@ \
86 +        @MPI_F90_LIB@
87 +
88 + OopseHome       = @OOPSE_HOME@
89 + ForceParamDir   = @OOPSE_HOME@/share/forceFields/
90 + SampleSimDir    = @OOPSE_HOME@/share/samples/
91 + BinDir          = @OOPSE_HOME@/bin
92 + DocDir          = @OOPSE_HOME@/doc
93 + FrcDeclare      = -DFRC_PATH="$(ForceParamDir)"
94 + F90Declare      = -D__FORTRAN90
95 + ParallelDeclare = -DIS_MPI
96 + UseMPI          = @USE_MPI@
97 + ModuleCase      = @F90_MODULE_NAMES@
98 + ModSuffix       = @MOD@
99 + LinkOptions = \
100 +        @F90LIBS@
101 +
102 + ParallelLinkOptions = \
103 +        @F90LIBS@
104 +
105 +
106   #---------------------------------------------------------------------------
107   #
108   #  Directories
109   #
110   #---------------------------------------------------------------------------
111  
84 srcdir = @srcdir@
112   SourceDir         = $(DEV_ROOT)/src
113   TargetDir         = $(DEV_ROOT)/obj
114   ParallelTargetDir = $(DEV_ROOT)/MPIobj
# Line 90 | Line 117 | CurrentDir        = $(CURDIR)
117   BinDir            = $(DEV_ROOT)/bin
118   DocsDir           = $(DEV_ROOT)/docs
119   CurrentDir        = $(CURDIR)
120 + CombinedStaticLib = $(LibDir)/libOOPSE.a
121 + CombinedParallelStaticLib = $(LibDir)/libOOPSE_MPI.a
122  
123   ifdef Source
124   #get the relative path of current package to source directory
# Line 104 | Line 133 | PackageList              = $(Packages) $(JavaPackages)
133   PackageParallelTargetDir = $(ParallelTargetDir)
134   JavaMainClass            = $(subst /,.,$(Package)).$(Main)
135   else
136 < PackageList              = $(Packages) $(JavaPackages)
136 > PackageList              = $(PackageLibs) $(JavaPackages) $(Applications)
137   endif
138  
139   PackageListLoop          = $(patsubst %,$(SourceDir)/%/.loop,$(PackageList))
# Line 155 | Line 184 | ObjectFiles            = $(CFiles:%.c=        $(Packag
184   JniHeaders             = $(JniSource:%.java=  $(PackageSourceDir)/%.h)
185   ObjectFiles            = $(CFiles:%.c=        $(PackageTargetDir)/%.o)\
186                           $(CppFiles:%.cpp=    $(PackageTargetDir)/%.o)\
187 <                                     $(FortranFiles:%.f=  $(PackageTargetDir)/%.o)\
188 <                                     $(F90Files:%.F90=    $(PackageTargetDir)/%.o)\
189 <                                     $(LexFiles:%.l=      $(PackageTargetDir)/%.o)\
190 <                                     $(YaccFiles:%.y=     $(PackageTargetDir)/%.o)
187 >                         $(FortranFiles:%.f=  $(PackageTargetDir)/%.o)\
188 >                         $(F90Files:%.F90=    $(PackageTargetDir)/%.o)\
189 >                         $(LexFiles:%.l=      $(PackageTargetDir)/%.o)\
190 >                         $(YaccFiles:%.y=     $(PackageTargetDir)/%.o)
191   ParallelObjectFiles    = $(CFiles:%.c=        $(PackageParallelTargetDir)/%.o)\
192 <                                     $(CppFiles:%.cpp=    $(PackageParallelTargetDir)/%.o)\
193 <                                     $(FortranFiles:%.f=  $(PackageParallelTargetDir)/%.o)\
194 <                                     $(F90Files:%.F90=    $(PackageParallelTargetDir)/%.o)\
195 <                                     $(LexFiles:%.l=      $(PackageParallelTargetDir)/%.o)\
196 <                                     $(YaccFiles:%.y=     $(PackageParallelTargetDir)/%.o)
192 >                         $(CppFiles:%.cpp=    $(PackageParallelTargetDir)/%.o)\
193 >                         $(FortranFiles:%.f=  $(PackageParallelTargetDir)/%.o)\
194 >                         $(F90Files:%.F90=    $(PackageParallelTargetDir)/%.o)\
195 >                         $(LexFiles:%.l=      $(PackageParallelTargetDir)/%.o)\
196 >                         $(YaccFiles:%.y=     $(PackageParallelTargetDir)/%.o)
197  
198   DerivedSource          = $(YaccFiles:%.y=    %.h) \
199 <                               $(YaccFiles:%.y=    %.c) \
200 <                               $(LexFiles:%.l=     %.c)
199 >                         $(YaccFiles:%.y=    %.c) \
200 >                         $(LexFiles:%.l=     %.c)
201  
202   DerivedCFiles          = $(YaccFiles:%.y=    %.c) \
203 <                               $(LexFiles:%.l=     %.c)
203 >                         $(LexFiles:%.l=     %.c)
204  
205   OtherTargetFiles       = $(OtherSourceFiles:%=$(PackageTargetDir)/%)
206  
# Line 190 | Line 219 | ifneq  "$(words $(ObjectFiles) $(ParallelObjectFiles))
219      Executable             = $(BinDir)/$(Main)
220      ParallelExecutable     = $(BinDir)/$(Main)_MPI
221    else
222 <    SharedLibrary          = $(LibDir)/lib$(subst /,,$(Package)).so
223 <    StaticLibrary          = $(LibDir)/lib$(subst /,,$(Package)).a
224 <    ParallelSharedLibrary  = $(LibDir)/lib$(subst /,,$(Package))_MPI.so
225 <    ParallelStaticLibrary  = $(LibDir)/lib$(subst /,,$(Package))_MPI.a
222 >    SharedLibrary          = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package)))_UP.so
223 >    StaticLibrary          = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package)))_UP.a
224 >    ParallelSharedLibrary  = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package)))_MPI.so
225 >    ParallelStaticLibrary  = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package)))_MPI.a
226    endif
227   endif
228 +
229   #
230   # Misc
231   #
# Line 203 | Line 233 | LocalLibs        = $(subst /,,$(PackageLibs))
233   JavaPackageNames = $(subst /,.,$(JavaPackages))
234   IncludePath      = -I$(SourceDir) $(IncludeDirs:%=-I%)
235   LibDirs          = -L$(LibDir)    $(LibraryDirs:%=-L%)
236 < LocalLibs        = $(subst /,,$(PackageLibs))
237 < LibList          = $(LocalLibs:%=-l%) $(Libraries:%=-l%)
236 > LocalLibs        = $(subst /,,$(patsubst %, oopse_%_UP, $(PackageLibs)))
237 > ParallelLocalLibs= $(subst /,,$(patsubst %, oopse_%_MPI, $(PackageLibs)))
238 > LibList          = $(LocalLibs:%=-l%) $(Libraries)
239 > LibNames         = $(LocalLibs:%=$(LibDir)/lib%.a)
240 > ParallelLibList  = $(ParallelLocalLibs:%=-l%) $(Libraries)
241 > ParallelLibNames = $(ParallelLocalLibs:%=$(LibDir)/lib%.a)
242  
243  
244   #---------------------------------------------------------------------------
# Line 222 | Line 256 | MakeDir                = @MKINSTALLDIRS@
256   Install                = @INSTALL@
257   InstallProgram         = @INSTALL_PROGRAM@
258   InstallData            = @INSTALL_DATA@
259 < MakeDir                = @MKINSTALLDIRS@
259 > MkDir                = @MKINSTALLDIRS@
260   Delete                 = rm -fr
261   StaticArchiver         = @AR@
262   DynamicArchiver        = @CC@
# Line 240 | Line 274 | Lex                    = @LEX@
274   List                   = cat
275   Yacc                   = @YACC@
276   Lex                    = @LEX@
277 + Ranlib                 = @RANLIB@
278 + Doxygen                = @DOXYGEN@
279  
280 <
245 < MakeOptions            = -k -s
280 > MakeOptions            = -k
281   MakeDependOptions      =
282   StaticArchiverOptions  = rc
283   DynamicArchiverOptions = -shared
# Line 250 | Line 285 | FortranOptions         =
285   JniOptions             =
286   RmiOptions             = -d $(TargetDir) -classpath $(ClassPath) \
287                           -sourcepath $(SourceDir)
288 + COptions               = $(FrcDeclare)
289 + CParallelOptions       = $(FrcDeclare) $(ParallelDeclare)
290 + CppOptions             = $(FrcDeclare)
291 + CppParallelOptions     = $(FrcDeclare) $(ParallelDeclare)
292   FortranOptions         =
293 < F90Options             =  -I$(SourceDir) -module $(TargetDir)
293 > F90Options             =  @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) -module $(TargetDir)
294 > F90ParallelOptions     =  @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) -module $(ParallelTargetDir)  @PREPDEFFLAG@$(ParallelDeclare)
295   JavaCompilerOptions    = -d $(TargetDir) -classpath $(ClassPath) \
296                           -sourcepath $(SourceDir) -deprecation
297   JavaRunOptions         = -classpath $(ClassPath)
# Line 277 | Line 317 | Space                  = $(Empty) $(Empty)
317  
318   #---------------------------------------------------------------------------
319   #
320 + #  Install
321 + #
322 + #---------------------------------------------------------------------------
323 +
324 + ifneq "$(words $(SampleFiles))" "0"
325 + MySample                 = $(subst $(shell cd $(DEV_ROOT)/samples; pwd)/,,$(CurrentDir))
326 + MyInstallDir             = $(SampleSimDir)/$(MySample)
327 + InstallFiles             = $(SampleFiles)
328 + InstallCommand           = $(InstallData)
329 + endif
330 +
331 + ifneq "$(words $(Main))" "0"
332 + MyInstallDir             = $(BinDir)/
333 + InstallFiles             = $(Executable) $(ParallelExecutable)
334 + InstallCommand           = $(InstallProgram)
335 + endif
336 +
337 + ifneq "$(words $(ForcefiledFiles))" "0"
338 + MyInstallDir             = $(ForceParamDir)
339 + InstallFiles             = $(ForcefiledFiles)/
340 + InstallCommand           = $(InstallData)
341 + endif
342 +
343 + ifneq "$(words $(InstallFiles))" "0"
344 +  InstallList            =
345 + else
346 +  InstallList            = $(patsubst %,$(DEV_ROOT)/%,$(Samples)) $(patsubst %, $(DEV_ROOT)/%,$(Forcefield)) $(patsubst %, $(SourceDir)/%,$(Applications))
347 + endif
348 +
349 + InstallListLoop          = $(patsubst %,$(SourceDir)/%/.install,$(PackageList))  $(patsubst %,%/.install,$(InstallList))
350 +
351 +
352 +
353 + #---------------------------------------------------------------------------
354 + #
355   # Rules
356   #
357   #---------------------------------------------------------------------------
# Line 292 | Line 367 | $(PackageTargetDir)/%.o : %.c
367   # .c -> .o
368   $(PackageTargetDir)/%.o : %.c
369          $(Print) $@
370 <        $(Print) $(CCompiler) $(COptions) -c $(IncludePath) $< -o $@
296 <        @$(CCompiler) $(COptions) -c $(IncludePath) $< -o $@
370 >        $(CCompiler) $(COptions) -c $(IncludePath) $< -o $@
371  
372 + $(PackageParallelTargetDir)/%.o : %.c
373 +        $(Print) $@
374 +        $(CCompiler) $(CParallelOptions) -c $(IncludePath) $< -o $@
375 +
376 + ifeq "$(UseMPI)" "yes"
377   %.o : %.c
378          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
379 +        $(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@
380 + else
381 + %.o : %.c
382 +        $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
383 + endif
384  
385   # .cpp -> .o
386   $(PackageTargetDir)/%.o : %.cpp
303        $(Print) $@
304        $(Print) $(CppCompiler) $(CppOptions) -c $(IncludePath) $< -o $@
387          $(CppCompiler) $(CppOptions) -c $(IncludePath) $< -o $@
388  
389 + $(PackageParallelTargetDir)/%.o : %.cpp
390 +        $(CppCompiler) $(CppParallelOptions) -c $(IncludePath) $< -o $@
391 +
392 + ifeq "$(UseMPI)" "yes"
393 + %.o : %.cpp
394 +        $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
395 +        $(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@
396 + else
397   %.o : %.cpp
398          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
399 + endif
400  
401   # .f -> .o
402   $(PackageTargetDir)/%.o : %.f
403 <        $(Print) $@
313 <        $(Print) $(FortranCompiler) $(FortranOptions) -c $< -o $@
314 <        @$(FortranCompiler) $(FortranOptions) -c $< -o $@
403 >        $(FortranCompiler) $(FortranOptions) -c $< -o $@
404  
405 + $(PackageParallelTargetDir)/%.o : %.f
406 +        $(FortranCompiler) $(FortranParallelOptions) -c $< -o $@
407 +
408 + ifeq "$(UseMPI)" "yes"
409   %.o : %.f
410          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
411 +        $(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@
412 + else
413 + %.o : %.f
414 +        $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
415 + endif
416  
417   # .F90 -> .o
418   $(PackageTargetDir)/%.o : %.F90
419 <        $(Print) $@
322 <        $(Print) $(F90Compiler) $(F90Options) -c $< -o $@
323 <        @$(F90Compiler) $(F90Options) -c $< -o $@
419 >        $(F90Compiler) $(F90Options) $(IncludePath) -c $< -o $@
420  
421 + $(PackageParallelTargetDir)/%.o : %.F90
422 +        $(F90Compiler) $(F90ParallelOptions) $(IncludePath) -c $< -o $@
423 +
424 + ifeq "$(UseMPI)" "yes"
425   %.o : %.F90
426          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
427 +        $(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@
428 + else
429 + %.o : %.F90
430 +        $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
431 + endif
432  
433 +
434   # .java -> .class
435   $(PackageTargetDir)/%.class : $(PackageSourceDir)/%.java
436 <        $(Print) $@
331 <        $(Print) $(JavaCompiler) $(JavaCompilerOptions) $<
332 <        @$(JavaCompiler) $(JavaCompilerOptions) $<
436 >        $(JavaCompiler) $(JavaCompilerOptions) $<
437  
438   %.class : $(PackageSourceDir)/%.java
439          @$(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
440  
441   # .class -> .h
442   $(PackageSourceDir)/%.h : $(PackageTargetDir)/%.class
339        $(Print) $@
340        $(Print) $(JniCompiler) $(JniOptions) $(JavaPackageName).$*
443          $(JniCompiler) $(JniOptions) $(JavaPackageName).$*
444  
445   %.h : %.class
# Line 345 | Line 447 | $(PackageSourceDir)/%.h : $(PackageTargetDir)/%.class
447  
448   #.y -> .h
449   %.h : %.y
450 <        $(Print) $@
349 <        $(Print) @$(Yacc) -d $?
350 <        @$(Yacc) -d  $?
450 >        $(Yacc) -d  $?
451          @$(Move) y.tab.h $*.h
452          @$(Delete) y.tab.c
453  
454   #.y -> .c
455   %.c : %.y
456 <        $(Print) $@
357 <        $(Print) $(Yacc) -d $?
358 <        @$(Yacc) -d  $?
456 >        $(Yacc) -d  $?
457          @$(Move) y.tab.c $*.c
458          @$(Delete) y.tab.h
459  
# Line 366 | Line 464 | $(LibDir)/%.a : $(ObjectFiles)
464          @$(Lex) -o$@ $?
465  
466   # .o -> .a
369 $(LibDir)/%.a : $(ObjectFiles)
370        $(Print) $@
371        $(Print) $(StaticArchiver) $(StaticArchiverOptions) $@ $(ObjectFiles)
372        @$(StaticArchiver) $(StaticArchiverOptions) $@ $(ObjectFiles)
467  
468 < %.a : $(ObjectFiles)
469 <        $(MAKE) $(MakeOptions) $(LibDir)/$@
468 > $(LibDir)/%_UP.a : $(ObjectFiles)
469 >        $(StaticArchiver) $(StaticArchiverOptions) $@ $(ObjectFiles)
470 >        @touch $(LibDir)/.stamp_UP
471  
472 < $(LibDir)/%_MPI.a : $(ParallelObjectFiles)
473 <        $(Print) $@
474 <        $(Print) $(StaticArchiver) $(StaticArchiverOptions) $@ $(ParallelObjectFiles)
380 <        @$(StaticArchiver) $(StaticArchiverOptions) $@ $(ParallelObjectFiles)
472 > $(LibDir)/%_MPI.a: $(ParallelObjectFiles)
473 >        $(StaticArchiver) $(StaticArchiverOptions) $@ $(ParallelObjectFiles)
474 >        @touch $(LibDir)/.stamp_MPI
475  
476 + %_UP.a : $(ObjectFiles)
477 +        $(MAKE) $(MakeOptions) $(LibDir)/$@
478 +
479   %_MPI.a : $(ParallelObjectFiles)
480          $(MAKE) $(MakeOptions) $(LibDir)/$@
481  
482   # .o -> .so
483 < $(LibDir)/%.so : $(ObjectFiles)
387 <        $(Print) $@    
388 <        $(Print) $(DynamicArchiver) $(ObjectFiles) $(DynamicArchiverOptions) -o $@
483 > $(LibDir)/%_UP.so : $(ObjectFiles)
484          $(DynamicArchiver) $(ObjectFiles) $(DynamicArchiverOptions) -o $@
485  
391 %.so : $(ObjectFiles)
392        $(MAKE) $(MakeOptions) $(LibDir)/$@
393
486   $(LibDir)/%_MPI.so : $(ParallelObjectFiles)
395        $(Print) $@    
396        $(Print) $(DynamicArchiver) $(ParallelObjectFiles) $(DynamicArchiverOptions) -o $@
487          $(DynamicArchiver) $(ParallelObjectFiles) $(DynamicArchiverOptions) -o $@
488  
489 + %_UP.so : $(ObjectFiles)
490 +        $(MAKE) $(MakeOptions) $(LibDir)/$@
491 +
492   %_MPI.so : $(ParallelObjectFiles)
493          $(MAKE) $(MakeOptions) $(LibDir)/$@
494  
495   # .class -> .jar
496   $(LibDir)/%.jar : $(JavaClassFiles) $(OtherTargetFiles)
497          $(Print) $@
405        $(Print) $(JavaArchiver) -cf $@ $(JavaClassFilesRel) $(OtherTargetFiles)
498          @cd $(TargetDir); $(JavaArchiver) -cf $@ \
499          $(JavaClassFilesRel) $(OtherTargetFiles)
500  
# Line 432 | Line 524 | $(PackageTargetDir)/%_Skel.class : $(PackageTargetDir)
524   %_Skel.class : %.class
525          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
526  
527 + document :
528 +        $(Print) Generate Documentation for OOPSE-2.0
529 +        @cd $(DEV_ROOT)/src    
530 +        $(Doxygen) $(DEV_ROOT)/make/Doxyfile
531 +
532 + #GUN make funtions to merge the libraries
533 + find_objs = $(shell $(StaticArchiver) -t $(1))
534 + extract_objs = $(shell $(StaticArchiver) -x $(1) $(call find_objs, $(1)))
535 + create_archive = $(shell  $(StaticArchiver) $(StaticArchiverOptions) $(2) $(call find_objs, $(1)))
536 + remove_objs = $(shell $(Delete) $(call find_objs, $(1)))
537 + do_create = $(call extract_objs,$(1))$(call create_archive,$(1),$(2))$(call remove_objs,$(1))  
538 +
539 + $(CombinedStaticLib) : $(LibDir)/.stamp_UP
540 +        $(Print) create $@      
541 +        $(foreach thisLib,$(LibNames),$(call do_create,$(thisLib),$@))
542 +        $(Ranlib) $(CombinedStaticLib)
543 +
544 + $(CombinedParallelStaticLib) : $(LibDir)/.stamp_MPI
545 +        $(Print) create $@
546 +        $(foreach thisLib,$(ParallelLibNames), $(call do_create, $(thisLib), $@))
547 +        $(Ranlib) $(CombinedParallelStaticLib)
548 +
549   # Executable
550 < $(Executable) : $(ObjectFiles)
551 <        $(Print) $@
438 <        $(Print) $(Linker) $(LinkOptions) $(LibDirs) $(LibList) $(ObjectFiles) -o $@
439 <        $(Linker) $(LinkOptions) $(LibDirs) $(LibList) $(ObjectFiles) -o $@
550 > $(Executable) : $(CombinedStaticLib) $(ObjectFiles)
551 >        $(Linker) $(ObjectFiles) $(LinkOptions) $(LibDirs) $(CombinedStaticLib) $(Libraries) -o $@
552  
553 < $(ParallelExecutable) : $(ParallelObjectFiles)
554 <        $(Print) $@
443 <        $(Print) $(Linker) $(LinkOptions) $(LibDirs) $(LibList) $(ParallelObjectFiles) -o $@
444 <        $(Linker) $(LinkOptions) $(LibDirs) $(LibList) $(ParallelObjectFiles) -o $@
553 > $(ParallelExecutable) : $(CombinedParallelStaticLib) $(ParallelObjectFiles)
554 >        $(Linker) $(ParallelObjectFiles) $(ParallelLinkOptions) $(LibDirs) $(CombinedParallelStaticLib) $(Libraries) -o $@
555  
556   # Anything else is just copied from source to target
557   $(PackageTargetDir)/% : $(PackageSourceDir)/%
# Line 454 | Line 564 | _buildall : \
564  
565   _all : _buildall
566  
567 + _buildall :
568 + ifeq "$(UseMPI)" "yes"
569   _buildall : \
570          $(DependencyFile) \
571          $(PackageTargetDir) \
572          $(ObjectFiles) \
573 +        $(ParallelObjectFiles) \
574          $(JavaClassFiles) \
575          $(RmiStubFiles) \
576          $(RmiSkeletonFiles) \
577          $(OtherTargetFiles) \
465        $(SharedLibrary) \
578          $(StaticLibrary) \
579 +        $(ParallelStaticLibrary) \
580          $(JarFile) \
581 <        $(Executable)
581 >        $(Executable) \
582 >        $(ParallelExecutable)
583 > else
584 > _buildall : \
585 >        $(DependencyFile) \
586 >        $(PackageTargetDir) \
587 >        $(ObjectFiles) \
588 >        $(JavaClassFiles) \
589 >        $(RmiStubFiles) \
590 >        $(RmiSkeletonFiles) \
591 >        $(OtherTargetFiles) \
592 >        $(StaticLibrary) \
593 >        $(JarFile) \
594 >        $(Executable)
595 > endif
596  
597  
598   # make clean
# Line 473 | Line 600 | _cleanall :
600          $(Print) Done clean.    
601  
602   _cleanall :
603 <        $(Delete) $(PackageTargetDir)/* \
604 <                  $(JarFile) \
603 >        $(Delete) $(ObjectFiles) $(ParallelObjectFiles)
604 >
605 > # make distclean
606 > distclean : $(PackageListLoop)
607 >        $(Print) Done clean.    
608 >
609 > _distcleanall :
610 >        $(Delete) $(ObjectFiles) \
611 >                  $(ParallelObjectFiles) \
612 >                        $(JarFile) \
613                    $(SharedLibrary) \
614                    $(StaticLibrary) \
615 +                  $(ParallelSharedLibrary) \
616 +                  $(ParallelStaticLibrary) \
617                    $(Executable) \
618 <                  $(DependencyFile)
618 >                  $(ParallelExecutable) \
619 >                  $(DependencyFile)
620  
621  
622   # make depend
# Line 491 | Line 629 | $(DependencyFile) : $(DerivedSource)
629          $(Print) $@
630          @cd $(PackageSourceDir)
631  
494        touch Make.ctemp
495        touch Make.ctemp
496
632   ifneq "$(words $(CppFiles))" "0"
633 <        $(Print) Make dependencies for $(CppFiles)
634 <        $(Print) $(CppCompiler) $(IncludePath) -MM $(CppFiles)  > Make.cpptemp
635 <        $(CppCompiler) $(IncludePath) -MM $(CppFiles)  > Make.cpptemp
636 <        cat Make.cpptemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/obj\/&/g' >> $(DependencyFile)
637 <        cat Make.cpptemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/MPIobj\/&/g' >> $(DependencyFile)
633 >        $(CppCompiler) $(CppOptions) $(IncludePath) -MM $(CppFiles) > Make.cpptemp
634 >        @cat Make.cpptemp | sed 's/^[a-zA-Z0-9]/$$\(TargetDir\)\/&/g' >> $(DependencyFile)
635 >        $(Delete) Make.cpptemp
636 >        $(CppCompiler) $(CppParallelOptions) $(IncludePath) -MM $(CppFiles) > Make.cpptemp
637 >        @cat Make.cpptemp | sed 's/^[a-zA-Z0-9]/$$\(ParallelTargetDir\)\/&/g' >> $(DependencyFile)
638 >        @$(Delete) Make.cpptemp
639   endif
640  
641   ifneq "$(words $(CFiles))" "0"
642 <        $(Print) Make dependencies for $(CFiles)
643 <        $(Print) $(CCompiler)   $(IncludePath) -MM $(CFiles) $(DerivedCFiles)   > Make.ctemp
644 <        $(CCompiler)   $(IncludePath) -MM $(CFiles) $(DerivedCFiles)   > Make.ctemp
645 <        cat Make.ctemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/obj\/&/g' >> $(DependencyFile)
646 <        cat Make.ctemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/MPIobj\/&/g' >> $(DependencyFile)
647 <
642 >        $(CCompiler) $(COptions) $(IncludePath) -MM $(CFiles) $(DerivedCFiles) > Make.ctemp
643 >        @cat Make.ctemp | sed 's/^[a-zA-Z0-9]/$$\(TargetDir\)\/&/g' >> $(DependencyFile)
644 >        $(Delete) Make.ctemp
645 >        $(CCompiler) $(CParallelOptions) $(IncludePath) -MM $(CFiles) $(DerivedCFiles) > Make.ctemp
646 >        @cat Make.ctemp | sed 's/^[a-zA-Z0-9]/$$\(ParallelTargetDir\)\/&/g' >> $(DependencyFile)
647 >        @$(Delete) Make.ctemp
648   endif
649  
650   ifneq "$(words $(F90Files))" "0"
651 <        $(Print) Make dependencies for $(F90Files)
652 <        $(DEV_ROOT)/scripts/sfmakedepend  -I $(DEV_ROOT)/src -d '$$(DEV_ROOT)/obj' -f ./Make.ftemp -h *.F90
653 <        cat Make.ftemp >> $(DependencyFile)
651 >        $(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
653 >        @cat Make.ftemp >> $(DependencyFile)
654 >        @$(Delete) Make.ftemp
655   endif
519        $(Delete) Make.cpptemp Make.ctemp Make.ftemp
656  
657   # make lib
658   lib    : $(PackageListLoop)
# Line 529 | Line 665 | jarsign : $(JarFile)
665   jarsign : $(JarFile)
666          $(JarSigner) -keystore GeoSoftKeystore $(JarFile) myself
667  
668 + #make install
669 + %.install :
670 +        @$(MAKE) $(MakeOptions) -C $(subst .install,,$@) _installall    
671 +
672 + install : $(InstallListLoop)
673 +        $(Print) Done Install
674 +
675 + _installall : _buildall _installdata
676 +
677 + $(MyInstallDir) :
678 +        $(MkDir) $@
679 +
680 + _installdata :  $(MyInstallDir)
681 +        $(Print) $(InstallFiles)
682 + ifneq "$(words $(InstallFiles))" "0"
683 +        $(InstallData) $(InstallFiles) $(MyInstallDir)
684 + endif      
685 +
686 + _installprogram:
687 +        
688   # make statistics
689   _statisticsall :
690 <        @$(Print) $(SourceFiles) >> $(DEV_ROOT)/files.tmp
690 >        @$(Print) $(patsubst %,$(CurrentDir)/%,$(SourceFiles)) >> $(DEV_ROOT)/files.tmp
691  
692   statistics : $(PackageListLoop)
693          @$(List) $(DEV_ROOT)/files.tmp | xargs $(WordCount) $(WordCountOptions)
# Line 545 | Line 701 | pure : $(Executable).pure
701  
702   pure : $(Executable).pure
703  
704 + #make cvslog
705 + cvslog:
706 +        $(DEV_ROOT)/scripts/cvs2cl.pl
707 +
708   # Execute
709   _runexe :
710          $(Executable) $(RunParameters)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines