Phusion Passenger - www.modrails.com/ Copyright (C) 2008 Phusion

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

Methods
Public Instance methods
compile_c(source, flags = CXXFLAGS)

Rake functions for compiling/linking C++ stuff.

    # File lib/rake/cplusplus.rb, line 19
19: def compile_c(source, flags = CXXFLAGS)
20:         sh "#{CXX} #{flags} -c #{source}"
21: end
compile_cxx(source, flags = CXXFLAGS)
    # File lib/rake/cplusplus.rb, line 23
23: def compile_cxx(source, flags = CXXFLAGS)
24:         sh "#{CXX} #{flags} -c #{source}"
25: end
create_executable(target, sources, linkflags = LDFLAGS)
    # File lib/rake/cplusplus.rb, line 32
32: def create_executable(target, sources, linkflags = LDFLAGS)
33:         sh "#{CXX} #{sources} -o #{target} #{linkflags}"
34: end
create_shared_library(target, sources, flags = LDFLAGS)
    # File lib/rake/cplusplus.rb, line 36
36: def create_shared_library(target, sources, flags = LDFLAGS)
37:         if RUBY_PLATFORM =~ /darwin/
38:                 shlib_flag = "-flat_namespace -bundle -undefined dynamic_lookup"
39:         else
40:                 shlib_flag = "-shared"
41:         end
42:         sh "#{CXX} #{shlib_flag} #{sources} -fPIC -o #{target} #{flags}"
43: end
create_static_library(target, sources)
    # File lib/rake/cplusplus.rb, line 27
27: def create_static_library(target, sources)
28:         sh "ar cru #{target} #{sources}"
29:         sh "ranlib #{target}"
30: end