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 1932 by tim, Wed Jan 12 23:17:02 2005 UTC vs.
Revision 2176 by gezelter, Tue Apr 12 21:26:42 2005 UTC

# Line 49 | Line 49 | PackageLibs = \
49          integrators\
50          constraints \
51          minimizers \
52 +        selection \
53 +        restraints \
54 +        lattice \
55  
56   #packages containing applications
57   Applications = \
58          applications/oopse \
59          applications/dump2Xyz \
60 +        applications/staticProps \
61 +        applications/dynamicProps \
62          applications/simpleBuilder\
63 +        applications/nanoRodBuilder \
64  
65   Samples = \
66          samples/argon \
# Line 71 | Line 77 | IncludeDirs = \
77          samples/zcons \
78  
79   IncludeDirs = \
74        @SPRNG_INC_DIR@ \
80          @MPI_INC_DIR@
81  
82   LibraryDirs = \
78        @SPRNG_LIB_DIR@ \
83          @MPI_LIB_DIR@
84  
85   Libraries = \
82        @SPRNG_LIB@ \
86          @MPI_LIB@ \
87          @MPI_F90_LIB@
88  
# Line 123 | Line 126 | Package          = $(subst $(shell cd $(SourceDir); pw
126   # /home/maul/gezelter/src/code/src/UseTheForce/Darkside --> UseTheForce/Darkside
127   #Package          = $(shell echo $(CurrentDir) | sed -e 's/^.*\/src\/\(.*\)/\1/g')
128   #use shell script to get the absolute path and then rip it off from $(CurrentDir)
129 < Package          = $(subst $(shell cd $(SourceDir); pwd)/,,$(CurrentDir))
129 > #Package          = $(subst $(shell cd $(SourceDir); pwd)/,,$(CurrentDir))
130 > # REMINDER: We are now using the Package line in each subdir makefile.
131 > # This avoids the strange path problem and the subshell
132  
133   PackageList              = $(Package)
134   PackageSourceDir         = $(SourceDir)/$(Package)
# Line 201 | Line 206 | OtherTargetFiles       = $(OtherSourceFiles:%=$(Packag
206                           $(LexFiles:%.l=     %.c)
207  
208   OtherTargetFiles       = $(OtherSourceFiles:%=$(PackageTargetDir)/%)
209 +
210 + ###########################################################################
211 + #
212 + # Figure out the names of the module files based on some work done by
213 + # configure.  The tr function below is from John Graham-Cumming
214 + # (http://www.jgc.org).
215 + #
216 + # The tr function.   Has three arguments:
217 + #
218 + # $1   The list of characters to translate from
219 + # $2   The list of characters to translate to
220 + # $3   The text to translate
221 + #
222 + # For example, $(call tr,A B C,1 2 3,CAPITAL) becomes 21PIT1L.
223 +
224 + tr = $(eval __t := $3)                                                    \
225 +     $(foreach c,                                                         \
226 +         $(join $(addsuffix :,$1),$2),                                    \
227 +         $(eval __t :=                                                    \
228 +             $(subst $(word 1,$(subst :, ,$c)),$(word 2,$(subst :, ,$c)), \
229 +                 $(__t))))$(__t)
230 +
231 + # Common character classes for use with the tr function.  Each of
232 + # these is actually a variable declaration and must be wrapped with
233 + # $() or ${} to be used.
234 +
235 + [A-Z] := A B C D E F G H I J K L M N O P Q R S T U V W X Y Z #
236 + [a-z] := a b c d e f g h i j k l m n o p q r s t u v w x y z #
237 + [0-9] := 0 1 2 3 4 5 6 7 8 9 #
238 + [A-F] := A B C D E F #
239 +
240 + # Figure out whether we have $(eval) or not (GNU Make 3.80 and above)
241 + # if we do not then we need to use the shell version of tr, and not the
242 + # faster tr function above:
243 +
244 + __have_eval := $(false)
245 + __ignore := $(eval __have_eval := $(true))
246 +
247 + ifndef __have_eval
248 +  uc = $(shell echo $1 | tr "a-z" "A-Z")
249 +  lc = $(shell echo $1 | tr "A-Z" "a-z")
250 + else
251 +  uc = $(call tr,$([a-z]),$([A-Z]),$1)
252 +  lc = $(call tr,$([A-Z]),$([a-z]),$1)
253 + endif
254 +
255 + # OK, now we can actually use these functions to figure out the names
256 + # of the module files:
257 +
258 + ifneq "$(words $(Modules))" "0"
259 + ifeq "$(ModuleCase)" "UPPER"
260 +  MODULES = $(call uc,$(Modules))
261 + else
262 +  ifeq "$(ModuleCase)" "lower"
263 +    MODULES = $(call lc,$(Modules))
264 +  else
265 +    MODULES = $(Modules)
266 +  endif
267 + endif
268 +  ModuleFiles = $(MODULES:%= $(PackageTargetDir)/%.$(ModSuffix))
269 +  ParallelModuleFiles = $(MODULES:%= $(PackageParallelTargetDir)/%.$(ModSuffix))
270 + endif
271 + #
272 + ###########################################################################
273  
274   ThirdPartyJarsTmp = $(patsubst %,$(LibDir)/%,$(JavaLibraries))
275   ThirdPartyJars    = $(subst $(Space),$(X),$(ThirdPartyJarsTmp))
# Line 213 | Line 282 | ifneq  "$(words $(ObjectFiles) $(ParallelObjectFiles))
282   #if Main is defined, do not build library. It may not be true sometimes
283   ifneq  "$(words $(ObjectFiles) $(ParallelObjectFiles))" "0"
284    DependencyFile    = $(PackageSourceDir)/Makedepend
285 <  ifneq "$(Main)" ""
285 >  ifneq "$(words $(Main))" "0"
286      Executable             = $(BinDir)/$(Main)
287 <    ParallelExecutable     = $(BinDir)/$(Main)_MPI
287 >    ifeq "$(BuiltParallelExe)" "1"
288 >      ParallelExecutable     = $(BinDir)/$(Main)_MPI
289 >    endif
290    else
291      SharedLibrary          = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package)))_UP.so
292      StaticLibrary          = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package)))_UP.a
# Line 253 | Line 324 | InstallData            = @INSTALL_DATA@
324   MakeDepend             = makedepend
325   INSTALL                = @INSTALL@
326   InstallProgram         = @INSTALL_PROGRAM@
327 + InstallScript          = @INSTALL_SCRIPT@
328   InstallData            = @INSTALL_DATA@
329 < MkDir                = @MKINSTALLDIRS@
329 > MkDir                  = @MKINSTALLDIRS@
330   Delete                 = rm -fr
331   StaticArchiver         = @AR@
332   DynamicArchiver        = @CC@
# Line 285 | Line 357 | CppOptions             = $(FrcDeclare) @CXXFLAGS@
357                           -sourcepath $(SourceDir)
358   COptions               = $(FrcDeclare) @CFLAGS@
359   CParallelOptions       = $(FrcDeclare) $(ParallelDeclare) @CFLAGS@
360 < CppOptions             = $(FrcDeclare) @CXXFLAGS@
361 < CppParallelOptions     = $(FrcDeclare) $(ParallelDeclare) @CXXFLAGS@
360 > CppOptions             = $(FrcDeclare) @CXXFLAGS@ @OOPSE_TEMPLATE_FLAGS@
361 > CppParallelOptions     = $(FrcDeclare) $(ParallelDeclare) @CXXFLAGS@ @OOPSE_TEMPLATE_FLAGS@
362   FortranOptions         =
363   F90Options             =  @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) @MODDIRFLAG@$(TargetDir)
364   F90ParallelOptions     =  @PREPFLAG@ @F90FLAGS@ @MODDIRFLAG@$(SourceDir) @MODDIRFLAG@$(ParallelTargetDir)  @PREPDEFFLAG@$(ParallelDeclare)
# Line 364 | Line 436 | $(PackageTargetDir) :
436  
437   # Create target directory
438   $(PackageTargetDir) :
439 <        $(MakeDir) $@
439 >        $(MkDir) $@
440  
441 + $(BinDir) :
442 +        $(MkDir) $@
443 +
444   # .c -> .o
445   $(PackageTargetDir)/%.o : %.c
446          $(Print) $@
# Line 437 | Line 512 | ifeq "$(UseMPI)" "yes"
512          fi
513  
514          $(MAKE) $(MakeOptions) $(PackageParallelTargetDir)/$@
515 <        if test -n "`ls *.$(ModSuffix)`"; then\
516 <          $(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\
517 <        fi
515 >        if test -n "`ls *.$(ModSuffix)`"; then\
516 >          $(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\
517 >        fi
518  
519   else
520   %.o : %.F90
# Line 447 | Line 522 | else
522          if test -n "`ls *.$(ModSuffix)`"; then\
523            $(Move) "`ls *.$(ModSuffix)`" $(PackageTargetDir);\
524          fi
450
525   endif
526  
527  
# Line 567 | Line 641 | $(Executable) : $(CombinedStaticLib) $(ObjectFiles)
641          $(Ranlib) $(CombinedParallelStaticLib)
642  
643   # Executable
644 < $(Executable) : $(CombinedStaticLib) $(ObjectFiles)
645 <        $(Linker) $(ObjectFiles) $(LinkOptions) $(LibDirs) $(CombinedStaticLib) $(Libraries) -o $@
644 > $(Executable) : $(CombinedStaticLib) $(ObjectFiles) $(BinDir)
645 >        $(Linker) $(ObjectFiles) $(CombinedStaticLib) $(LinkOptions) $(LibDirs) $(Libraries) -o $@
646  
647 < $(ParallelExecutable) : $(CombinedParallelStaticLib) $(ParallelObjectFiles)
648 <        $(Linker) $(ParallelObjectFiles) $(ParallelLinkOptions) $(LibDirs) $(CombinedParallelStaticLib) $(Libraries) -o $@
647 > $(ParallelExecutable) : $(CombinedParallelStaticLib) $(ParallelObjectFiles) $(BinDir)
648 >        $(Linker) $(ParallelObjectFiles) $(CombinedParallelStaticLib) $(ParallelLinkOptions) $(LibDirs) $(Libraries) -o $@
649  
650   # Anything else is just copied from source to target
651   $(PackageTargetDir)/% : $(PackageSourceDir)/%
# Line 614 | Line 688 | endif
688          $(Executable)
689   endif
690  
691 + echo : $(PackageListLoop)
692 +        $(Print) Done echo.
693  
694 + _echoall :
695 +        $(Print) $(Modules)
696 +
697   # make clean
698   clean : $(PackageListLoop)
699          $(Print) Done clean.    
700  
701   _cleanall :
702 <        $(Delete) $(ObjectFiles) $(ParallelObjectFiles)
702 >        $(Delete) \
703 >                $(ObjectFiles) \
704 >                $(ModuleFiles) \
705 >                $(ParallelObjectFiles) \
706 >                $(ParallelModuleFiles) \
707 >                $(JarFile) \
708 >                $(SharedLibrary) \
709 >                $(StaticLibrary) \
710 >                $(ParallelSharedLibrary) \
711 >                $(ParallelStaticLibrary) \
712 >                $(CombinedStaticLib) \
713 >                $(CombinedParallelStaticLib)
714  
715   # make distclean
716   distclean : $(PackageListLoop)
717          $(Print) Done clean.    
718  
719 < _distcleanall :
720 <        $(Delete) $(ObjectFiles) \
631 <                  $(ParallelObjectFiles) \
632 <                        $(JarFile) \
633 <                  $(SharedLibrary) \
634 <                  $(StaticLibrary) \
635 <                  $(ParallelSharedLibrary) \
636 <                  $(ParallelStaticLibrary) \
637 <                  $(Executable) \
719 > _distcleanall : _cleanall
720 >        $(Delete) $(Executable) \
721                    $(ParallelExecutable) \
722                    $(DependencyFile)
723  
641
724   # make depend
725   depend : $(PackageListLoop)
726          $(Print) Done dependencies.
# Line 714 | Line 796 | ifneq "$(words $(InstallFiles))" "0"
796   _installdata :  $(MyInstallDir)
797          $(Print) $(InstallFiles)
798   ifneq "$(words $(InstallFiles))" "0"
799 <        $(InstallData) $(InstallFiles) $(MyInstallDir)
799 >        $(InstallCommand) $(InstallFiles) $(MyInstallDir)
800   endif      
801  
802   # make statistics

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines