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 2158 by gezelter, Mon Apr 11 19:06:57 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 +
55 + #packages containing applications
56 + Applications = \
57          applications/oopse \
58          applications/dump2Xyz \
59 <        applications/simpleBuilder \
59 >        applications/simpleBuilder\
60 >        applications/staticProps \
61 >        applications/dynamicProps \
62  
63 < #packages contain libraries
64 < PackageLibs = \
65 <        utils \
66 <        math \
67 <        types \
68 <        primitives \
69 <        visitors \
70 <        UseTheForce/DarkSide \
71 <        UseTheForce \
72 <        brains \
73 <        io \
74 <        integrators \
75 <        minimizers \
70 <        constraints \
71 <        profiling \
72 <        restraints \
63 > Samples = \
64 >        samples/argon \
65 >        samples/water/dimer \
66 >        samples/water/spce \
67 >        samples/water/ssd \
68 >        samples/water/ssde \
69 >        samples/water/tip3p_ice \
70 >        samples/water/tip4p \
71 >        samples/lipid \
72 >        samples/alkane \
73 >        samples/minimizer \
74 >        samples/metals \
75 >        samples/zcons \
76  
77   IncludeDirs = \
75        @SPRNG_INC_DIR@ \
78          @MPI_INC_DIR@
79  
80   LibraryDirs = \
79        @SPRNG_LIB_DIR@ \
81          @MPI_LIB_DIR@
82  
83   Libraries = \
83        @SPRNG_LIB@ \
84          @MPI_LIB@ \
85          @MPI_F90_LIB@
86  
87   OopseHome       = @OOPSE_HOME@
88 < ForceParamDir   = @OOPSE_HOME@/share/forceFields/
89 < SampleSimDir    = @OOPSE_HOME@/share/samples/
88 > ForceParamDir   = $(OopseHome)/share/forceFields
89 > SampleSimDir    = $(OopseHome)/share/samples
90 > InstallBinDir   = $(OopseHome)/bin
91 > DocDir          = $(OopseHome)/doc
92   FrcDeclare      = -DFRC_PATH="$(ForceParamDir)"
93 + F90Declare      = -D__FORTRAN90
94   ParallelDeclare = -DIS_MPI
95   UseMPI          = @USE_MPI@
96 + ModuleCase      = @F90_MODULE_NAMES@
97 + ModSuffix       = @MOD@
98 + LinkOptions = \
99 +        @F90LIBS@
100  
101 + ParallelLinkOptions = \
102 +        @F90LIBS@
103 +
104 +
105   #---------------------------------------------------------------------------
106   #
107   #  Directories
# Line 101 | Line 112 | ParallelLibDir    = $(DEV_ROOT)/MPIlib
112   TargetDir         = $(DEV_ROOT)/obj
113   ParallelTargetDir = $(DEV_ROOT)/MPIobj
114   LibDir            = $(DEV_ROOT)/lib
104 ParallelLibDir    = $(DEV_ROOT)/MPIlib
115   MakeDir           = $(DEV_ROOT)/make
116   BinDir            = $(DEV_ROOT)/bin
117   DocsDir           = $(DEV_ROOT)/docs
118   CurrentDir        = $(CURDIR)
119 < RPath = $(shell cd $(DEV_ROOT); pwd)/lib:$(OopseHome)/lib
120 < ParallelRPath = $(shell cd $(DEV_ROOT); pwd)/MPIlib:$(OopseHome)/MPIlib
111 < LinkOptions = \
112 <        @F90LIBS@ \
113 <        -Wl,-R$(RPath)
119 > CombinedStaticLib = $(LibDir)/libOOPSE.a
120 > CombinedParallelStaticLib = $(LibDir)/libOOPSE_MPI.a
121  
115 ParallelLinkOptions = \
116        @F90LIBS@ \
117        -Wl,-R$(ParallelRPath)
118
122   ifdef Source
123   #get the relative path of current package to source directory
124   # /home/maul/gezelter/src/code/src/UseTheForce/Darkside --> UseTheForce/Darkside
125   #Package          = $(shell echo $(CurrentDir) | sed -e 's/^.*\/src\/\(.*\)/\1/g')
126   #use shell script to get the absolute path and then rip it off from $(CurrentDir)
127 < Package          = $(subst $(shell cd $(SourceDir); pwd)/,,$(CurrentDir))
127 > #Package          = $(subst $(shell cd $(SourceDir); pwd)/,,$(CurrentDir))
128 > # REMINDER: We are now using the Package line in each subdir makefile.
129 > # This avoids the strange path problem and the subshell
130  
131   PackageList              = $(Package)
132   PackageSourceDir         = $(SourceDir)/$(Package)
# Line 129 | Line 134 | PackageList              = $(Packages) $(JavaPackages)
134   PackageParallelTargetDir = $(ParallelTargetDir)
135   JavaMainClass            = $(subst /,.,$(Package)).$(Main)
136   else
137 < PackageList              = $(Packages) $(JavaPackages)
137 > PackageList              = $(PackageLibs) $(JavaPackages) $(Applications)
138   endif
139  
140   PackageListLoop          = $(patsubst %,$(SourceDir)/%/.loop,$(PackageList))
# Line 200 | Line 205 | ThirdPartyJarsTmp = $(patsubst %,$(LibDir)/%,$(JavaLib
205  
206   OtherTargetFiles       = $(OtherSourceFiles:%=$(PackageTargetDir)/%)
207  
208 + ###########################################################################
209 + #
210 + # Figure out the names of the module files based on some work done by
211 + # configure.  The tr function below is from John Graham-Cumming
212 + # (http://www.jgc.org).
213 + #
214 + # The tr function.   Has three arguments:
215 + #
216 + # $1   The list of characters to translate from
217 + # $2   The list of characters to translate to
218 + # $3   The text to translate
219 + #
220 + # For example, $(call tr,A B C,1 2 3,CAPITAL) becomes 21PIT1L.
221 +
222 + tr = $(eval __t := $3)                                                    \
223 +     $(foreach c,                                                         \
224 +         $(join $(addsuffix :,$1),$2),                                    \
225 +         $(eval __t :=                                                    \
226 +             $(subst $(word 1,$(subst :, ,$c)),$(word 2,$(subst :, ,$c)), \
227 +                 $(__t))))$(__t)
228 +
229 + # Common character classes for use with the tr function.  Each of
230 + # these is actually a variable declaration and must be wrapped with
231 + # $() or ${} to be used.
232 +
233 + [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 #
234 + [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 #
235 + [0-9] := 0 1 2 3 4 5 6 7 8 9 #
236 + [A-F] := A B C D E F #
237 +
238 + # Figure out whether we have $(eval) or not (GNU Make 3.80 and above)
239 + # if we do not then we need to use the shell version of tr, and not the
240 + # faster tr function above:
241 +
242 + __have_eval := $(false)
243 + __ignore := $(eval __have_eval := $(true))
244 +
245 + ifndef __have_eval
246 +  uc = $(shell echo $1 | tr "A-Z" "a-z")
247 +  lc = $(shell echo $1 | tr "A-Z" "a-z")
248 + else
249 +  uc = $(call tr,$([a-z]),$([A-Z]),$1)
250 +  lc = $(call tr,$([A-Z]),$([a-z]),$1)
251 + endif
252 +
253 + # OK, now we can actually use these functions to figure out the names
254 + # of the module files:
255 +
256 + ifneq "$(words $(Modules))" "0"
257 + ifeq "$(ModuleCase)" "UPPER"
258 +  MODULES = $(call uc,$(Modules))
259 + else
260 +  ifeq "$(ModuleCase)" "lower"
261 +    MODULES = $(call lc,$(Modules))
262 +  else
263 +    MODULES = $(Modules)
264 +  endif
265 + endif
266 +  ModuleFiles = $(MODULES:%= $(PackageTargetDir)/%.$(ModSuffix))
267 +  ParallelModuleFiles = $(MODULES:%= $(PackageParallelTargetDir)/%.$(ModSuffix))
268 + endif
269 + #
270 + ###########################################################################
271 +
272   ThirdPartyJarsTmp = $(patsubst %,$(LibDir)/%,$(JavaLibraries))
273   ThirdPartyJars    = $(subst $(Space),$(X),$(ThirdPartyJarsTmp))
274  
# Line 211 | Line 280 | ifneq  "$(words $(ObjectFiles) $(ParallelObjectFiles))
280   #if Main is defined, do not build library. It may not be true sometimes
281   ifneq  "$(words $(ObjectFiles) $(ParallelObjectFiles))" "0"
282    DependencyFile    = $(PackageSourceDir)/Makedepend
283 <  ifneq "$(Main)" ""
283 >  ifneq "$(words $(Main))" "0"
284      Executable             = $(BinDir)/$(Main)
285 <    ParallelExecutable     = $(BinDir)/$(Main)_MPI
285 >    ifeq "$(BuiltParallelExe)" "1"
286 >      ParallelExecutable     = $(BinDir)/$(Main)_MPI
287 >    endif
288    else
289 <    SharedLibrary          = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package))).so
290 <    StaticLibrary          = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package))).a
291 <    ParallelSharedLibrary  = $(ParallelLibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package))).so
292 <    ParallelStaticLibrary  = $(ParallelLibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package))).a
289 >    SharedLibrary          = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package)))_UP.so
290 >    StaticLibrary          = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package)))_UP.a
291 >    ParallelSharedLibrary  = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package)))_MPI.so
292 >    ParallelStaticLibrary  = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package)))_MPI.a
293    endif
294   endif
295 +
296   #
297   # Misc
298   #
# Line 228 | Line 300 | ParallelLibDirs  = -L$(ParallelLibDir)  $(LibraryDirs:
300   JavaPackageNames = $(subst /,.,$(JavaPackages))
301   IncludePath      = -I$(SourceDir) $(IncludeDirs:%=-I%)
302   LibDirs          = -L$(LibDir)    $(LibraryDirs:%=-L%)
303 < ParallelLibDirs  = -L$(ParallelLibDir)  $(LibraryDirs:%=-L%)
304 < LocalLibs        = $(subst /,,$(patsubst %, oopse_%, $(PackageLibs)))
233 < ParallelLocalLibs= $(subst /,,$(patsubst %, oopse_%, $(PackageLibs)))
303 > LocalLibs        = $(subst /,,$(patsubst %, oopse_%_UP, $(PackageLibs)))
304 > ParallelLocalLibs= $(subst /,,$(patsubst %, oopse_%_MPI, $(PackageLibs)))
305   LibList          = $(LocalLibs:%=-l%) $(Libraries)
306 + LibNames         = $(LocalLibs:%=$(LibDir)/lib%.a)
307   ParallelLibList  = $(ParallelLocalLibs:%=-l%) $(Libraries)
308 + ParallelLibNames = $(ParallelLocalLibs:%=$(LibDir)/lib%.a)
309  
310  
311   #---------------------------------------------------------------------------
# Line 241 | Line 314 | Move                   = mv
314   #
315   #---------------------------------------------------------------------------
316   Print                  = @echo
317 < Move                   = mv
317 > Move                   = mv -f
318   Copy                   = cp
319   CCompiler              = @CC@
320   CppCompiler            = @CXX@
321   Linker                 = @CXX@
322   MakeDepend             = makedepend
323 < Install                = @INSTALL@
323 > INSTALL                = @INSTALL@
324   InstallProgram         = @INSTALL_PROGRAM@
325 + InstallScript          = @INSTALL_SCRIPT@
326   InstallData            = @INSTALL_DATA@
327 < MakeDir                = @MKINSTALLDIRS@
327 > MkDir                  = @MKINSTALLDIRS@
328   Delete                 = rm -fr
329   StaticArchiver         = @AR@
330   DynamicArchiver        = @CC@
# Line 268 | Line 342 | Lex                    = @LEX@
342   List                   = cat
343   Yacc                   = @YACC@
344   Lex                    = @LEX@
345 + Ranlib                 = @RANLIB@
346 + Doxygen                = @DOXYGEN@
347  
272
348   MakeOptions            = -k
349   MakeDependOptions      =
350   StaticArchiverOptions  = rc
# Line 278 | Line 353 | COptions               = $(FrcDeclare)
353   JniOptions             =
354   RmiOptions             = -d $(TargetDir) -classpath $(ClassPath) \
355                           -sourcepath $(SourceDir)
356 < COptions               = $(FrcDeclare)
357 < CParallelOptions       = $(FrcDeclare) $(ParallelDeclare)
358 < CppOptions             = $(FrcDeclare)
359 < CppParallelOptions     = $(FrcDeclare) $(ParallelDeclare)
356 > COptions               = $(FrcDeclare) @CFLAGS@
357 > CParallelOptions       = $(FrcDeclare) $(ParallelDeclare) @CFLAGS@
358 > CppOptions             = $(FrcDeclare) @CXXFLAGS@ @OOPSE_TEMPLATE_FLAGS@
359 > CppParallelOptions     = $(FrcDeclare) $(ParallelDeclare) @CXXFLAGS@ @OOPSE_TEMPLATE_FLAGS@
360   FortranOptions         =
361 < F90Options             =  @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) -module $(TargetDir)
362 < F90ParallelOptions     =  @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) -module $(ParallelTargetDir)  @PREPDEFFLAG@$(ParallelDeclare)
361 > F90Options             =  @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) @MODDIRFLAG@$(TargetDir)
362 > F90ParallelOptions     =  @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) @MODDIRFLAG@$(ParallelTargetDir)  @PREPDEFFLAG@$(ParallelDeclare)
363   JavaCompilerOptions    = -d $(TargetDir) -classpath $(ClassPath) \
364                           -sourcepath $(SourceDir) -deprecation
365   JavaRunOptions         = -classpath $(ClassPath)
# Line 306 | Line 381 | Space                  = $(Empty) $(Empty)
381  
382   Empty                  =
383   Space                  = $(Empty) $(Empty)
384 +
385 +
386 + #---------------------------------------------------------------------------
387 + #
388 + #  Install
389 + #
390 + #---------------------------------------------------------------------------
391 +
392 + ifneq "$(words $(SampleFiles))" "0"
393 +  MySample                 = $(subst $(shell cd $(DEV_ROOT)/samples; pwd)/,,$(CurrentDir))
394 +  MyInstallDir             = $(SampleSimDir)/$(MySample)
395 +  InstallFiles             = $(SampleFiles)
396 +  InstallCommand           = $(InstallData)
397 + endif
398 +
399 + ifneq "$(words $(Main))" "0"
400 +  MyInstallDir             = $(InstallBinDir)
401 +  ifeq "$(UseMPI)" "yes"
402 +    InstallFiles             = $(Executable) $(ParallelExecutable)
403 +  else
404 +    InstallFiles             = $(Executable)
405 +  endif
406 +  InstallCommand           = $(InstallProgram)
407 + endif
408  
409 + ifneq "$(words $(ForcefieldFiles))" "0"
410 +  MyInstallDir             = $(ForceParamDir)
411 +  InstallFiles             = $(ForcefieldFiles)
412 +  InstallCommand           = $(InstallData)
413 + endif
414  
415 + ifneq "$(words $(InstallFiles))" "0"
416 +  InstallList            =
417 + else
418 +  InstallList            = $(patsubst %,$(DEV_ROOT)/%,$(Samples)) $(DEV_ROOT)/forceFields $(patsubst %, $(SourceDir)/%,$(Applications))
419 + endif
420 +
421 + InstallListLoop          = $(patsubst %,$(SourceDir)/%/.install,$(PackageList))  $(patsubst %,%/.install,$(InstallList))
422 +
423 +
424 +
425   #---------------------------------------------------------------------------
426   #
427   # Rules
# Line 320 | Line 434 | $(PackageTargetDir) :
434  
435   # Create target directory
436   $(PackageTargetDir) :
437 <        $(MakeDir) $@
437 >        $(MkDir) $@
438  
439 + $(BinDir) :
440 +        $(MkDir) $@
441 +
442   # .c -> .o
443   $(PackageTargetDir)/%.o : %.c
444          $(Print) $@
# Line 375 | Line 492 | $(PackageTargetDir)/%.o : %.F90
492   # .F90 -> .o
493   $(PackageTargetDir)/%.o : %.F90
494          $(F90Compiler) $(F90Options) $(IncludePath) -c $< -o $@
495 +        if test -n "`ls *.$(ModSuffix)`"; then \
496 +          $(Move) `ls *.$(ModSuffix)` $(PackageTargetDir);\
497 +        fi
498  
499   $(PackageParallelTargetDir)/%.o : %.F90
500          $(F90Compiler) $(F90ParallelOptions) $(IncludePath) -c $< -o $@
501 +        if test -n "`ls *.$(ModSuffix)`"; then \
502 +          $(Move) "`ls *.$(ModSuffix)`" $(PackageParallelTargetDir);\
503 +        fi
504  
505   ifeq "$(UseMPI)" "yes"
506   %.o : %.F90
507          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
508 +        if test -n "`ls *.$(ModSuffix)`"; then\
509 +          $(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\
510 +        fi
511 +
512          $(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@
513 +        if test -n "`ls *.$(ModSuffix)`"; then\
514 +          $(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\
515 +        fi
516 +
517   else
518   %.o : %.F90
519          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
520 +        if test -n "`ls *.$(ModSuffix)`"; then\
521 +          $(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\
522 +        fi
523   endif
524  
525  
# Line 423 | Line 557 | $(LibDir)/%.a : $(ObjectFiles)
557  
558   # .o -> .a
559  
560 < $(LibDir)/%.a : $(ObjectFiles)
560 > $(LibDir)/%_UP.a : $(ObjectFiles)
561          $(StaticArchiver) $(StaticArchiverOptions) $@ $(ObjectFiles)
562 +        @touch $(LibDir)/.stamp_UP
563  
564 < $(ParallelLibDir)/%.a: $(ParallelObjectFiles)
564 > $(LibDir)/%_MPI.a: $(ParallelObjectFiles)
565          $(StaticArchiver) $(StaticArchiverOptions) $@ $(ParallelObjectFiles)
566 +        @touch $(LibDir)/.stamp_MPI
567  
568 < ifeq "$(UseMPI)" "yes"
433 < %.a : $(ObjectFiles) $(ParallelObjectFiles)
568 > %_UP.a : $(ObjectFiles)
569          $(MAKE) $(MakeOptions) $(LibDir)/$@
570 <        $(MAKE) $(MakeOptions) $(ParallelLibDir)/$@
571 < else
437 < %.a : $(ObjectFiles)
570 >
571 > %_MPI.a : $(ParallelObjectFiles)
572          $(MAKE) $(MakeOptions) $(LibDir)/$@
439 endif
573  
574   # .o -> .so
575 < $(LibDir)/%.so : $(ObjectFiles)
575 > $(LibDir)/%_UP.so : $(ObjectFiles)
576          $(DynamicArchiver) $(ObjectFiles) $(DynamicArchiverOptions) -o $@
577  
578 < $(ParallelLibDir)/%.so : $(ParallelObjectFiles)
578 > $(LibDir)/%_MPI.so : $(ParallelObjectFiles)
579          $(DynamicArchiver) $(ParallelObjectFiles) $(DynamicArchiverOptions) -o $@
580  
581 < ifeq "$(UseMPI)" "yes"
449 < %.so : $(ObjectFiles) $(ParallelObjectFiles)
581 > %_UP.so : $(ObjectFiles)
582          $(MAKE) $(MakeOptions) $(LibDir)/$@
583 <        $(MAKE) $(MakeOptions) $(ParallelLibDir)/$@
584 < else
453 < %.so : $(ObjectFiles)
583 >
584 > %_MPI.so : $(ParallelObjectFiles)
585          $(MAKE) $(MakeOptions) $(LibDir)/$@
455 endif
586  
587   # .class -> .jar
588   $(LibDir)/%.jar : $(JavaClassFiles) $(OtherTargetFiles)
# Line 486 | Line 616 | $(PackageTargetDir)/%_Skel.class : $(PackageTargetDir)
616   %_Skel.class : %.class
617          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
618  
619 + document :
620 +        $(Print) Generate Documentation for OOPSE-2.0
621 +        @cd $(DEV_ROOT)/src    
622 +        $(Doxygen) $(DEV_ROOT)/make/Doxyfile
623 +
624 + #GUN make funtions to merge the libraries
625 + find_objs = $(shell $(StaticArchiver) -t $(1))
626 + extract_objs = $(shell $(StaticArchiver) -x $(1) $(call find_objs, $(1)))
627 + create_archive = $(shell  $(StaticArchiver) $(StaticArchiverOptions) $(2) $(call find_objs, $(1)))
628 + remove_objs = $(shell $(Delete) $(call find_objs, $(1)))
629 + do_create = $(call extract_objs,$(1))$(call create_archive,$(1),$(2))$(call remove_objs,$(1))  
630 +
631 + $(CombinedStaticLib) : $(LibDir)/.stamp_UP
632 +        $(Print) create $@      
633 +        $(foreach thisLib,$(LibNames),$(call do_create,$(thisLib),$@))
634 +        $(Ranlib) $(CombinedStaticLib)
635 +
636 + $(CombinedParallelStaticLib) : $(LibDir)/.stamp_MPI
637 +        $(Print) create $@
638 +        $(foreach thisLib,$(ParallelLibNames), $(call do_create, $(thisLib), $@))
639 +        $(Ranlib) $(CombinedParallelStaticLib)
640 +
641   # Executable
642 < $(Executable) : $(ObjectFiles)
643 <        $(Linker) $(ObjectFiles) $(LinkOptions) $(LibDirs) $(LibList) -o $@
642 > $(Executable) : $(CombinedStaticLib) $(ObjectFiles) $(BinDir)
643 >        $(Linker) $(ObjectFiles) $(CombinedStaticLib) $(LinkOptions) $(LibDirs) $(Libraries) -o $@
644  
645 < $(ParallelExecutable) : $(ParallelObjectFiles)
646 <        $(Linker) $(ParallelObjectFiles)  $(ParallelLinkOptions) $(ParallelLibDirs) $(LibList) -o $@
645 > $(ParallelExecutable) : $(CombinedParallelStaticLib) $(ParallelObjectFiles) $(BinDir)
646 >        $(Linker) $(ParallelObjectFiles) $(CombinedParallelStaticLib) $(ParallelLinkOptions) $(LibDirs) $(Libraries) -o $@
647  
648   # Anything else is just copied from source to target
649   $(PackageTargetDir)/% : $(PackageSourceDir)/%
# Line 504 | Line 656 | ifeq "$(UseMPI)" "yes"
656  
657   _all : _buildall
658  
659 + _buildall :
660   ifeq "$(UseMPI)" "yes"
661   _buildall : \
662          $(DependencyFile) \
# Line 514 | Line 667 | _buildall : \
667          $(RmiStubFiles) \
668          $(RmiSkeletonFiles) \
669          $(OtherTargetFiles) \
517        $(SharedLibrary) \
670          $(StaticLibrary) \
519        $(ParallelSharedLibrary) \
671          $(ParallelStaticLibrary) \
672          $(JarFile) \
673          $(Executable) \
# Line 530 | Line 681 | _buildall : \
681          $(RmiStubFiles) \
682          $(RmiSkeletonFiles) \
683          $(OtherTargetFiles) \
533        $(SharedLibrary) \
684          $(StaticLibrary) \
685          $(JarFile) \
686          $(Executable)
687   endif
688  
689 + echo : $(PackageListLoop)
690 +        $(Print) Done echo.
691  
692 + _echoall :
693 +        $(Print) $(Modules)
694 +
695   # make clean
696   clean : $(PackageListLoop)
697          $(Print) Done clean.    
698  
699   _cleanall :
700 <        $(Delete) $(ObjectFiles) $(ParallelObjectFiles)
700 >        $(Delete) \
701 >                $(ObjectFiles) \
702 >                $(ModuleFiles) \
703 >                $(ParallelObjectFiles) \
704 >                $(ParallelModuleFiles) \
705 >                $(JarFile) \
706 >                $(SharedLibrary) \
707 >                $(StaticLibrary) \
708 >                $(ParallelSharedLibrary) \
709 >                $(ParallelStaticLibrary) \
710 >                $(CombinedStaticLib) \
711 >                $(CombinedParallelStaticLib)
712  
713   # make distclean
714   distclean : $(PackageListLoop)
715          $(Print) Done clean.    
716  
717 < _distcleanall :
718 <        $(Delete) $(ObjectFiles) \
553 <                  $(ParallelObjectFiles) \
554 <                        $(JarFile) \
555 <                  $(SharedLibrary) \
556 <                  $(StaticLibrary) \
557 <                  $(ParallelSharedLibrary) \
558 <                  $(ParallelStaticLibrary) \
559 <                  $(Executable) \
717 > _distcleanall : _cleanall
718 >        $(Delete) $(Executable) \
719                    $(ParallelExecutable) \
720                    $(DependencyFile)
721  
563
722   # make depend
723   depend : $(PackageListLoop)
724          $(Print) Done dependencies.
# Line 571 | Line 729 | $(DependencyFile) : $(DerivedSource)
729          $(Print) $@
730          @cd $(PackageSourceDir)
731  
574        @touch Make.ctemp
575        @touch Make.ctemp
576
732   ifneq "$(words $(CppFiles))" "0"
733 <        $(CppCompiler) $(IncludePath) -MM $(CppFiles)  > Make.cpptemp
734 <        cat Make.cpptemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/obj\/&/g' >> $(DependencyFile)
735 <        cat Make.cpptemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/MPIobj\/&/g' >> $(DependencyFile)
733 >        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(TargetDir)/' -MM $(CppFiles)>> Make.cpptemp
734 >        @cat Make.cpptemp  >> $(DependencyFile)
735 >        $(Delete) Make.cpptemp
736 >
737 >  ifeq "$(UseMPI)" "yes"
738 >        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) -MM $(CppFiles)>> Make.cpptemp
739 >        @cat Make.cpptemp  >> $(DependencyFile)
740 >        @$(Delete) Make.cpptemp
741 >  endif
742 >
743   endif
744  
745   ifneq "$(words $(CFiles))" "0"
746 <        $(CCompiler)   $(IncludePath) -MM $(CFiles) $(DerivedCFiles)   > Make.ctemp
747 <        cat Make.ctemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/obj\/&/g' >> $(DependencyFile)
748 <        cat Make.ctemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/MPIobj\/&/g' >> $(DependencyFile)
746 >        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(TargetDir)/'  -MM $(CFiles) $(DerivedCFiles)  >> Make.ctemp
747 >        @cat Make.ctemp  >> $(DependencyFile)
748 >        $(Delete) Make.ctemp
749  
750 +  ifeq "$(UseMPI)" "yes"
751 +        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) -MM $(CFiles) $(DerivedCFiles)  >> Make.ctemp
752 +        @cat Make.ctemp  >> $(DependencyFile)
753 +        @$(Delete) Make.ctemp
754 +  endif
755 +
756   endif
757  
758   ifneq "$(words $(F90Files))" "0"
759 <        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(DEV_ROOT)/obj/' -D__FORTRAN90  $(F90Files) > Make.ftemp
760 <        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(DEV_ROOT)/MPIobj/' -DIS_MPI -D__FORTRAN90  $(F90Files) >> Make.ftemp
761 <        cat Make.ftemp >> $(DependencyFile)
759 >        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(TargetDir)/' $(F90Declare) -MM -mc $(ModuleCase) -ms $(ModSuffix) $(F90Files) > Make.ftemp
760 >        @cat Make.ftemp >> $(DependencyFile)
761 >        @$(Delete) Make.ftemp
762 >
763 >  ifeq "$(UseMPI)" "yes"
764 >        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) $(F90Declare) -MM -mc $(ModuleCase) -ms $(ModSuffix)  $(F90Files) >> Make.ftemp
765 >        @cat Make.ftemp >> $(DependencyFile)
766 >        @$(Delete) Make.ftemp
767 >  endif
768 >
769   endif
595        $(Delete) Make.cpptemp Make.ctemp Make.ftemp
770  
771   # make lib
772   lib    : $(PackageListLoop)
# Line 605 | Line 779 | jarsign : $(JarFile)
779   jarsign : $(JarFile)
780          $(JarSigner) -keystore GeoSoftKeystore $(JarFile) myself
781  
782 + #make install
783 + %.install :
784 +        @$(MAKE) $(MakeOptions) -C $(subst .install,,$@) _installall    
785 +
786 + install : $(InstallListLoop)
787 +        $(Print) Done Install
788 +
789 + _installall : _buildall _installdata
790 +
791 + $(MyInstallDir) :
792 +        $(MkDir) $@
793 +
794 + _installdata :  $(MyInstallDir)
795 +        $(Print) $(InstallFiles)
796 + ifneq "$(words $(InstallFiles))" "0"
797 +        $(InstallCommand) $(InstallFiles) $(MyInstallDir)
798 + endif      
799 +
800   # make statistics
801   _statisticsall :
802 <        @$(Print) $(SourceFiles) >> $(DEV_ROOT)/files.tmp
802 >        @$(Print) $(patsubst %,$(CurrentDir)/%,$(SourceFiles)) >> $(DEV_ROOT)/files.tmp
803  
804   statistics : $(PackageListLoop)
805          @$(List) $(DEV_ROOT)/files.tmp | xargs $(WordCount) $(WordCountOptions)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines