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

Comparing trunk/OOPSE-2.0/make/Makefile (file contents):
Revision 1496 by tim, Tue Sep 28 20:42:28 2004 UTC vs.
Revision 1505 by gezelter, Wed Sep 29 15:58:18 2004 UTC

# Line 33 | Line 33
33   #  $<      - Current dependency
34   #
35   #---------------------------------------------------------------------------
36 +
37   #---------------------------------------------------------------------------
38   #
39   #  Directories
# Line 125 | Line 126 | ifneq  "$(words $(ObjectFiles))" "0"
126    JavaPackageName   = $(subst /,.,$(Package))
127    JarFile           = $(LibDir)/$(subst /,,$(Package)).jar
128   endif
129 +
130 + #if Main is defined, do not build library. It may not be true sometimes
131   ifneq  "$(words $(ObjectFiles))" "0"
132    DependencyFile    = $(PackageSourceDir)/Makedepend
130  SharedLibrary     = $(LibDir)/lib$(subst /,,$(Package)).so
131  StaticLibrary     = $(LibDir)/lib$(subst /,,$(Package)).a
133    ifneq "$(Main)" ""
134      Executable        = $(BinDir)/$(Main)
135 +  else
136 +    SharedLibrary     = $(LibDir)/lib$(subst /,,$(Package)).so
137 +    StaticLibrary     = $(LibDir)/lib$(subst /,,$(Package)).a
138    endif
139   endif
140   #
# Line 226 | Line 230 | $(PackageTargetDir)/%.o : $(PackageSourceDir)/%.c
230   # .c -> .o
231   $(PackageTargetDir)/%.o : $(PackageSourceDir)/%.c
232          $(Print) $@
233 +        $(Print) $(CCompiler) $(COptions) -c $(IncludePath) $< -o $@
234          @$(CCompiler) $(COptions) -c $(IncludePath) $< -o $@
235  
236   %.o : $(PackageSourceDir)/%.c
# Line 234 | Line 239 | $(PackageTargetDir)/%.o : $(PackageSourceDir)/%.cpp
239   # .cpp -> .o
240   $(PackageTargetDir)/%.o : $(PackageSourceDir)/%.cpp
241          $(Print) $@
242 +        $(Print) $(CppCompiler) $(CppOptions) -c $(IncludePath) $< -o $@
243          $(CppCompiler) $(CppOptions) -c $(IncludePath) $< -o $@
244  
245   %.o : $(PackageSourceDir)/%.cpp
# Line 242 | Line 248 | $(PackageTargetDir)/%.o : $(PackageSourceDir)/%.f
248   # .f -> .o
249   $(PackageTargetDir)/%.o : $(PackageSourceDir)/%.f
250          $(Print) $@
251 +        $(Print) $(FortranCompiler) $(FortranOptions) -c $< -o $@
252          @$(FortranCompiler) $(FortranOptions) -c $< -o $@
253  
254   %.o : $(PackageSourceDir)/%.f
# Line 250 | Line 257 | $(PackageTargetDir)/%.o : $(PackageSourceDir)/%.F90
257   # .F90 -> .o
258   $(PackageTargetDir)/%.o : $(PackageSourceDir)/%.F90
259          $(Print) $@
260 +        $(Print) $(F90Compiler) $(F90Options) -c $< -o $@
261          @$(F90Compiler) $(F90Options) -c $< -o $@
262  
263   %.o : $(PackageSourceDir)/%.F90
# Line 258 | Line 266 | $(PackageTargetDir)/%.class : $(PackageSourceDir)/%.ja
266   # .java -> .class
267   $(PackageTargetDir)/%.class : $(PackageSourceDir)/%.java
268          $(Print) $@
269 +        $(Print) $(JavaCompiler) $(JavaCompilerOptions) $<
270          @$(JavaCompiler) $(JavaCompilerOptions) $<
271  
272   %.class : $(PackageSourceDir)/%.java
# Line 266 | Line 275 | $(PackageSourceDir)/%.h : $(PackageTargetDir)/%.class
275   # .class -> .h
276   $(PackageSourceDir)/%.h : $(PackageTargetDir)/%.class
277          $(Print) $@
278 +        $(Print) $(JniCompiler) $(JniOptions) $(JavaPackageName).$*
279          $(JniCompiler) $(JniOptions) $(JavaPackageName).$*
280  
281   %.h : %.class
# Line 282 | Line 292 | $(PackageSourceDir)/%.c : $(PackageSourceDir)/%.y
292   #.y -> .c
293   $(PackageSourceDir)/%.c : $(PackageSourceDir)/%.y
294          $(Print) $@
295 <        $(Print) @$(Yacc) -d $?
295 >        $(Print) $(Yacc) -d $?
296          @$(Yacc) -d  $?
297          @$(Move) y.tab.c $*.c
298          @$(Delete) y.tab.h
# Line 290 | Line 300 | $(PackageSourceDir)/%.c : $(PackageSourceDir)/%.l
300   # .l -> .c
301   $(PackageSourceDir)/%.c : $(PackageSourceDir)/%.l
302          $(Print) $@
303 <        $(Print) @$(Lex) -o$@ $?
303 >        $(Print) $(Lex) -o$@ $?
304          @$(Lex) -o$@ $?
305  
306   # .o -> .a
307   $(LibDir)/%.a : $(ObjectFiles)
308          $(Print) $@
309 +        $(Print) $(StaticArchiver) $(StaticArchiverOptions) $@ $(ObjectFiles)
310          @$(StaticArchiver) $(StaticArchiverOptions) $@ $(ObjectFiles)
311  
312   %.a : $(ObjectFiles)
# Line 304 | Line 315 | $(LibDir)/%.so : $(ObjectFiles)
315   # .o -> .so
316   $(LibDir)/%.so : $(ObjectFiles)
317          $(Print) $@    
318 +        $(Print) $(DynamicArchiver) $(ObjectFiles) $(DynamicArchiverOptions) -o $@
319          $(DynamicArchiver) $(ObjectFiles) $(DynamicArchiverOptions) -o $@
320  
321   %.so : $(ObjectFiles)
# Line 312 | Line 324 | $(LibDir)/%.jar : $(JavaClassFiles) $(OtherTargetFiles
324   # .class -> .jar
325   $(LibDir)/%.jar : $(JavaClassFiles) $(OtherTargetFiles)
326          $(Print) $@
327 +        $(Print) $(JavaArchiver) -cf $@ $(JavaClassFilesRel) $(OtherTargetFiles)
328          @cd $(TargetDir); $(JavaArchiver) -cf $@ \
329          $(JavaClassFilesRel) $(OtherTargetFiles)
330  
# Line 392 | Line 405 | $(DependencyFile) : $(DerivedSource)
405  
406   $(DependencyFile) : $(DerivedSource)
407          $(Print) $@
395        $(Print) $(DerivedSource)
408          @cd $(PackageSourceDir)
409          touch Make.temp
410   ifdef $(CppFiles)
# Line 403 | Line 415 | endif
415   endif
416          cat Make.temp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/obj\/&/g' >> $(DependencyFile)
417          cat Make.temp | sed 's/^[a-zA-Z0-9]/$$\(DEV_ROOT\)\/MPIobj\/&/g' >> $(DependencyFile)
418 <        echo $(F90Files)
407 < #ifdef $(F90Files)
418 > ifdef $(F90Files)
419          $(DEV_ROOT)/scripts/sfmakedepend  -I $(DEV_ROOT)/src -d '$$(DEV_ROOT)/obj' -f ./Make.ftemp -h *.F90
420          cat Make.ftemp >> $(DependencyFile)
421 < #endif
421 > endif
422          $(Delete) Make.temp Make.ftemp
423  
424   # make lib

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines