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 1514 by tim, Thu Sep 30 15:41:35 2004 UTC vs.
Revision 1951 by gezelter, Fri Jan 14 21:13:24 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 \
52 <        restraints \
51 >        minimizers \
52 >
53 > #packages containing applications
54 > Applications = \
55          applications/oopse \
56          applications/dump2Xyz \
57 <        applications/simpleBuilder \
57 >        applications/simpleBuilder\
58  
59 < #packages contain libraries
60 < PackageLibs = \
61 <        utils \
62 <        math \
63 <        types \
64 <        primitives \
65 <        visitors \
66 <        UseTheForce/DarkSide \
67 <        UseTheForce \
68 <        brains \
69 <        io \
70 <        integrators \
71 <        minimizers \
70 <        constraints \
71 <        profiling \
72 <        restraints \
59 > Samples = \
60 >        samples/argon \
61 >        samples/water/dimer \
62 >        samples/water/spce \
63 >        samples/water/ssd \
64 >        samples/water/ssde \
65 >        samples/water/tip3p_ice \
66 >        samples/water/tip4p \
67 >        samples/lipid \
68 >        samples/alkane \
69 >        samples/minimizer \
70 >        samples/metals \
71 >        samples/zcons \
72  
73   IncludeDirs = \
74 <        /usr/include \
75 <        /usr/local/include
74 >        @SPRNG_INC_DIR@ \
75 >        @MPI_INC_DIR@
76  
77   LibraryDirs = \
78 <        /usr/lib \
79 <        /usr/local/mpich/lib \
81 <        /usr/local/lib \
82 <        /usr/local/intel/compiler80/lib \
78 >        @SPRNG_LIB_DIR@ \
79 >        @MPI_LIB_DIR@
80  
81   Libraries = \
82 <        mpich \
83 <        sprng \
84 <        ifcore \
82 >        @SPRNG_LIB@ \
83 >        @MPI_LIB@ \
84 >        @MPI_F90_LIB@
85  
86 + OopseHome       = @OOPSE_HOME@
87 + ForceParamDir   = $(OopseHome)/share/forceFields
88 + SampleSimDir    = $(OopseHome)/share/samples
89 + InstallBinDir   = $(OopseHome)/bin
90 + DocDir          = $(OopseHome)/doc
91 + FrcDeclare      = -DFRC_PATH="$(ForceParamDir)"
92 + F90Declare      = -D__FORTRAN90
93 + ParallelDeclare = -DIS_MPI
94 + UseMPI          = @USE_MPI@
95 + ModuleCase      = @F90_MODULE_NAMES@
96 + ModSuffix       = @MOD@
97 + LinkOptions = \
98 +        @F90LIBS@
99 +
100 + ParallelLinkOptions = \
101 +        @F90LIBS@
102 +
103 +
104   #---------------------------------------------------------------------------
105   #
106   #  Directories
# Line 100 | Line 115 | CurrentDir        = $(CURDIR)
115   BinDir            = $(DEV_ROOT)/bin
116   DocsDir           = $(DEV_ROOT)/docs
117   CurrentDir        = $(CURDIR)
118 + CombinedStaticLib = $(LibDir)/libOOPSE.a
119 + CombinedParallelStaticLib = $(LibDir)/libOOPSE_MPI.a
120  
121   ifdef Source
122   #get the relative path of current package to source directory
123   # /home/maul/gezelter/src/code/src/UseTheForce/Darkside --> UseTheForce/Darkside
124   #Package          = $(shell echo $(CurrentDir) | sed -e 's/^.*\/src\/\(.*\)/\1/g')
125   #use shell script to get the absolute path and then rip it off from $(CurrentDir)
126 < Package          = $(subst $(shell cd $(SourceDir); pwd)/,,$(CurrentDir))
126 > #Package          = $(subst $(shell cd $(SourceDir); pwd)/,,$(CurrentDir))
127 > # REMINDER: We are now using the Package line in each subdir makefile.
128 > # This avoids the strange path problem and the subshell
129  
130   PackageList              = $(Package)
131   PackageSourceDir         = $(SourceDir)/$(Package)
# Line 114 | 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 165 | 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 200 | 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 213 | 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 223 | Line 247 | Move                   = mv
247   #
248   #---------------------------------------------------------------------------
249   Print                  = @echo
250 < Move                   = mv
250 > Move                   = mv -f
251   Copy                   = cp
252   CCompiler              = @CC@
253   CppCompiler            = @CXX@
254   Linker                 = @CXX@
255   MakeDepend             = makedepend
256 < Install                = @INSTALL@
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 250 | Line 274 | Lex                    = @LEX@
274   List                   = cat
275   Yacc                   = @YACC@
276   Lex                    = @LEX@
277 + Ranlib                 = @RANLIB@
278 + Doxygen                = @DOXYGEN@
279  
254
280   MakeOptions            = -k
281   MakeDependOptions      =
282   StaticArchiverOptions  = rc
# Line 260 | Line 285 | FortranOptions         =
285   JniOptions             =
286   RmiOptions             = -d $(TargetDir) -classpath $(ClassPath) \
287                           -sourcepath $(SourceDir)
288 + COptions               = $(FrcDeclare) @CFLAGS@
289 + CParallelOptions       = $(FrcDeclare) $(ParallelDeclare) @CFLAGS@
290 + CppOptions             = $(FrcDeclare) @CXXFLAGS@ @OOPSE_TEMPLATE_FLAGS@
291 + CppParallelOptions     = $(FrcDeclare) $(ParallelDeclare) @CXXFLAGS@ @OOPSE_TEMPLATE_FLAGS@
292   FortranOptions         =
293 < F90Options             =  -I$(SourceDir) -module $(TargetDir)
293 > F90Options             =  @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) @MODDIRFLAG@$(TargetDir)
294 > F90ParallelOptions     =  @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) @MODDIRFLAG@$(ParallelTargetDir)  @PREPDEFFLAG@$(ParallelDeclare)
295   JavaCompilerOptions    = -d $(TargetDir) -classpath $(ClassPath) \
296                           -sourcepath $(SourceDir) -deprecation
297   JavaRunOptions         = -classpath $(ClassPath)
# Line 287 | 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             = $(InstallBinDir)
333 +  ifeq "$(UseMPI)" "yes"
334 +    InstallFiles             = $(Executable) $(ParallelExecutable)
335 +  else
336 +    InstallFiles             = $(Executable)
337 +  endif
338 +  InstallCommand           = $(InstallProgram)
339 + endif
340 +
341 + ifneq "$(words $(ForcefieldFiles))" "0"
342 +  MyInstallDir             = $(ForceParamDir)
343 +  InstallFiles             = $(ForcefieldFiles)
344 +  InstallCommand           = $(InstallData)
345 + endif
346 +
347 + ifneq "$(words $(InstallFiles))" "0"
348 +  InstallList            =
349 + else
350 +  InstallList            = $(patsubst %,$(DEV_ROOT)/%,$(Samples)) $(DEV_ROOT)/forceFields $(patsubst %, $(SourceDir)/%,$(Applications))
351 + endif
352 +
353 + InstallListLoop          = $(patsubst %,$(SourceDir)/%/.install,$(PackageList))  $(patsubst %,%/.install,$(InstallList))
354 +
355 +
356 +
357 + #---------------------------------------------------------------------------
358 + #
359   # Rules
360   #
361   #---------------------------------------------------------------------------
# Line 297 | Line 366 | $(PackageTargetDir) :
366  
367   # Create target directory
368   $(PackageTargetDir) :
369 <        $(MakeDir) $@
369 >        $(MkDir) $@
370  
371 + $(BinDir) :
372 +        $(MkDir) $@
373 +
374   # .c -> .o
375   $(PackageTargetDir)/%.o : %.c
376          $(Print) $@
377          $(CCompiler) $(COptions) -c $(IncludePath) $< -o $@
378  
379 + $(PackageParallelTargetDir)/%.o : %.c
380 +        $(Print) $@
381 +        $(CCompiler) $(CParallelOptions) -c $(IncludePath) $< -o $@
382 +
383 + ifeq "$(UseMPI)" "yes"
384 + %.o : %.c
385 +        $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
386 +        $(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@
387 + else
388   %.o : %.c
389          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
390 + endif
391  
392   # .cpp -> .o
393   $(PackageTargetDir)/%.o : %.cpp
394          $(CppCompiler) $(CppOptions) -c $(IncludePath) $< -o $@
395  
396 + $(PackageParallelTargetDir)/%.o : %.cpp
397 +        $(CppCompiler) $(CppParallelOptions) -c $(IncludePath) $< -o $@
398 +
399 + ifeq "$(UseMPI)" "yes"
400   %.o : %.cpp
401          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
402 +        $(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@
403 + else
404 + %.o : %.cpp
405 +        $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
406 + endif
407  
408   # .f -> .o
409   $(PackageTargetDir)/%.o : %.f
410          $(FortranCompiler) $(FortranOptions) -c $< -o $@
411  
412 + $(PackageParallelTargetDir)/%.o : %.f
413 +        $(FortranCompiler) $(FortranParallelOptions) -c $< -o $@
414 +
415 + ifeq "$(UseMPI)" "yes"
416   %.o : %.f
417          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
418 +        $(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@
419 + else
420 + %.o : %.f
421 +        $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
422 + endif
423  
424   # .F90 -> .o
425   $(PackageTargetDir)/%.o : %.F90
426 <        $(F90Compiler) $(F90Options) -c $< -o $@
426 >        $(F90Compiler) $(F90Options) $(IncludePath) -c $< -o $@
427 >        if test -n "`ls *.$(ModSuffix)`"; then \
428 >          $(Move) `ls *.$(ModSuffix)` $(PackageTargetDir);\
429 >        fi
430  
431 + $(PackageParallelTargetDir)/%.o : %.F90
432 +        $(F90Compiler) $(F90ParallelOptions) $(IncludePath) -c $< -o $@
433 +        if test -n "`ls *.$(ModSuffix)`"; then \
434 +          $(Move) "`ls *.$(ModSuffix)`" $(PackageParallelTargetDir);\
435 +        fi
436 +
437 + ifeq "$(UseMPI)" "yes"
438   %.o : %.F90
439          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
440 +        if test -n "`ls *.$(ModSuffix)`"; then\
441 +          $(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\
442 +        fi
443  
444 +        $(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@
445 +        if test -n "`ls *.$(ModSuffix)`"; then\
446 +          $(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\
447 +        fi
448 +
449 + else
450 + %.o : %.F90
451 +        $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
452 +        if test -n "`ls *.$(ModSuffix)`"; then\
453 +          $(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\
454 +        fi
455 + endif
456 +
457 +
458   # .java -> .class
459   $(PackageTargetDir)/%.class : $(PackageSourceDir)/%.java
460          $(JavaCompiler) $(JavaCompilerOptions) $<
# Line 361 | Line 488 | $(LibDir)/%.a : $(ObjectFiles)
488          @$(Lex) -o$@ $?
489  
490   # .o -> .a
491 < $(LibDir)/%.a : $(ObjectFiles)
491 >
492 > $(LibDir)/%_UP.a : $(ObjectFiles)
493          $(StaticArchiver) $(StaticArchiverOptions) $@ $(ObjectFiles)
494 +        @touch $(LibDir)/.stamp_UP
495  
496 < %.a : $(ObjectFiles)
368 <        $(MAKE) $(MakeOptions) $(LibDir)/$@
369 <
370 < $(LibDir)/%_MPI.a : $(ParallelObjectFiles)
496 > $(LibDir)/%_MPI.a: $(ParallelObjectFiles)
497          $(StaticArchiver) $(StaticArchiverOptions) $@ $(ParallelObjectFiles)
498 +        @touch $(LibDir)/.stamp_MPI
499  
500 + %_UP.a : $(ObjectFiles)
501 +        $(MAKE) $(MakeOptions) $(LibDir)/$@
502 +
503   %_MPI.a : $(ParallelObjectFiles)
504          $(MAKE) $(MakeOptions) $(LibDir)/$@
505  
506   # .o -> .so
507 < $(LibDir)/%.so : $(ObjectFiles)
507 > $(LibDir)/%_UP.so : $(ObjectFiles)
508          $(DynamicArchiver) $(ObjectFiles) $(DynamicArchiverOptions) -o $@
509  
380 %.so : $(ObjectFiles)
381        $(MAKE) $(MakeOptions) $(LibDir)/$@
382
510   $(LibDir)/%_MPI.so : $(ParallelObjectFiles)
511          $(DynamicArchiver) $(ParallelObjectFiles) $(DynamicArchiverOptions) -o $@
512  
513 + %_UP.so : $(ObjectFiles)
514 +        $(MAKE) $(MakeOptions) $(LibDir)/$@
515 +
516   %_MPI.so : $(ParallelObjectFiles)
517          $(MAKE) $(MakeOptions) $(LibDir)/$@
518  
# Line 418 | Line 548 | $(PackageTargetDir)/%_Skel.class : $(PackageTargetDir)
548   %_Skel.class : %.class
549          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
550  
551 + document :
552 +        $(Print) Generate Documentation for OOPSE-2.0
553 +        @cd $(DEV_ROOT)/src    
554 +        $(Doxygen) $(DEV_ROOT)/make/Doxyfile
555 +
556 + #GUN make funtions to merge the libraries
557 + find_objs = $(shell $(StaticArchiver) -t $(1))
558 + extract_objs = $(shell $(StaticArchiver) -x $(1) $(call find_objs, $(1)))
559 + create_archive = $(shell  $(StaticArchiver) $(StaticArchiverOptions) $(2) $(call find_objs, $(1)))
560 + remove_objs = $(shell $(Delete) $(call find_objs, $(1)))
561 + do_create = $(call extract_objs,$(1))$(call create_archive,$(1),$(2))$(call remove_objs,$(1))  
562 +
563 + $(CombinedStaticLib) : $(LibDir)/.stamp_UP
564 +        $(Print) create $@      
565 +        $(foreach thisLib,$(LibNames),$(call do_create,$(thisLib),$@))
566 +        $(Ranlib) $(CombinedStaticLib)
567 +
568 + $(CombinedParallelStaticLib) : $(LibDir)/.stamp_MPI
569 +        $(Print) create $@
570 +        $(foreach thisLib,$(ParallelLibNames), $(call do_create, $(thisLib), $@))
571 +        $(Ranlib) $(CombinedParallelStaticLib)
572 +
573   # Executable
574 < $(Executable) : $(ObjectFiles)
575 <        $(Linker) $(LinkOptions) $(LibDirs) $(LibList) $(ObjectFiles) -o $@
574 > $(Executable) : $(CombinedStaticLib) $(ObjectFiles) $(BinDir)
575 >        $(Linker) $(ObjectFiles) $(CombinedStaticLib) $(LinkOptions) $(LibDirs) $(Libraries) -o $@
576  
577 < $(ParallelExecutable) : $(ParallelObjectFiles)
578 <        $(Linker) $(LinkOptions) $(LibDirs) $(LibList) $(ParallelObjectFiles) -o $@
577 > $(ParallelExecutable) : $(CombinedParallelStaticLib) $(ParallelObjectFiles) $(BinDir)
578 >        $(Linker) $(ParallelObjectFiles) $(CombinedParallelStaticLib) $(ParallelLinkOptions) $(LibDirs) $(Libraries) -o $@
579  
580   # Anything else is just copied from source to target
581   $(PackageTargetDir)/% : $(PackageSourceDir)/%
# Line 436 | Line 588 | _buildall : \
588  
589   _all : _buildall
590  
591 + _buildall :
592 + ifeq "$(UseMPI)" "yes"
593   _buildall : \
594          $(DependencyFile) \
595          $(PackageTargetDir) \
596          $(ObjectFiles) \
597 +        $(ParallelObjectFiles) \
598          $(JavaClassFiles) \
599          $(RmiStubFiles) \
600          $(RmiSkeletonFiles) \
601          $(OtherTargetFiles) \
447        $(SharedLibrary) \
602          $(StaticLibrary) \
603 +        $(ParallelStaticLibrary) \
604          $(JarFile) \
605 <        $(Executable)
606 <        
605 >        $(Executable) \
606 >        $(ParallelExecutable)
607 > else
608 > _buildall : \
609 >        $(DependencyFile) \
610 >        $(PackageTargetDir) \
611 >        $(ObjectFiles) \
612 >        $(JavaClassFiles) \
613 >        $(RmiStubFiles) \
614 >        $(RmiSkeletonFiles) \
615 >        $(OtherTargetFiles) \
616 >        $(StaticLibrary) \
617 >        $(JarFile) \
618 >        $(Executable)
619 > endif
620  
621 +
622   # make clean
623   clean : $(PackageListLoop)
624          $(Print) Done clean.    
# Line 464 | Line 633 | _distcleanall :
633   _distcleanall :
634          $(Delete) $(ObjectFiles) \
635                    $(ParallelObjectFiles) \
636 <                  $(JarFile) \
636 >                        $(JarFile) \
637                    $(SharedLibrary) \
638                    $(StaticLibrary) \
639                    $(ParallelSharedLibrary) \
640                    $(ParallelStaticLibrary) \
641                    $(Executable) \
642                    $(ParallelExecutable) \
643 <                  $(DependencyFile)
643 >                  $(DependencyFile)
644  
645  
646   # make depend
# Line 484 | Line 653 | $(DependencyFile) : $(DerivedSource)
653          $(Print) $@
654          @cd $(PackageSourceDir)
655  
487        touch Make.ctemp
488        touch Make.ctemp
489
656   ifneq "$(words $(CppFiles))" "0"
657 <        $(CppCompiler) $(IncludePath) -MM $(CppFiles)  > Make.cpptemp
658 <        cat Make.cpptemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/obj\/&/g' >> $(DependencyFile)
659 <        cat Make.cpptemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/MPIobj\/&/g' >> $(DependencyFile)
657 >        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(TargetDir)/' -MM $(CppFiles)>> Make.cpptemp
658 >        @cat Make.cpptemp  >> $(DependencyFile)
659 >        $(Delete) Make.cpptemp
660 >
661 >  ifeq "$(UseMPI)" "yes"
662 >        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) -MM $(CppFiles)>> Make.cpptemp
663 >        @cat Make.cpptemp  >> $(DependencyFile)
664 >        @$(Delete) Make.cpptemp
665 >  endif
666 >
667   endif
668  
669   ifneq "$(words $(CFiles))" "0"
670 <        $(CCompiler)   $(IncludePath) -MM $(CFiles) $(DerivedCFiles)   > Make.ctemp
671 <        cat Make.ctemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/obj\/&/g' >> $(DependencyFile)
672 <        cat Make.ctemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/MPIobj\/&/g' >> $(DependencyFile)
670 >        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(TargetDir)/'  -MM $(CFiles) $(DerivedCFiles)  >> Make.ctemp
671 >        @cat Make.ctemp  >> $(DependencyFile)
672 >        $(Delete) Make.ctemp
673  
674 +  ifeq "$(UseMPI)" "yes"
675 +        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) -MM $(CFiles) $(DerivedCFiles)  >> Make.ctemp
676 +        @cat Make.ctemp  >> $(DependencyFile)
677 +        @$(Delete) Make.ctemp
678 +  endif
679 +
680   endif
681  
682   ifneq "$(words $(F90Files))" "0"
683 <        $(DEV_ROOT)/scripts/sfmakedepend  -I $(DEV_ROOT)/src -d '$$(DEV_ROOT)/obj' -f ./Make.ftemp -h *.F90
684 <        cat Make.ftemp >> $(DependencyFile)
683 >        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(TargetDir)/' $(F90Declare) -MM -mc $(ModuleCase) -ms $(ModSuffix) $(F90Files) > Make.ftemp
684 >        @cat Make.ftemp >> $(DependencyFile)
685 >        @$(Delete) Make.ftemp
686 >
687 >  ifeq "$(UseMPI)" "yes"
688 >        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) $(F90Declare) -MM -mc $(ModuleCase) -ms $(ModSuffix)  $(F90Files) >> Make.ftemp
689 >        @cat Make.ftemp >> $(DependencyFile)
690 >        @$(Delete) Make.ftemp
691 >  endif
692 >
693   endif
507        $(Delete) Make.cpptemp Make.ctemp Make.ftemp
694  
695   # make lib
696   lib    : $(PackageListLoop)
# Line 517 | Line 703 | jarsign : $(JarFile)
703   jarsign : $(JarFile)
704          $(JarSigner) -keystore GeoSoftKeystore $(JarFile) myself
705  
706 + #make install
707 + %.install :
708 +        @$(MAKE) $(MakeOptions) -C $(subst .install,,$@) _installall    
709 +
710 + install : $(InstallListLoop)
711 +        $(Print) Done Install
712 +
713 + _installall : _buildall _installdata
714 +
715 + $(MyInstallDir) :
716 +        $(MkDir) $@
717 +
718 + _installdata :  $(MyInstallDir)
719 +        $(Print) $(InstallFiles)
720 + ifneq "$(words $(InstallFiles))" "0"
721 +        $(InstallData) $(InstallFiles) $(MyInstallDir)
722 + endif      
723 +
724   # make statistics
725   _statisticsall :
726 <        @$(Print) $(SourceFiles) >> $(DEV_ROOT)/files.tmp
726 >        @$(Print) $(patsubst %,$(CurrentDir)/%,$(SourceFiles)) >> $(DEV_ROOT)/files.tmp
727  
728   statistics : $(PackageListLoop)
729          @$(List) $(DEV_ROOT)/files.tmp | xargs $(WordCount) $(WordCountOptions)
# Line 533 | Line 737 | pure : $(Executable).pure
737  
738   pure : $(Executable).pure
739  
740 + #make cvslog
741 + cvslog:
742 +        $(DEV_ROOT)/scripts/cvs2cl.pl
743 +
744   # Execute
745   _runexe :
746          $(Executable) $(RunParameters)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines