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 1504 by tim, Wed Sep 29 15:00:33 2004 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines