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 1518 by tim, Sat Oct 2 04:22:07 2004 UTC vs.
Revision 1932 by tim, Wed Jan 12 23:17:02 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/compiler81/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
# Line 114 | Line 131 | PackageList              = $(Packages) $(JavaPackages)
131   PackageParallelTargetDir = $(ParallelTargetDir)
132   JavaMainClass            = $(subst /,.,$(Package)).$(Main)
133   else
134 < PackageList              = $(Packages) $(JavaPackages)
134 > PackageList              = $(PackageLibs) $(JavaPackages) $(Applications)
135   endif
136  
137   PackageListLoop          = $(patsubst %,$(SourceDir)/%/.loop,$(PackageList))
# Line 165 | Line 182 | ObjectFiles            = $(CFiles:%.c=        $(Packag
182   JniHeaders             = $(JniSource:%.java=  $(PackageSourceDir)/%.h)
183   ObjectFiles            = $(CFiles:%.c=        $(PackageTargetDir)/%.o)\
184                           $(CppFiles:%.cpp=    $(PackageTargetDir)/%.o)\
185 <                                     $(FortranFiles:%.f=  $(PackageTargetDir)/%.o)\
186 <                                     $(F90Files:%.F90=    $(PackageTargetDir)/%.o)\
187 <                                     $(LexFiles:%.l=      $(PackageTargetDir)/%.o)\
188 <                                     $(YaccFiles:%.y=     $(PackageTargetDir)/%.o)
185 >                         $(FortranFiles:%.f=  $(PackageTargetDir)/%.o)\
186 >                         $(F90Files:%.F90=    $(PackageTargetDir)/%.o)\
187 >                         $(LexFiles:%.l=      $(PackageTargetDir)/%.o)\
188 >                         $(YaccFiles:%.y=     $(PackageTargetDir)/%.o)
189   ParallelObjectFiles    = $(CFiles:%.c=        $(PackageParallelTargetDir)/%.o)\
190 <                                     $(CppFiles:%.cpp=    $(PackageParallelTargetDir)/%.o)\
191 <                                     $(FortranFiles:%.f=  $(PackageParallelTargetDir)/%.o)\
192 <                                     $(F90Files:%.F90=    $(PackageParallelTargetDir)/%.o)\
193 <                                     $(LexFiles:%.l=      $(PackageParallelTargetDir)/%.o)\
194 <                                     $(YaccFiles:%.y=     $(PackageParallelTargetDir)/%.o)
190 >                         $(CppFiles:%.cpp=    $(PackageParallelTargetDir)/%.o)\
191 >                         $(FortranFiles:%.f=  $(PackageParallelTargetDir)/%.o)\
192 >                         $(F90Files:%.F90=    $(PackageParallelTargetDir)/%.o)\
193 >                         $(LexFiles:%.l=      $(PackageParallelTargetDir)/%.o)\
194 >                         $(YaccFiles:%.y=     $(PackageParallelTargetDir)/%.o)
195  
196   DerivedSource          = $(YaccFiles:%.y=    %.h) \
197 <                               $(YaccFiles:%.y=    %.c) \
198 <                               $(LexFiles:%.l=     %.c)
197 >                         $(YaccFiles:%.y=    %.c) \
198 >                         $(LexFiles:%.l=     %.c)
199  
200   DerivedCFiles          = $(YaccFiles:%.y=    %.c) \
201 <                               $(LexFiles:%.l=     %.c)
201 >                         $(LexFiles:%.l=     %.c)
202  
203   OtherTargetFiles       = $(OtherSourceFiles:%=$(PackageTargetDir)/%)
204  
# Line 200 | Line 217 | ifneq  "$(words $(ObjectFiles) $(ParallelObjectFiles))
217      Executable             = $(BinDir)/$(Main)
218      ParallelExecutable     = $(BinDir)/$(Main)_MPI
219    else
220 <    SharedLibrary          = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package))).so
221 <    StaticLibrary          = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package))).a
220 >    SharedLibrary          = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package)))_UP.so
221 >    StaticLibrary          = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package)))_UP.a
222      ParallelSharedLibrary  = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package)))_MPI.so
223      ParallelStaticLibrary  = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package)))_MPI.a
224    endif
225   endif
226 +
227   #
228   # Misc
229   #
# Line 213 | Line 231 | LocalLibs        = $(subst /,,$(patsubst %, oopse_%, $
231   JavaPackageNames = $(subst /,.,$(JavaPackages))
232   IncludePath      = -I$(SourceDir) $(IncludeDirs:%=-I%)
233   LibDirs          = -L$(LibDir)    $(LibraryDirs:%=-L%)
234 < LocalLibs        = $(subst /,,$(patsubst %, oopse_%, $(PackageLibs)))
235 < LibList          = $(LocalLibs:%=-l%) $(Libraries:%=-l%)
234 > LocalLibs        = $(subst /,,$(patsubst %, oopse_%_UP, $(PackageLibs)))
235 > ParallelLocalLibs= $(subst /,,$(patsubst %, oopse_%_MPI, $(PackageLibs)))
236 > LibList          = $(LocalLibs:%=-l%) $(Libraries)
237 > LibNames         = $(LocalLibs:%=$(LibDir)/lib%.a)
238 > ParallelLibList  = $(ParallelLocalLibs:%=-l%) $(Libraries)
239 > ParallelLibNames = $(ParallelLocalLibs:%=$(LibDir)/lib%.a)
240  
241  
242   #---------------------------------------------------------------------------
# Line 223 | Line 245 | Move                   = mv
245   #
246   #---------------------------------------------------------------------------
247   Print                  = @echo
248 < Move                   = mv
248 > Move                   = mv -f
249   Copy                   = cp
250   CCompiler              = @CC@
251   CppCompiler            = @CXX@
252   Linker                 = @CXX@
253   MakeDepend             = makedepend
254 < Install                = @INSTALL@
254 > INSTALL                = @INSTALL@
255   InstallProgram         = @INSTALL_PROGRAM@
256   InstallData            = @INSTALL_DATA@
257 < MakeDir                = @MKINSTALLDIRS@
257 > MkDir                = @MKINSTALLDIRS@
258   Delete                 = rm -fr
259   StaticArchiver         = @AR@
260   DynamicArchiver        = @CC@
# Line 250 | Line 272 | Lex                    = @LEX@
272   List                   = cat
273   Yacc                   = @YACC@
274   Lex                    = @LEX@
275 + Ranlib                 = @RANLIB@
276 + Doxygen                = @DOXYGEN@
277  
254
278   MakeOptions            = -k
279   MakeDependOptions      =
280   StaticArchiverOptions  = rc
# Line 260 | Line 283 | FortranOptions         =
283   JniOptions             =
284   RmiOptions             = -d $(TargetDir) -classpath $(ClassPath) \
285                           -sourcepath $(SourceDir)
286 + COptions               = $(FrcDeclare) @CFLAGS@
287 + CParallelOptions       = $(FrcDeclare) $(ParallelDeclare) @CFLAGS@
288 + CppOptions             = $(FrcDeclare) @CXXFLAGS@
289 + CppParallelOptions     = $(FrcDeclare) $(ParallelDeclare) @CXXFLAGS@
290   FortranOptions         =
291 < F90Options             =  -I$(SourceDir) -module $(TargetDir)
291 > F90Options             =  @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) @MODDIRFLAG@$(TargetDir)
292 > F90ParallelOptions     =  @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) @MODDIRFLAG@$(ParallelTargetDir)  @PREPDEFFLAG@$(ParallelDeclare)
293   JavaCompilerOptions    = -d $(TargetDir) -classpath $(ClassPath) \
294                           -sourcepath $(SourceDir) -deprecation
295   JavaRunOptions         = -classpath $(ClassPath)
# Line 287 | Line 315 | Space                  = $(Empty) $(Empty)
315  
316   #---------------------------------------------------------------------------
317   #
318 + #  Install
319 + #
320 + #---------------------------------------------------------------------------
321 +
322 + ifneq "$(words $(SampleFiles))" "0"
323 +  MySample                 = $(subst $(shell cd $(DEV_ROOT)/samples; pwd)/,,$(CurrentDir))
324 +  MyInstallDir             = $(SampleSimDir)/$(MySample)
325 +  InstallFiles             = $(SampleFiles)
326 +  InstallCommand           = $(InstallData)
327 + endif
328 +
329 + ifneq "$(words $(Main))" "0"
330 +  MyInstallDir             = $(InstallBinDir)
331 +  ifeq "$(UseMPI)" "yes"
332 +    InstallFiles             = $(Executable) $(ParallelExecutable)
333 +  else
334 +    InstallFiles             = $(Executable)
335 +  endif
336 +  InstallCommand           = $(InstallProgram)
337 + endif
338 +
339 + ifneq "$(words $(ForcefieldFiles))" "0"
340 +  MyInstallDir             = $(ForceParamDir)
341 +  InstallFiles             = $(ForcefieldFiles)
342 +  InstallCommand           = $(InstallData)
343 + endif
344 +
345 + ifneq "$(words $(InstallFiles))" "0"
346 +  InstallList            =
347 + else
348 +  InstallList            = $(patsubst %,$(DEV_ROOT)/%,$(Samples)) $(DEV_ROOT)/forceFields $(patsubst %, $(SourceDir)/%,$(Applications))
349 + endif
350 +
351 + InstallListLoop          = $(patsubst %,$(SourceDir)/%/.install,$(PackageList))  $(patsubst %,%/.install,$(InstallList))
352 +
353 +
354 +
355 + #---------------------------------------------------------------------------
356 + #
357   # Rules
358   #
359   #---------------------------------------------------------------------------
# Line 304 | Line 371 | $(PackageTargetDir)/%.o : %.c
371          $(Print) $@
372          $(CCompiler) $(COptions) -c $(IncludePath) $< -o $@
373  
374 + $(PackageParallelTargetDir)/%.o : %.c
375 +        $(Print) $@
376 +        $(CCompiler) $(CParallelOptions) -c $(IncludePath) $< -o $@
377 +
378 + ifeq "$(UseMPI)" "yes"
379   %.o : %.c
380          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
381 +        $(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@
382 + else
383 + %.o : %.c
384 +        $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
385 + endif
386  
387   # .cpp -> .o
388   $(PackageTargetDir)/%.o : %.cpp
389          $(CppCompiler) $(CppOptions) -c $(IncludePath) $< -o $@
390  
391 + $(PackageParallelTargetDir)/%.o : %.cpp
392 +        $(CppCompiler) $(CppParallelOptions) -c $(IncludePath) $< -o $@
393 +
394 + ifeq "$(UseMPI)" "yes"
395   %.o : %.cpp
396          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
397 +        $(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@
398 + else
399 + %.o : %.cpp
400 +        $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
401 + endif
402  
403   # .f -> .o
404   $(PackageTargetDir)/%.o : %.f
405          $(FortranCompiler) $(FortranOptions) -c $< -o $@
406  
407 + $(PackageParallelTargetDir)/%.o : %.f
408 +        $(FortranCompiler) $(FortranParallelOptions) -c $< -o $@
409 +
410 + ifeq "$(UseMPI)" "yes"
411   %.o : %.f
412          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
413 +        $(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@
414 + else
415 + %.o : %.f
416 +        $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
417 + endif
418  
419   # .F90 -> .o
420   $(PackageTargetDir)/%.o : %.F90
421 <        $(F90Compiler) $(F90Options) -c $< -o $@
421 >        $(F90Compiler) $(F90Options) $(IncludePath) -c $< -o $@
422 >        if test -n "`ls *.$(ModSuffix)`"; then \
423 >          $(Move) `ls *.$(ModSuffix)` $(PackageTargetDir);\
424 >        fi
425  
426 + $(PackageParallelTargetDir)/%.o : %.F90
427 +        $(F90Compiler) $(F90ParallelOptions) $(IncludePath) -c $< -o $@
428 +        if test -n "`ls *.$(ModSuffix)`"; then \
429 +          $(Move) "`ls *.$(ModSuffix)`" $(PackageParallelTargetDir);\
430 +        fi
431 +
432 + ifeq "$(UseMPI)" "yes"
433   %.o : %.F90
434          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
435 +        if test -n "`ls *.$(ModSuffix)`"; then\
436 +          $(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\
437 +        fi
438  
439 +        $(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@
440 +        if test -n "`ls *.$(ModSuffix)`"; then\
441 +          $(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\
442 +        fi
443 +
444 + else
445 + %.o : %.F90
446 +        $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
447 +        if test -n "`ls *.$(ModSuffix)`"; then\
448 +          $(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\
449 +        fi
450 +
451 + endif
452 +
453 +
454   # .java -> .class
455   $(PackageTargetDir)/%.class : $(PackageSourceDir)/%.java
456          $(JavaCompiler) $(JavaCompilerOptions) $<
# Line 361 | Line 484 | $(LibDir)/%.a : $(ObjectFiles)
484          @$(Lex) -o$@ $?
485  
486   # .o -> .a
487 < $(LibDir)/%.a : $(ObjectFiles)
487 >
488 > $(LibDir)/%_UP.a : $(ObjectFiles)
489          $(StaticArchiver) $(StaticArchiverOptions) $@ $(ObjectFiles)
490 +        @touch $(LibDir)/.stamp_UP
491  
492 < %.a : $(ObjectFiles)
368 <        $(MAKE) $(MakeOptions) $(LibDir)/$@
369 <
370 < $(LibDir)/%_MPI.a : $(ParallelObjectFiles)
492 > $(LibDir)/%_MPI.a: $(ParallelObjectFiles)
493          $(StaticArchiver) $(StaticArchiverOptions) $@ $(ParallelObjectFiles)
494 +        @touch $(LibDir)/.stamp_MPI
495  
496 + %_UP.a : $(ObjectFiles)
497 +        $(MAKE) $(MakeOptions) $(LibDir)/$@
498 +
499   %_MPI.a : $(ParallelObjectFiles)
500          $(MAKE) $(MakeOptions) $(LibDir)/$@
501  
502   # .o -> .so
503 < $(LibDir)/%.so : $(ObjectFiles)
503 > $(LibDir)/%_UP.so : $(ObjectFiles)
504          $(DynamicArchiver) $(ObjectFiles) $(DynamicArchiverOptions) -o $@
505  
380 %.so : $(ObjectFiles)
381        $(MAKE) $(MakeOptions) $(LibDir)/$@
382
506   $(LibDir)/%_MPI.so : $(ParallelObjectFiles)
507          $(DynamicArchiver) $(ParallelObjectFiles) $(DynamicArchiverOptions) -o $@
508  
509 + %_UP.so : $(ObjectFiles)
510 +        $(MAKE) $(MakeOptions) $(LibDir)/$@
511 +
512   %_MPI.so : $(ParallelObjectFiles)
513          $(MAKE) $(MakeOptions) $(LibDir)/$@
514  
# Line 418 | Line 544 | $(PackageTargetDir)/%_Skel.class : $(PackageTargetDir)
544   %_Skel.class : %.class
545          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
546  
547 + document :
548 +        $(Print) Generate Documentation for OOPSE-2.0
549 +        @cd $(DEV_ROOT)/src    
550 +        $(Doxygen) $(DEV_ROOT)/make/Doxyfile
551 +
552 + #GUN make funtions to merge the libraries
553 + find_objs = $(shell $(StaticArchiver) -t $(1))
554 + extract_objs = $(shell $(StaticArchiver) -x $(1) $(call find_objs, $(1)))
555 + create_archive = $(shell  $(StaticArchiver) $(StaticArchiverOptions) $(2) $(call find_objs, $(1)))
556 + remove_objs = $(shell $(Delete) $(call find_objs, $(1)))
557 + do_create = $(call extract_objs,$(1))$(call create_archive,$(1),$(2))$(call remove_objs,$(1))  
558 +
559 + $(CombinedStaticLib) : $(LibDir)/.stamp_UP
560 +        $(Print) create $@      
561 +        $(foreach thisLib,$(LibNames),$(call do_create,$(thisLib),$@))
562 +        $(Ranlib) $(CombinedStaticLib)
563 +
564 + $(CombinedParallelStaticLib) : $(LibDir)/.stamp_MPI
565 +        $(Print) create $@
566 +        $(foreach thisLib,$(ParallelLibNames), $(call do_create, $(thisLib), $@))
567 +        $(Ranlib) $(CombinedParallelStaticLib)
568 +
569   # Executable
570 < $(Executable) : $(ObjectFiles)
571 <        $(Linker) $(LinkOptions) $(LibDirs) $(LibList) $(ObjectFiles) -o $@
570 > $(Executable) : $(CombinedStaticLib) $(ObjectFiles)
571 >        $(Linker) $(ObjectFiles) $(LinkOptions) $(LibDirs) $(CombinedStaticLib) $(Libraries) -o $@
572  
573 < $(ParallelExecutable) : $(ParallelObjectFiles)
574 <        $(Linker) $(LinkOptions) $(LibDirs) $(LibList) $(ParallelObjectFiles) -o $@
573 > $(ParallelExecutable) : $(CombinedParallelStaticLib) $(ParallelObjectFiles)
574 >        $(Linker) $(ParallelObjectFiles) $(ParallelLinkOptions) $(LibDirs) $(CombinedParallelStaticLib) $(Libraries) -o $@
575  
576   # Anything else is just copied from source to target
577   $(PackageTargetDir)/% : $(PackageSourceDir)/%
# Line 436 | Line 584 | _buildall : \
584  
585   _all : _buildall
586  
587 + _buildall :
588 + ifeq "$(UseMPI)" "yes"
589   _buildall : \
590          $(DependencyFile) \
591          $(PackageTargetDir) \
592          $(ObjectFiles) \
593 +        $(ParallelObjectFiles) \
594          $(JavaClassFiles) \
595          $(RmiStubFiles) \
596          $(RmiSkeletonFiles) \
597          $(OtherTargetFiles) \
447        $(SharedLibrary) \
598          $(StaticLibrary) \
599 +        $(ParallelStaticLibrary) \
600          $(JarFile) \
601 <        $(Executable)
602 <        
601 >        $(Executable) \
602 >        $(ParallelExecutable)
603 > else
604 > _buildall : \
605 >        $(DependencyFile) \
606 >        $(PackageTargetDir) \
607 >        $(ObjectFiles) \
608 >        $(JavaClassFiles) \
609 >        $(RmiStubFiles) \
610 >        $(RmiSkeletonFiles) \
611 >        $(OtherTargetFiles) \
612 >        $(StaticLibrary) \
613 >        $(JarFile) \
614 >        $(Executable)
615 > endif
616  
617 +
618   # make clean
619   clean : $(PackageListLoop)
620          $(Print) Done clean.    
# Line 464 | Line 629 | _distcleanall :
629   _distcleanall :
630          $(Delete) $(ObjectFiles) \
631                    $(ParallelObjectFiles) \
632 <                  $(JarFile) \
632 >                        $(JarFile) \
633                    $(SharedLibrary) \
634                    $(StaticLibrary) \
635                    $(ParallelSharedLibrary) \
636                    $(ParallelStaticLibrary) \
637                    $(Executable) \
638                    $(ParallelExecutable) \
639 <                  $(DependencyFile)
639 >                  $(DependencyFile)
640  
641  
642   # make depend
# Line 484 | Line 649 | $(DependencyFile) : $(DerivedSource)
649          $(Print) $@
650          @cd $(PackageSourceDir)
651  
487        touch Make.ctemp
488        touch Make.ctemp
489
652   ifneq "$(words $(CppFiles))" "0"
653 <        $(CppCompiler) $(IncludePath) -MM $(CppFiles)  > Make.cpptemp
654 <        cat Make.cpptemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/obj\/&/g' >> $(DependencyFile)
655 <        cat Make.cpptemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/MPIobj\/&/g' >> $(DependencyFile)
653 >        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(TargetDir)/' -MM $(CppFiles)>> Make.cpptemp
654 >        @cat Make.cpptemp  >> $(DependencyFile)
655 >        $(Delete) Make.cpptemp
656 >
657 >  ifeq "$(UseMPI)" "yes"
658 >        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) -MM $(CppFiles)>> Make.cpptemp
659 >        @cat Make.cpptemp  >> $(DependencyFile)
660 >        @$(Delete) Make.cpptemp
661 >  endif
662 >
663   endif
664  
665   ifneq "$(words $(CFiles))" "0"
666 <        $(CCompiler)   $(IncludePath) -MM $(CFiles) $(DerivedCFiles)   > Make.ctemp
667 <        cat Make.ctemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/obj\/&/g' >> $(DependencyFile)
668 <        cat Make.ctemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/MPIobj\/&/g' >> $(DependencyFile)
666 >        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(TargetDir)/'  -MM $(CFiles) $(DerivedCFiles)  >> Make.ctemp
667 >        @cat Make.ctemp  >> $(DependencyFile)
668 >        $(Delete) Make.ctemp
669  
670 +  ifeq "$(UseMPI)" "yes"
671 +        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) -MM $(CFiles) $(DerivedCFiles)  >> Make.ctemp
672 +        @cat Make.ctemp  >> $(DependencyFile)
673 +        @$(Delete) Make.ctemp
674 +  endif
675 +
676   endif
677  
678   ifneq "$(words $(F90Files))" "0"
679 <        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(DEV_ROOT)/obj/' -D__F90  *.F90 > Make.ftemp
680 <        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(DEV_ROOT)/MPIobj/' -DIS_MPI -D__F90  *.F90 >> Make.ftemp
681 <        cat Make.ftemp >> $(DependencyFile)
679 >        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(TargetDir)/' $(F90Declare) -MM -mc $(ModuleCase) -ms $(ModSuffix) $(F90Files) > Make.ftemp
680 >        @cat Make.ftemp >> $(DependencyFile)
681 >        @$(Delete) Make.ftemp
682 >
683 >  ifeq "$(UseMPI)" "yes"
684 >        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) $(F90Declare) -MM -mc $(ModuleCase) -ms $(ModSuffix)  $(F90Files) >> Make.ftemp
685 >        @cat Make.ftemp >> $(DependencyFile)
686 >        @$(Delete) Make.ftemp
687 >  endif
688 >
689   endif
508        $(Delete) Make.cpptemp Make.ctemp Make.ftemp
690  
691   # make lib
692   lib    : $(PackageListLoop)
# Line 518 | Line 699 | jarsign : $(JarFile)
699   jarsign : $(JarFile)
700          $(JarSigner) -keystore GeoSoftKeystore $(JarFile) myself
701  
702 + #make install
703 + %.install :
704 +        @$(MAKE) $(MakeOptions) -C $(subst .install,,$@) _installall    
705 +
706 + install : $(InstallListLoop)
707 +        $(Print) Done Install
708 +
709 + _installall : _buildall _installdata
710 +
711 + $(MyInstallDir) :
712 +        $(MkDir) $@
713 +
714 + _installdata :  $(MyInstallDir)
715 +        $(Print) $(InstallFiles)
716 + ifneq "$(words $(InstallFiles))" "0"
717 +        $(InstallData) $(InstallFiles) $(MyInstallDir)
718 + endif      
719 +
720   # make statistics
721   _statisticsall :
722 <        @$(Print) $(SourceFiles) >> $(DEV_ROOT)/files.tmp
722 >        @$(Print) $(patsubst %,$(CurrentDir)/%,$(SourceFiles)) >> $(DEV_ROOT)/files.tmp
723  
724   statistics : $(PackageListLoop)
725          @$(List) $(DEV_ROOT)/files.tmp | xargs $(WordCount) $(WordCountOptions)
# Line 534 | Line 733 | pure : $(Executable).pure
733  
734   pure : $(Executable).pure
735  
736 + #make cvslog
737 + cvslog:
738 +        $(DEV_ROOT)/scripts/cvs2cl.pl
739 +
740   # Execute
741   _runexe :
742          $(Executable) $(RunParameters)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines