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 2131 by tim, Tue Mar 22 16:38:37 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 211 | Line 216 | ifneq  "$(words $(ObjectFiles) $(ParallelObjectFiles))
216   #if Main is defined, do not build library. It may not be true sometimes
217   ifneq  "$(words $(ObjectFiles) $(ParallelObjectFiles))" "0"
218    DependencyFile    = $(PackageSourceDir)/Makedepend
219 <  ifneq "$(Main)" ""
219 >  ifneq "$(words $(Main))" "0"
220      Executable             = $(BinDir)/$(Main)
221 <    ParallelExecutable     = $(BinDir)/$(Main)_MPI
221 >    ifeq "$(BuiltParallelExe)" "1"
222 >      ParallelExecutable     = $(BinDir)/$(Main)_MPI
223 >    endif
224    else
225 <    SharedLibrary          = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package))).so
226 <    StaticLibrary          = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package))).a
227 <    ParallelSharedLibrary  = $(ParallelLibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package))).so
228 <    ParallelStaticLibrary  = $(ParallelLibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package))).a
225 >    SharedLibrary          = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package)))_UP.so
226 >    StaticLibrary          = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package)))_UP.a
227 >    ParallelSharedLibrary  = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package)))_MPI.so
228 >    ParallelStaticLibrary  = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package)))_MPI.a
229    endif
230   endif
231 +
232   #
233   # Misc
234   #
# Line 228 | Line 236 | ParallelLibDirs  = -L$(ParallelLibDir)  $(LibraryDirs:
236   JavaPackageNames = $(subst /,.,$(JavaPackages))
237   IncludePath      = -I$(SourceDir) $(IncludeDirs:%=-I%)
238   LibDirs          = -L$(LibDir)    $(LibraryDirs:%=-L%)
239 < ParallelLibDirs  = -L$(ParallelLibDir)  $(LibraryDirs:%=-L%)
240 < LocalLibs        = $(subst /,,$(patsubst %, oopse_%, $(PackageLibs)))
233 < ParallelLocalLibs= $(subst /,,$(patsubst %, oopse_%, $(PackageLibs)))
239 > LocalLibs        = $(subst /,,$(patsubst %, oopse_%_UP, $(PackageLibs)))
240 > ParallelLocalLibs= $(subst /,,$(patsubst %, oopse_%_MPI, $(PackageLibs)))
241   LibList          = $(LocalLibs:%=-l%) $(Libraries)
242 + LibNames         = $(LocalLibs:%=$(LibDir)/lib%.a)
243   ParallelLibList  = $(ParallelLocalLibs:%=-l%) $(Libraries)
244 + ParallelLibNames = $(ParallelLocalLibs:%=$(LibDir)/lib%.a)
245  
246  
247   #---------------------------------------------------------------------------
# Line 241 | Line 250 | Move                   = mv
250   #
251   #---------------------------------------------------------------------------
252   Print                  = @echo
253 < Move                   = mv
253 > Move                   = mv -f
254   Copy                   = cp
255   CCompiler              = @CC@
256   CppCompiler            = @CXX@
257   Linker                 = @CXX@
258   MakeDepend             = makedepend
259 < Install                = @INSTALL@
259 > INSTALL                = @INSTALL@
260   InstallProgram         = @INSTALL_PROGRAM@
261 + InstallScript          = @INSTALL_SCRIPT@
262   InstallData            = @INSTALL_DATA@
263 < MakeDir                = @MKINSTALLDIRS@
263 > MkDir                  = @MKINSTALLDIRS@
264   Delete                 = rm -fr
265   StaticArchiver         = @AR@
266   DynamicArchiver        = @CC@
# Line 268 | Line 278 | Lex                    = @LEX@
278   List                   = cat
279   Yacc                   = @YACC@
280   Lex                    = @LEX@
281 + Ranlib                 = @RANLIB@
282 + Doxygen                = @DOXYGEN@
283  
272
284   MakeOptions            = -k
285   MakeDependOptions      =
286   StaticArchiverOptions  = rc
# Line 278 | Line 289 | COptions               = $(FrcDeclare)
289   JniOptions             =
290   RmiOptions             = -d $(TargetDir) -classpath $(ClassPath) \
291                           -sourcepath $(SourceDir)
292 < COptions               = $(FrcDeclare)
293 < CParallelOptions       = $(FrcDeclare) $(ParallelDeclare)
294 < CppOptions             = $(FrcDeclare)
295 < CppParallelOptions     = $(FrcDeclare) $(ParallelDeclare)
292 > COptions               = $(FrcDeclare) @CFLAGS@
293 > CParallelOptions       = $(FrcDeclare) $(ParallelDeclare) @CFLAGS@
294 > CppOptions             = $(FrcDeclare) @CXXFLAGS@ @OOPSE_TEMPLATE_FLAGS@
295 > CppParallelOptions     = $(FrcDeclare) $(ParallelDeclare) @CXXFLAGS@ @OOPSE_TEMPLATE_FLAGS@
296   FortranOptions         =
297 < F90Options             =  @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) -module $(TargetDir)
298 < F90ParallelOptions     =  @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) -module $(ParallelTargetDir)  @PREPDEFFLAG@$(ParallelDeclare)
297 > F90Options             =  @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) @MODDIRFLAG@$(TargetDir)
298 > F90ParallelOptions     =  @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) @MODDIRFLAG@$(ParallelTargetDir)  @PREPDEFFLAG@$(ParallelDeclare)
299   JavaCompilerOptions    = -d $(TargetDir) -classpath $(ClassPath) \
300                           -sourcepath $(SourceDir) -deprecation
301   JavaRunOptions         = -classpath $(ClassPath)
# Line 310 | Line 321 | Space                  = $(Empty) $(Empty)
321  
322   #---------------------------------------------------------------------------
323   #
324 + #  Install
325 + #
326 + #---------------------------------------------------------------------------
327 +
328 + ifneq "$(words $(SampleFiles))" "0"
329 +  MySample                 = $(subst $(shell cd $(DEV_ROOT)/samples; pwd)/,,$(CurrentDir))
330 +  MyInstallDir             = $(SampleSimDir)/$(MySample)
331 +  InstallFiles             = $(SampleFiles)
332 +  InstallCommand           = $(InstallData)
333 + endif
334 +
335 + ifneq "$(words $(Main))" "0"
336 +  MyInstallDir             = $(InstallBinDir)
337 +  ifeq "$(UseMPI)" "yes"
338 +    InstallFiles             = $(Executable) $(ParallelExecutable)
339 +  else
340 +    InstallFiles             = $(Executable)
341 +  endif
342 +  InstallCommand           = $(InstallProgram)
343 + endif
344 +
345 + ifneq "$(words $(ForcefieldFiles))" "0"
346 +  MyInstallDir             = $(ForceParamDir)
347 +  InstallFiles             = $(ForcefieldFiles)
348 +  InstallCommand           = $(InstallData)
349 + endif
350 +
351 + ifneq "$(words $(InstallFiles))" "0"
352 +  InstallList            =
353 + else
354 +  InstallList            = $(patsubst %,$(DEV_ROOT)/%,$(Samples)) $(DEV_ROOT)/forceFields $(patsubst %, $(SourceDir)/%,$(Applications))
355 + endif
356 +
357 + InstallListLoop          = $(patsubst %,$(SourceDir)/%/.install,$(PackageList))  $(patsubst %,%/.install,$(InstallList))
358 +
359 +
360 +
361 + #---------------------------------------------------------------------------
362 + #
363   # Rules
364   #
365   #---------------------------------------------------------------------------
# Line 320 | Line 370 | $(PackageTargetDir) :
370  
371   # Create target directory
372   $(PackageTargetDir) :
373 <        $(MakeDir) $@
373 >        $(MkDir) $@
374  
375 + $(BinDir) :
376 +        $(MkDir) $@
377 +
378   # .c -> .o
379   $(PackageTargetDir)/%.o : %.c
380          $(Print) $@
# Line 375 | Line 428 | $(PackageTargetDir)/%.o : %.F90
428   # .F90 -> .o
429   $(PackageTargetDir)/%.o : %.F90
430          $(F90Compiler) $(F90Options) $(IncludePath) -c $< -o $@
431 +        if test -n "`ls *.$(ModSuffix)`"; then \
432 +          $(Move) `ls *.$(ModSuffix)` $(PackageTargetDir);\
433 +        fi
434  
435   $(PackageParallelTargetDir)/%.o : %.F90
436          $(F90Compiler) $(F90ParallelOptions) $(IncludePath) -c $< -o $@
437 +        if test -n "`ls *.$(ModSuffix)`"; then \
438 +          $(Move) "`ls *.$(ModSuffix)`" $(PackageParallelTargetDir);\
439 +        fi
440  
441   ifeq "$(UseMPI)" "yes"
442   %.o : %.F90
443          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
444 +        if test -n "`ls *.$(ModSuffix)`"; then\
445 +          $(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\
446 +        fi
447 +
448          $(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@
449 +        if test -n "`ls *.$(ModSuffix)`"; then\
450 +          $(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\
451 +        fi
452 +
453   else
454   %.o : %.F90
455          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
456 +        if test -n "`ls *.$(ModSuffix)`"; then\
457 +          $(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\
458 +        fi
459   endif
460  
461  
# Line 423 | Line 493 | $(LibDir)/%.a : $(ObjectFiles)
493  
494   # .o -> .a
495  
496 < $(LibDir)/%.a : $(ObjectFiles)
496 > $(LibDir)/%_UP.a : $(ObjectFiles)
497          $(StaticArchiver) $(StaticArchiverOptions) $@ $(ObjectFiles)
498 +        @touch $(LibDir)/.stamp_UP
499  
500 < $(ParallelLibDir)/%.a: $(ParallelObjectFiles)
500 > $(LibDir)/%_MPI.a: $(ParallelObjectFiles)
501          $(StaticArchiver) $(StaticArchiverOptions) $@ $(ParallelObjectFiles)
502 +        @touch $(LibDir)/.stamp_MPI
503  
504 < ifeq "$(UseMPI)" "yes"
433 < %.a : $(ObjectFiles) $(ParallelObjectFiles)
504 > %_UP.a : $(ObjectFiles)
505          $(MAKE) $(MakeOptions) $(LibDir)/$@
506 <        $(MAKE) $(MakeOptions) $(ParallelLibDir)/$@
507 < else
437 < %.a : $(ObjectFiles)
506 >
507 > %_MPI.a : $(ParallelObjectFiles)
508          $(MAKE) $(MakeOptions) $(LibDir)/$@
439 endif
509  
510   # .o -> .so
511 < $(LibDir)/%.so : $(ObjectFiles)
511 > $(LibDir)/%_UP.so : $(ObjectFiles)
512          $(DynamicArchiver) $(ObjectFiles) $(DynamicArchiverOptions) -o $@
513  
514 < $(ParallelLibDir)/%.so : $(ParallelObjectFiles)
514 > $(LibDir)/%_MPI.so : $(ParallelObjectFiles)
515          $(DynamicArchiver) $(ParallelObjectFiles) $(DynamicArchiverOptions) -o $@
516  
517 < ifeq "$(UseMPI)" "yes"
449 < %.so : $(ObjectFiles) $(ParallelObjectFiles)
517 > %_UP.so : $(ObjectFiles)
518          $(MAKE) $(MakeOptions) $(LibDir)/$@
519 <        $(MAKE) $(MakeOptions) $(ParallelLibDir)/$@
520 < else
453 < %.so : $(ObjectFiles)
519 >
520 > %_MPI.so : $(ParallelObjectFiles)
521          $(MAKE) $(MakeOptions) $(LibDir)/$@
455 endif
522  
523   # .class -> .jar
524   $(LibDir)/%.jar : $(JavaClassFiles) $(OtherTargetFiles)
# Line 486 | Line 552 | $(PackageTargetDir)/%_Skel.class : $(PackageTargetDir)
552   %_Skel.class : %.class
553          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
554  
555 + document :
556 +        $(Print) Generate Documentation for OOPSE-2.0
557 +        @cd $(DEV_ROOT)/src    
558 +        $(Doxygen) $(DEV_ROOT)/make/Doxyfile
559 +
560 + #GUN make funtions to merge the libraries
561 + find_objs = $(shell $(StaticArchiver) -t $(1))
562 + extract_objs = $(shell $(StaticArchiver) -x $(1) $(call find_objs, $(1)))
563 + create_archive = $(shell  $(StaticArchiver) $(StaticArchiverOptions) $(2) $(call find_objs, $(1)))
564 + remove_objs = $(shell $(Delete) $(call find_objs, $(1)))
565 + do_create = $(call extract_objs,$(1))$(call create_archive,$(1),$(2))$(call remove_objs,$(1))  
566 +
567 + $(CombinedStaticLib) : $(LibDir)/.stamp_UP
568 +        $(Print) create $@      
569 +        $(foreach thisLib,$(LibNames),$(call do_create,$(thisLib),$@))
570 +        $(Ranlib) $(CombinedStaticLib)
571 +
572 + $(CombinedParallelStaticLib) : $(LibDir)/.stamp_MPI
573 +        $(Print) create $@
574 +        $(foreach thisLib,$(ParallelLibNames), $(call do_create, $(thisLib), $@))
575 +        $(Ranlib) $(CombinedParallelStaticLib)
576 +
577   # Executable
578 < $(Executable) : $(ObjectFiles)
579 <        $(Linker) $(ObjectFiles) $(LinkOptions) $(LibDirs) $(LibList) -o $@
578 > $(Executable) : $(CombinedStaticLib) $(ObjectFiles) $(BinDir)
579 >        $(Linker) $(ObjectFiles) $(CombinedStaticLib) $(LinkOptions) $(LibDirs) $(Libraries) -o $@
580  
581 < $(ParallelExecutable) : $(ParallelObjectFiles)
582 <        $(Linker) $(ParallelObjectFiles)  $(ParallelLinkOptions) $(ParallelLibDirs) $(LibList) -o $@
581 > $(ParallelExecutable) : $(CombinedParallelStaticLib) $(ParallelObjectFiles) $(BinDir)
582 >        $(Linker) $(ParallelObjectFiles) $(CombinedParallelStaticLib) $(ParallelLinkOptions) $(LibDirs) $(Libraries) -o $@
583  
584   # Anything else is just copied from source to target
585   $(PackageTargetDir)/% : $(PackageSourceDir)/%
# Line 504 | Line 592 | ifeq "$(UseMPI)" "yes"
592  
593   _all : _buildall
594  
595 + _buildall :
596   ifeq "$(UseMPI)" "yes"
597   _buildall : \
598          $(DependencyFile) \
# Line 514 | Line 603 | _buildall : \
603          $(RmiStubFiles) \
604          $(RmiSkeletonFiles) \
605          $(OtherTargetFiles) \
517        $(SharedLibrary) \
606          $(StaticLibrary) \
519        $(ParallelSharedLibrary) \
607          $(ParallelStaticLibrary) \
608          $(JarFile) \
609          $(Executable) \
# Line 530 | Line 617 | _buildall : \
617          $(RmiStubFiles) \
618          $(RmiSkeletonFiles) \
619          $(OtherTargetFiles) \
533        $(SharedLibrary) \
620          $(StaticLibrary) \
621          $(JarFile) \
622          $(Executable)
# Line 542 | Line 628 | _cleanall :
628          $(Print) Done clean.    
629  
630   _cleanall :
631 <        $(Delete) $(ObjectFiles) $(ParallelObjectFiles)
631 >        $(Delete) \
632 >                $(ObjectFiles) \
633 >                $(ParallelObjectFiles) \
634 >                $(JarFile) \
635 >                $(SharedLibrary) \
636 >                $(StaticLibrary) \
637 >                $(ParallelSharedLibrary) \
638 >                $(ParallelStaticLibrary) \
639 >                $(CombinedStaticLib) \
640 >                $(CombinedParallelStaticLib)
641  
642   # make distclean
643   distclean : $(PackageListLoop)
644          $(Print) Done clean.    
645  
646 < _distcleanall :
647 <        $(Delete) $(ObjectFiles) \
553 <                  $(ParallelObjectFiles) \
554 <                        $(JarFile) \
555 <                  $(SharedLibrary) \
556 <                  $(StaticLibrary) \
557 <                  $(ParallelSharedLibrary) \
558 <                  $(ParallelStaticLibrary) \
559 <                  $(Executable) \
646 > _distcleanall : _cleanall
647 >        $(Delete) $(Executable) \
648                    $(ParallelExecutable) \
649                    $(DependencyFile)
650  
563
651   # make depend
652   depend : $(PackageListLoop)
653          $(Print) Done dependencies.
# Line 571 | Line 658 | $(DependencyFile) : $(DerivedSource)
658          $(Print) $@
659          @cd $(PackageSourceDir)
660  
574        @touch Make.ctemp
575        @touch Make.ctemp
576
661   ifneq "$(words $(CppFiles))" "0"
662 <        $(CppCompiler) $(IncludePath) -MM $(CppFiles)  > Make.cpptemp
663 <        cat Make.cpptemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/obj\/&/g' >> $(DependencyFile)
664 <        cat Make.cpptemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/MPIobj\/&/g' >> $(DependencyFile)
662 >        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(TargetDir)/' -MM $(CppFiles)>> Make.cpptemp
663 >        @cat Make.cpptemp  >> $(DependencyFile)
664 >        $(Delete) Make.cpptemp
665 >
666 >  ifeq "$(UseMPI)" "yes"
667 >        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) -MM $(CppFiles)>> Make.cpptemp
668 >        @cat Make.cpptemp  >> $(DependencyFile)
669 >        @$(Delete) Make.cpptemp
670 >  endif
671 >
672   endif
673  
674   ifneq "$(words $(CFiles))" "0"
675 <        $(CCompiler)   $(IncludePath) -MM $(CFiles) $(DerivedCFiles)   > Make.ctemp
676 <        cat Make.ctemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/obj\/&/g' >> $(DependencyFile)
677 <        cat Make.ctemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/MPIobj\/&/g' >> $(DependencyFile)
675 >        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(TargetDir)/'  -MM $(CFiles) $(DerivedCFiles)  >> Make.ctemp
676 >        @cat Make.ctemp  >> $(DependencyFile)
677 >        $(Delete) Make.ctemp
678  
679 +  ifeq "$(UseMPI)" "yes"
680 +        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) -MM $(CFiles) $(DerivedCFiles)  >> Make.ctemp
681 +        @cat Make.ctemp  >> $(DependencyFile)
682 +        @$(Delete) Make.ctemp
683 +  endif
684 +
685   endif
686  
687   ifneq "$(words $(F90Files))" "0"
688 <        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(DEV_ROOT)/obj/' -D__FORTRAN90  $(F90Files) > Make.ftemp
689 <        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(DEV_ROOT)/MPIobj/' -DIS_MPI -D__FORTRAN90  $(F90Files) >> Make.ftemp
690 <        cat Make.ftemp >> $(DependencyFile)
688 >        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(TargetDir)/' $(F90Declare) -MM -mc $(ModuleCase) -ms $(ModSuffix) $(F90Files) > Make.ftemp
689 >        @cat Make.ftemp >> $(DependencyFile)
690 >        @$(Delete) Make.ftemp
691 >
692 >  ifeq "$(UseMPI)" "yes"
693 >        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) $(F90Declare) -MM -mc $(ModuleCase) -ms $(ModSuffix)  $(F90Files) >> Make.ftemp
694 >        @cat Make.ftemp >> $(DependencyFile)
695 >        @$(Delete) Make.ftemp
696 >  endif
697 >
698   endif
595        $(Delete) Make.cpptemp Make.ctemp Make.ftemp
699  
700   # make lib
701   lib    : $(PackageListLoop)
# Line 605 | Line 708 | jarsign : $(JarFile)
708   jarsign : $(JarFile)
709          $(JarSigner) -keystore GeoSoftKeystore $(JarFile) myself
710  
711 + #make install
712 + %.install :
713 +        @$(MAKE) $(MakeOptions) -C $(subst .install,,$@) _installall    
714 +
715 + install : $(InstallListLoop)
716 +        $(Print) Done Install
717 +
718 + _installall : _buildall _installdata
719 +
720 + $(MyInstallDir) :
721 +        $(MkDir) $@
722 +
723 + _installdata :  $(MyInstallDir)
724 +        $(Print) $(InstallFiles)
725 + ifneq "$(words $(InstallFiles))" "0"
726 +        $(InstallCommand) $(InstallFiles) $(MyInstallDir)
727 + endif      
728 +
729   # make statistics
730   _statisticsall :
731 <        @$(Print) $(SourceFiles) >> $(DEV_ROOT)/files.tmp
731 >        @$(Print) $(patsubst %,$(CurrentDir)/%,$(SourceFiles)) >> $(DEV_ROOT)/files.tmp
732  
733   statistics : $(PackageListLoop)
734          @$(List) $(DEV_ROOT)/files.tmp | xargs $(WordCount) $(WordCountOptions)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines