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_header

have_header(header, preheaders = nil, opt = "", &b) Instance Public methods Returns

2015-04-17 22:15:37
create_makefile

create_makefile(target, srcprefix = nil) Instance Public methods Generates the

2015-04-17 21:15:26
dir_config

dir_config(target, idefault=nil, ldefault=nil) Instance Public methods Sets

2015-04-17 21:25:10
find_executable

find_executable(bin, path = nil) Instance Public methods Searches for the executable

2015-04-17 21:45:47
find_header

find_header(header, *paths) Instance Public methods Instructs mkmf to search

2015-04-17 21:46:54
have_library

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

2015-04-17 22:21:13
have_const

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

2015-04-17 22:02:15
have_struct_member

have_struct_member(type, member, headers = nil, opt = "", &b) Instance Public methods

2015-04-17 22:26:32
depend_rules

depend_rules(depend) Instance Public methods Processes the data contents of

2015-04-17 21:20:11
dummy_makefile

dummy_makefile(srcdir) Instance Public methods creates a stub Makefile.

2015-04-17 21:31:14