ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-3.0/make/Makefile.in
(Generate patch)

Comparing trunk/OOPSE-3.0/make/Makefile.in (file contents):
Revision 1524 by tim, Tue Oct 5 14:14:46 2004 UTC vs.
Revision 2126 by gezelter, Mon Mar 21 19:22:55 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 = \
84 <        @SPRNG_LIB@ \
85 <        @MPI_LIB@
84 >        @MPI_LIB@ \
85 >        @MPI_F90_LIB@
86  
86 LinkOptions = \
87        @F90LIBS@
88
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 107 | Line 116 | CurrentDir        = $(CURDIR)
116   BinDir            = $(DEV_ROOT)/bin
117   DocsDir           = $(DEV_ROOT)/docs
118   CurrentDir        = $(CURDIR)
119 + CombinedStaticLib = $(LibDir)/libOOPSE.a
120 + CombinedParallelStaticLib = $(LibDir)/libOOPSE_MPI.a
121  
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 121 | 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 172 | Line 185 | ObjectFiles            = $(CFiles:%.c=        $(Packag
185   JniHeaders             = $(JniSource:%.java=  $(PackageSourceDir)/%.h)
186   ObjectFiles            = $(CFiles:%.c=        $(PackageTargetDir)/%.o)\
187                           $(CppFiles:%.cpp=    $(PackageTargetDir)/%.o)\
188 <                                     $(FortranFiles:%.f=  $(PackageTargetDir)/%.o)\
189 <                                     $(F90Files:%.F90=    $(PackageTargetDir)/%.o)\
190 <                                     $(LexFiles:%.l=      $(PackageTargetDir)/%.o)\
191 <                                     $(YaccFiles:%.y=     $(PackageTargetDir)/%.o)
188 >                         $(FortranFiles:%.f=  $(PackageTargetDir)/%.o)\
189 >                         $(F90Files:%.F90=    $(PackageTargetDir)/%.o)\
190 >                         $(LexFiles:%.l=      $(PackageTargetDir)/%.o)\
191 >                         $(YaccFiles:%.y=     $(PackageTargetDir)/%.o)
192   ParallelObjectFiles    = $(CFiles:%.c=        $(PackageParallelTargetDir)/%.o)\
193 <                                     $(CppFiles:%.cpp=    $(PackageParallelTargetDir)/%.o)\
194 <                                     $(FortranFiles:%.f=  $(PackageParallelTargetDir)/%.o)\
195 <                                     $(F90Files:%.F90=    $(PackageParallelTargetDir)/%.o)\
196 <                                     $(LexFiles:%.l=      $(PackageParallelTargetDir)/%.o)\
197 <                                     $(YaccFiles:%.y=     $(PackageParallelTargetDir)/%.o)
193 >                         $(CppFiles:%.cpp=    $(PackageParallelTargetDir)/%.o)\
194 >                         $(FortranFiles:%.f=  $(PackageParallelTargetDir)/%.o)\
195 >                         $(F90Files:%.F90=    $(PackageParallelTargetDir)/%.o)\
196 >                         $(LexFiles:%.l=      $(PackageParallelTargetDir)/%.o)\
197 >                         $(YaccFiles:%.y=     $(PackageParallelTargetDir)/%.o)
198  
199   DerivedSource          = $(YaccFiles:%.y=    %.h) \
200 <                               $(YaccFiles:%.y=    %.c) \
201 <                               $(LexFiles:%.l=     %.c)
200 >                         $(YaccFiles:%.y=    %.c) \
201 >                         $(LexFiles:%.l=     %.c)
202  
203   DerivedCFiles          = $(YaccFiles:%.y=    %.c) \
204 <                               $(LexFiles:%.l=     %.c)
204 >                         $(LexFiles:%.l=     %.c)
205  
206   OtherTargetFiles       = $(OtherSourceFiles:%=$(PackageTargetDir)/%)
207  
# Line 203 | 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
222    else
223 <    SharedLibrary          = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package))).so
224 <    StaticLibrary          = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package))).a
223 >    SharedLibrary          = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package)))_UP.so
224 >    StaticLibrary          = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package)))_UP.a
225      ParallelSharedLibrary  = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package)))_MPI.so
226      ParallelStaticLibrary  = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package)))_MPI.a
227    endif
228   endif
229 +
230   #
231   # Misc
232   #
# Line 220 | Line 234 | LocalLibs        = $(subst /,,$(patsubst %, oopse_%, $
234   JavaPackageNames = $(subst /,.,$(JavaPackages))
235   IncludePath      = -I$(SourceDir) $(IncludeDirs:%=-I%)
236   LibDirs          = -L$(LibDir)    $(LibraryDirs:%=-L%)
237 < LocalLibs        = $(subst /,,$(patsubst %, oopse_%, $(PackageLibs)))
237 > LocalLibs        = $(subst /,,$(patsubst %, oopse_%_UP, $(PackageLibs)))
238   ParallelLocalLibs= $(subst /,,$(patsubst %, oopse_%_MPI, $(PackageLibs)))
239   LibList          = $(LocalLibs:%=-l%) $(Libraries)
240 < ParallelLibList  = $(LocalLibs:%=-l%) $(Libraries)
240 > LibNames         = $(LocalLibs:%=$(LibDir)/lib%.a)
241 > ParallelLibList  = $(ParallelLocalLibs:%=-l%) $(Libraries)
242 > ParallelLibNames = $(ParallelLocalLibs:%=$(LibDir)/lib%.a)
243  
244  
245   #---------------------------------------------------------------------------
# Line 232 | Line 248 | Move                   = mv
248   #
249   #---------------------------------------------------------------------------
250   Print                  = @echo
251 < Move                   = mv
251 > Move                   = mv -f
252   Copy                   = cp
253   CCompiler              = @CC@
254   CppCompiler            = @CXX@
255   Linker                 = @CXX@
256   MakeDepend             = makedepend
257 < Install                = @INSTALL@
257 > INSTALL                = @INSTALL@
258   InstallProgram         = @INSTALL_PROGRAM@
259 + InstallScript          = @INSTALL_SCRIPT@
260   InstallData            = @INSTALL_DATA@
261 < MakeDir                = @MKINSTALLDIRS@
261 > MkDir                  = @MKINSTALLDIRS@
262   Delete                 = rm -fr
263   StaticArchiver         = @AR@
264   DynamicArchiver        = @CC@
# Line 259 | Line 276 | Lex                    = @LEX@
276   List                   = cat
277   Yacc                   = @YACC@
278   Lex                    = @LEX@
279 + Ranlib                 = @RANLIB@
280 + Doxygen                = @DOXYGEN@
281  
263
282   MakeOptions            = -k
283   MakeDependOptions      =
284   StaticArchiverOptions  = rc
# Line 269 | Line 287 | COptions               = $(FrcDeclare)
287   JniOptions             =
288   RmiOptions             = -d $(TargetDir) -classpath $(ClassPath) \
289                           -sourcepath $(SourceDir)
290 < COptions               = $(FrcDeclare)
291 < CParallelOptions       = $(FrcDeclare) $(ParallelDeclare)
292 < CppOptions             = $(FrcDeclare)
293 < CppParallelOptions     = $(FrcDeclare) $(ParallelDeclare)
290 > COptions               = $(FrcDeclare) @CFLAGS@
291 > CParallelOptions       = $(FrcDeclare) $(ParallelDeclare) @CFLAGS@
292 > CppOptions             = $(FrcDeclare) @CXXFLAGS@ @OOPSE_TEMPLATE_FLAGS@
293 > CppParallelOptions     = $(FrcDeclare) $(ParallelDeclare) @CXXFLAGS@ @OOPSE_TEMPLATE_FLAGS@
294   FortranOptions         =
295 < F90Options             =  @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) -module $(TargetDir)
296 < F90ParallelOptions     =  @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) -module $(TargetDir)  @PREPDEFFLAG@$(ParallelDeclare)
295 > F90Options             =  @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) @MODDIRFLAG@$(TargetDir)
296 > F90ParallelOptions     =  @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) @MODDIRFLAG@$(ParallelTargetDir)  @PREPDEFFLAG@$(ParallelDeclare)
297   JavaCompilerOptions    = -d $(TargetDir) -classpath $(ClassPath) \
298                           -sourcepath $(SourceDir) -deprecation
299   JavaRunOptions         = -classpath $(ClassPath)
# Line 301 | Line 319 | Space                  = $(Empty) $(Empty)
319  
320   #---------------------------------------------------------------------------
321   #
322 + #  Install
323 + #
324 + #---------------------------------------------------------------------------
325 +
326 + ifneq "$(words $(SampleFiles))" "0"
327 +  MySample                 = $(subst $(shell cd $(DEV_ROOT)/samples; pwd)/,,$(CurrentDir))
328 +  MyInstallDir             = $(SampleSimDir)/$(MySample)
329 +  InstallFiles             = $(SampleFiles)
330 +  InstallCommand           = $(InstallData)
331 + endif
332 +
333 + ifneq "$(words $(Main))" "0"
334 +  MyInstallDir             = $(InstallBinDir)
335 +  ifeq "$(UseMPI)" "yes"
336 +    InstallFiles             = $(Executable) $(ParallelExecutable)
337 +  else
338 +    InstallFiles             = $(Executable)
339 +  endif
340 +  InstallCommand           = $(InstallProgram)
341 + endif
342 +
343 + ifneq "$(words $(ForcefieldFiles))" "0"
344 +  MyInstallDir             = $(ForceParamDir)
345 +  InstallFiles             = $(ForcefieldFiles)
346 +  InstallCommand           = $(InstallData)
347 + endif
348 +
349 + ifneq "$(words $(InstallFiles))" "0"
350 +  InstallList            =
351 + else
352 +  InstallList            = $(patsubst %,$(DEV_ROOT)/%,$(Samples)) $(DEV_ROOT)/forceFields $(patsubst %, $(SourceDir)/%,$(Applications))
353 + endif
354 +
355 + InstallListLoop          = $(patsubst %,$(SourceDir)/%/.install,$(PackageList))  $(patsubst %,%/.install,$(InstallList))
356 +
357 +
358 +
359 + #---------------------------------------------------------------------------
360 + #
361   # Rules
362   #
363   #---------------------------------------------------------------------------
# Line 311 | Line 368 | $(PackageTargetDir) :
368  
369   # Create target directory
370   $(PackageTargetDir) :
371 <        $(MakeDir) $@
371 >        $(MkDir) $@
372  
373 + $(BinDir) :
374 +        $(MkDir) $@
375 +
376   # .c -> .o
377   $(PackageTargetDir)/%.o : %.c
378          $(Print) $@
379          $(CCompiler) $(COptions) -c $(IncludePath) $< -o $@
380  
381 + $(PackageParallelTargetDir)/%.o : %.c
382 +        $(Print) $@
383 +        $(CCompiler) $(CParallelOptions) -c $(IncludePath) $< -o $@
384 +
385 + ifeq "$(UseMPI)" "yes"
386   %.o : %.c
387          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
388 +        $(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@
389 + else
390 + %.o : %.c
391 +        $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
392 + endif
393  
394   # .cpp -> .o
395   $(PackageTargetDir)/%.o : %.cpp
396          $(CppCompiler) $(CppOptions) -c $(IncludePath) $< -o $@
397  
398 + $(PackageParallelTargetDir)/%.o : %.cpp
399 +        $(CppCompiler) $(CppParallelOptions) -c $(IncludePath) $< -o $@
400 +
401 + ifeq "$(UseMPI)" "yes"
402   %.o : %.cpp
403          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
404 +        $(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@
405 + else
406 + %.o : %.cpp
407 +        $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
408 + endif
409  
410   # .f -> .o
411   $(PackageTargetDir)/%.o : %.f
412          $(FortranCompiler) $(FortranOptions) -c $< -o $@
413  
414 + $(PackageParallelTargetDir)/%.o : %.f
415 +        $(FortranCompiler) $(FortranParallelOptions) -c $< -o $@
416 +
417 + ifeq "$(UseMPI)" "yes"
418   %.o : %.f
419          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
420 +        $(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@
421 + else
422 + %.o : %.f
423 +        $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
424 + endif
425  
426   # .F90 -> .o
427   $(PackageTargetDir)/%.o : %.F90
428 <        $(F90Compiler) $(F90Options) -c $< -o $@
428 >        $(F90Compiler) $(F90Options) $(IncludePath) -c $< -o $@
429 >        if test -n "`ls *.$(ModSuffix)`"; then \
430 >          $(Move) `ls *.$(ModSuffix)` $(PackageTargetDir);\
431 >        fi
432  
433 + $(PackageParallelTargetDir)/%.o : %.F90
434 +        $(F90Compiler) $(F90ParallelOptions) $(IncludePath) -c $< -o $@
435 +        if test -n "`ls *.$(ModSuffix)`"; then \
436 +          $(Move) "`ls *.$(ModSuffix)`" $(PackageParallelTargetDir);\
437 +        fi
438 +
439 + ifeq "$(UseMPI)" "yes"
440   %.o : %.F90
441          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
442 +        if test -n "`ls *.$(ModSuffix)`"; then\
443 +          $(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\
444 +        fi
445  
446 +        $(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@
447 +        if test -n "`ls *.$(ModSuffix)`"; then\
448 +          $(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\
449 +        fi
450 +
451 + else
452 + %.o : %.F90
453 +        $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
454 +        if test -n "`ls *.$(ModSuffix)`"; then\
455 +          $(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\
456 +        fi
457 + endif
458 +
459 +
460   # .java -> .class
461   $(PackageTargetDir)/%.class : $(PackageSourceDir)/%.java
462          $(JavaCompiler) $(JavaCompilerOptions) $<
# Line 375 | Line 490 | $(LibDir)/%.a : $(ObjectFiles)
490          @$(Lex) -o$@ $?
491  
492   # .o -> .a
493 < $(LibDir)/%.a : $(ObjectFiles)
493 >
494 > $(LibDir)/%_UP.a : $(ObjectFiles)
495          $(StaticArchiver) $(StaticArchiverOptions) $@ $(ObjectFiles)
496 +        @touch $(LibDir)/.stamp_UP
497  
498 < %.a : $(ObjectFiles)
382 <        $(MAKE) $(MakeOptions) $(LibDir)/$@
383 <
384 < $(LibDir)/%_MPI.a : $(ParallelObjectFiles)
498 > $(LibDir)/%_MPI.a: $(ParallelObjectFiles)
499          $(StaticArchiver) $(StaticArchiverOptions) $@ $(ParallelObjectFiles)
500 +        @touch $(LibDir)/.stamp_MPI
501  
502 + %_UP.a : $(ObjectFiles)
503 +        $(MAKE) $(MakeOptions) $(LibDir)/$@
504 +
505   %_MPI.a : $(ParallelObjectFiles)
506          $(MAKE) $(MakeOptions) $(LibDir)/$@
507  
508   # .o -> .so
509 < $(LibDir)/%.so : $(ObjectFiles)
509 > $(LibDir)/%_UP.so : $(ObjectFiles)
510          $(DynamicArchiver) $(ObjectFiles) $(DynamicArchiverOptions) -o $@
511  
394 %.so : $(ObjectFiles)
395        $(MAKE) $(MakeOptions) $(LibDir)/$@
396
512   $(LibDir)/%_MPI.so : $(ParallelObjectFiles)
513          $(DynamicArchiver) $(ParallelObjectFiles) $(DynamicArchiverOptions) -o $@
514  
515 + %_UP.so : $(ObjectFiles)
516 +        $(MAKE) $(MakeOptions) $(LibDir)/$@
517 +
518   %_MPI.so : $(ParallelObjectFiles)
519          $(MAKE) $(MakeOptions) $(LibDir)/$@
520  
# Line 432 | Line 550 | $(PackageTargetDir)/%_Skel.class : $(PackageTargetDir)
550   %_Skel.class : %.class
551          $(MAKE) $(MakeOptions) $(PackageTargetDir)/$@
552  
553 + document :
554 +        $(Print) Generate Documentation for OOPSE-2.0
555 +        @cd $(DEV_ROOT)/src    
556 +        $(Doxygen) $(DEV_ROOT)/make/Doxyfile
557 +
558 + #GUN make funtions to merge the libraries
559 + find_objs = $(shell $(StaticArchiver) -t $(1))
560 + extract_objs = $(shell $(StaticArchiver) -x $(1) $(call find_objs, $(1)))
561 + create_archive = $(shell  $(StaticArchiver) $(StaticArchiverOptions) $(2) $(call find_objs, $(1)))
562 + remove_objs = $(shell $(Delete) $(call find_objs, $(1)))
563 + do_create = $(call extract_objs,$(1))$(call create_archive,$(1),$(2))$(call remove_objs,$(1))  
564 +
565 + $(CombinedStaticLib) : $(LibDir)/.stamp_UP
566 +        $(Print) create $@      
567 +        $(foreach thisLib,$(LibNames),$(call do_create,$(thisLib),$@))
568 +        $(Ranlib) $(CombinedStaticLib)
569 +
570 + $(CombinedParallelStaticLib) : $(LibDir)/.stamp_MPI
571 +        $(Print) create $@
572 +        $(foreach thisLib,$(ParallelLibNames), $(call do_create, $(thisLib), $@))
573 +        $(Ranlib) $(CombinedParallelStaticLib)
574 +
575   # Executable
576 < $(Executable) : $(ObjectFiles)
577 <        $(Linker) $(LinkOptions) $(LibDirs) $(LibList) $(ObjectFiles) -o $@
576 > $(Executable) : $(CombinedStaticLib) $(ObjectFiles) $(BinDir)
577 >        $(Linker) $(ObjectFiles) $(CombinedStaticLib) $(LinkOptions) $(LibDirs) $(Libraries) -o $@
578  
579 < $(ParallelExecutable) : $(ParallelObjectFiles)
580 <        $(Linker) $(LinkOptions) $(LibDirs) $(ParallelLibList) $(ParallelObjectFiles) -o $@
579 > $(ParallelExecutable) : $(CombinedParallelStaticLib) $(ParallelObjectFiles) $(BinDir)
580 >        $(Linker) $(ParallelObjectFiles) $(CombinedParallelStaticLib) $(ParallelLinkOptions) $(LibDirs) $(Libraries) -o $@
581  
582   # Anything else is just copied from source to target
583   $(PackageTargetDir)/% : $(PackageSourceDir)/%
# Line 450 | Line 590 | _buildall : \
590  
591   _all : _buildall
592  
593 + _buildall :
594 + ifeq "$(UseMPI)" "yes"
595   _buildall : \
596          $(DependencyFile) \
597          $(PackageTargetDir) \
598          $(ObjectFiles) \
599 +        $(ParallelObjectFiles) \
600          $(JavaClassFiles) \
601          $(RmiStubFiles) \
602          $(RmiSkeletonFiles) \
603          $(OtherTargetFiles) \
461        $(SharedLibrary) \
604          $(StaticLibrary) \
605 +        $(ParallelStaticLibrary) \
606          $(JarFile) \
607 <        $(Executable)
608 <        
607 >        $(Executable) \
608 >        $(ParallelExecutable)
609 > else
610 > _buildall : \
611 >        $(DependencyFile) \
612 >        $(PackageTargetDir) \
613 >        $(ObjectFiles) \
614 >        $(JavaClassFiles) \
615 >        $(RmiStubFiles) \
616 >        $(RmiSkeletonFiles) \
617 >        $(OtherTargetFiles) \
618 >        $(StaticLibrary) \
619 >        $(JarFile) \
620 >        $(Executable)
621 > endif
622  
623 +
624   # make clean
625   clean : $(PackageListLoop)
626          $(Print) Done clean.    
627  
628   _cleanall :
629 <        $(Delete) $(ObjectFiles) $(ParallelObjectFiles)
629 >        $(Delete) \
630 >                $(ObjectFiles) \
631 >                $(ParallelObjectFiles) \
632 >                $(JarFile) \
633 >                $(SharedLibrary) \
634 >                $(StaticLibrary) \
635 >                $(ParallelSharedLibrary) \
636 >                $(ParallelStaticLibrary) \
637 >                $(CombinedStaticLib) \
638 >                $(CombinedParallelStaticLib)
639  
640   # make distclean
641   distclean : $(PackageListLoop)
642          $(Print) Done clean.    
643  
644 < _distcleanall :
645 <        $(Delete) $(ObjectFiles) \
480 <                  $(ParallelObjectFiles) \
481 <                        $(JarFile) \
482 <                  $(SharedLibrary) \
483 <                  $(StaticLibrary) \
484 <                  $(ParallelSharedLibrary) \
485 <                  $(ParallelStaticLibrary) \
486 <                  $(Executable) \
644 > _distcleanall : _cleanall
645 >        $(Delete) $(Executable) \
646                    $(ParallelExecutable) \
647                    $(DependencyFile)
648  
490
649   # make depend
650   depend : $(PackageListLoop)
651          $(Print) Done dependencies.
# Line 498 | Line 656 | $(DependencyFile) : $(DerivedSource)
656          $(Print) $@
657          @cd $(PackageSourceDir)
658  
501        @touch Make.ctemp
502        @touch Make.ctemp
503
659   ifneq "$(words $(CppFiles))" "0"
660 <        $(CppCompiler) $(IncludePath) -MM $(CppFiles)  > Make.cpptemp
661 <        cat Make.cpptemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/obj\/&/g' >> $(DependencyFile)
662 <        cat Make.cpptemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/MPIobj\/&/g' >> $(DependencyFile)
660 >        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(TargetDir)/' -MM $(CppFiles)>> Make.cpptemp
661 >        @cat Make.cpptemp  >> $(DependencyFile)
662 >        $(Delete) Make.cpptemp
663 >
664 >  ifeq "$(UseMPI)" "yes"
665 >        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) -MM $(CppFiles)>> Make.cpptemp
666 >        @cat Make.cpptemp  >> $(DependencyFile)
667 >        @$(Delete) Make.cpptemp
668 >  endif
669 >
670   endif
671  
672   ifneq "$(words $(CFiles))" "0"
673 <        $(CCompiler)   $(IncludePath) -MM $(CFiles) $(DerivedCFiles)   > Make.ctemp
674 <        cat Make.ctemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/obj\/&/g' >> $(DependencyFile)
675 <        cat Make.ctemp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/MPIobj\/&/g' >> $(DependencyFile)
673 >        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(TargetDir)/'  -MM $(CFiles) $(DerivedCFiles)  >> Make.ctemp
674 >        @cat Make.ctemp  >> $(DependencyFile)
675 >        $(Delete) Make.ctemp
676  
677 +  ifeq "$(UseMPI)" "yes"
678 +        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) -MM $(CFiles) $(DerivedCFiles)  >> Make.ctemp
679 +        @cat Make.ctemp  >> $(DependencyFile)
680 +        @$(Delete) Make.ctemp
681 +  endif
682 +
683   endif
684  
685   ifneq "$(words $(F90Files))" "0"
686 <        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(DEV_ROOT)/obj/' -D__FORTRAN90  $(F90Files) > Make.ftemp
687 <        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(DEV_ROOT)/MPIobj/' -DIS_MPI -D__FORTRAN90  $(F90Files) >> Make.ftemp
688 <        cat Make.ftemp >> $(DependencyFile)
686 >        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(TargetDir)/' $(F90Declare) -MM -mc $(ModuleCase) -ms $(ModSuffix) $(F90Files) > Make.ftemp
687 >        @cat Make.ftemp >> $(DependencyFile)
688 >        @$(Delete) Make.ftemp
689 >
690 >  ifeq "$(UseMPI)" "yes"
691 >        $(DEV_ROOT)/scripts/filepp  -I $(DEV_ROOT)/src -od '$$(ParallelTargetDir)/' $(ParallelDeclare) $(F90Declare) -MM -mc $(ModuleCase) -ms $(ModSuffix)  $(F90Files) >> Make.ftemp
692 >        @cat Make.ftemp >> $(DependencyFile)
693 >        @$(Delete) Make.ftemp
694 >  endif
695 >
696   endif
522        $(Delete) Make.cpptemp Make.ctemp Make.ftemp
697  
698   # make lib
699   lib    : $(PackageListLoop)
# Line 532 | Line 706 | jarsign : $(JarFile)
706   jarsign : $(JarFile)
707          $(JarSigner) -keystore GeoSoftKeystore $(JarFile) myself
708  
709 + #make install
710 + %.install :
711 +        @$(MAKE) $(MakeOptions) -C $(subst .install,,$@) _installall    
712 +
713 + install : $(InstallListLoop)
714 +        $(Print) Done Install
715 +
716 + _installall : _buildall _installdata
717 +
718 + $(MyInstallDir) :
719 +        $(MkDir) $@
720 +
721 + _installdata :  $(MyInstallDir)
722 +        $(Print) $(InstallFiles)
723 + ifneq "$(words $(InstallFiles))" "0"
724 +        $(InstallCommand) $(InstallFiles) $(MyInstallDir)
725 + endif      
726 +
727   # make statistics
728   _statisticsall :
729 <        @$(Print) $(SourceFiles) >> $(DEV_ROOT)/files.tmp
729 >        @$(Print) $(patsubst %,$(CurrentDir)/%,$(SourceFiles)) >> $(DEV_ROOT)/files.tmp
730  
731   statistics : $(PackageListLoop)
732          @$(List) $(DEV_ROOT)/files.tmp | xargs $(WordCount) $(WordCountOptions)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines