Type:
Module
Constants:
CONFIG : RbConfig::MAKEFILE_CONFIG

The makefile configuration using the defaults from when ruby was built.

ORIG_LIBPATH : ENV['LIB']
C_EXT : %w[c m]

Extensions for files compiled with a C compiler

CXX_EXT : %w[cc mm cxx cpp]

Extensions for files complied with a C++ compiler

SRC_EXT : C_EXT + CXX_EXT

Extensions for source files

HDR_EXT : %w[h hpp]

Extensions for header files

EXPORT_PREFIX : config_string('EXPORT_PREFIX') {|s| s.strip}
COMMON_HEADERS : hdr.join("\n")

Common headers for ruby C extensions

COMMON_LIBS : config_string('COMMON_LIBS', &split) || []

Common libraries for ruby C extensions

COMPILE_RULES : config_string('COMPILE_RULES', &split) || %w[.%s.%s:]

make compile rules

RULE_SUBST : config_string('RULE_SUBST')
COMPILE_C : config_string('COMPILE_C') || '$(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $<'

Command which will compile C files in the generated Makefile

COMPILE_CXX : config_string('COMPILE_CXX') || '$(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<'

Command which will compile C++ files in the generated Makefile

TRY_LINK : config_string('TRY_LINK') || "$(CC) #{OUTFLAG}conftest#{$EXEEXT} $(INCFLAGS) $(CPPFLAGS) " \ "$(CFLAGS) $(src) $(LIBPATH) $(LDFLAGS) $(ARCH_FLAG) $(LOCAL_LIBS) $(LIBS)"

Command which will compile a program in order to test linking a library

LINK_SO : (config_string('LINK_SO') || "").sub(/^$/) do if CONFIG["DLEXT"] == $OBJEXT "ld $(DLDFLAGS) -r -o $@ $(OBJS)\n" else "$(LDSHARED) #{OUTFLAG}$@ $(OBJS) " \ "$(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)" end end

Command which will link a shared library

LIBPATHFLAG : config_string('LIBPATHFLAG') || ' -L%s'

Argument which will add a library path to the linker

RPATHFLAG : config_string('RPATHFLAG') || ''
LIBARG : config_string('LIBARG') || '-l%s'

Argument which will add a library to the linker

MAIN_DOES_NOTHING : config_string('MAIN_DOES_NOTHING') || "int main(int argc, char **argv)\n{\n return 0;\n}"

A C main function which does no work

UNIVERSAL_INTS : config_string('UNIVERSAL_INTS') {|s| Shellwords.shellwords(s)} || %w[int short long long\ long]

CLEANINGS : " clean-static:: clean-rb-default:: clean-rb:: clean-so:: clean: clean-so clean-static clean-rb-default clean-rb \t\t-$(Q)$(RM) $(CLEANLIBS#{sep}) $(CLEANOBJS#{sep}) $(CLEANFILES#{sep}) .*.time distclean-rb-default:: distclean-rb:: distclean-so:: distclean-static:: distclean: clean distclean-so distclean-static distclean-rb-default distclean-rb \t\t-$(Q)$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log \t\t-$(Q)$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES#{sep}) \t\t-$(Q)$(RMDIRS) $(DISTCLEANDIRS#{sep})#{$ignore_error} realclean: distclean "

Makefile rules that will clean the extension build directory

mkmf.rb is used by ruby C extensions to generate a Makefile which will correctly compile and link the C extension to ruby and a third-party library.

have_func

have_func(func, headers = nil, opt = "", &b) Instance Public methods Returns

2015-04-17 22:10:43
check_sizeof

check_sizeof(type, headers = nil, opts = "", &b) Instance Public methods Returns

2015-04-17 21:05:48
enable_config

enable_config(config, default=nil) Instance Public methods Tests for the presence

2015-04-17 21:38:32
have_macro

have_macro(macro, headers = nil, opt = "", &b) Instance Public methods Returns

2015-04-17 22:24:38
try_const

try_const(const, headers = nil, opt = "", &b) Instance Public methods Returns

2015-04-17 22:35:09