⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.93
Server IP:
65.108.141.171
Server:
Linux server.heloix.com 5.4.0-214-generic #234-Ubuntu SMP Fri Mar 14 23:50:27 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
7.4.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
ri
/
2.7.0
/
system
/
MakeMakefile
/
View File Name :
create_makefile-i.ri
U:RDoc::AnyMethod[iI"create_makefile:ETI"!MakeMakefile#create_makefile;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"NGenerates the Makefile for your extension, passing along any options and ;TI"Npreprocessor constants that you may have generated through other methods.;To:RDoc::Markup::BlankLine o; ; [ I"NThe +target+ name should correspond the name of the global function name ;TI"Odefined within your C extension, minus the +Init_+. For example, if your ;TI"LC extension is defined as +Init_foo+, then your target would simply be ;TI""foo".;T@o; ; [ I"NIf any "/" characters are present in the target name, only the last name ;TI"Mis interpreted as the target name, and the rest are considered toplevel ;TI"Pdirectory names, and the generated Makefile will be altered accordingly to ;TI"%follow that directory structure.;T@o; ; [ I"OFor example, if you pass "test/foo" as a target name, your extension will ;TI"Kbe installed under the "test" directory. This means that in order to ;TI"Nload the file within a Ruby program later, that directory structure will ;TI"?have to be followed, e.g. <code>require 'test/foo'</code>.;T@o; ; [ I"OThe +srcprefix+ should be used when your source files are not in the same ;TI"Odirectory as your build script. This will not only eliminate the need for ;TI"Kyou to manually copy the source files into the same directory as your ;TI"Pbuild script, but it also sets the proper +target_prefix+ in the generated ;TI"Makefile.;T@o; ; [I"PSetting the +target_prefix+ will, in turn, install the generated binary in ;TI"Na directory under your <code>RbConfig::CONFIG['sitearchdir']</code> that ;TI"Imimics your local filesystem when you run <code>make install</code>.;T@o; ; [I"0For example, given the following file tree:;T@o:RDoc::Markup::Verbatim; [ I" ext/ ;TI" extconf.rb ;TI" test/ ;TI" foo.c ;T:@format0o; ; [I""And given the following code:;T@o;; [I")create_makefile('test/foo', 'test') ;T; 0o; ; [I"LThat will set the +target_prefix+ in the generated Makefile to "test". ;TI"OThat, in turn, will create the following file tree when installed via the ;TI"'<code>make install</code> command:;T@o;; [I"+/path/to/ruby/sitearchdir/test/foo.so ;T; 0o; ; [I"NIt is recommended that you use this approach to generate your makefiles, ;TI"Hinstead of copying files around manually, because some third party ;TI"Dlibraries may depend on the +target_prefix+ being set properly.;T@o; ; [I"IThe +srcprefix+ argument can be used to override the default source ;TI"Kdirectory, i.e. the current directory. It is included as part of the ;TI"1+VPATH+ and added to the list of +INCFLAGS+.;T: @fileI"lib/mkmf.rb;T:0@omit_headings_from_table_of_contents_below00I" conf;T[ I"(target, srcprefix = nil);T@OFI"MakeMakefile;TcRDoc::NormalModule00