From: Quintus Date: 2012-05-07T18:32:18+09:00 Subject: Re: [C exten] mkmf: how to include .c and .h files within a subdirectory? Am 07.05.2012 00:58, schrieb I��aki Baz Castillo: > Hi, having the following file tree under my ext/ directory: > > my_ext/ > extconf.rb > my_ext.c > utils/ > utils.c > utils.h > > How to say in extconf.rb that files under utils/ subdirectory must > also be compiled? > > Thanks a lot. > I���ve once had the same problem and asked here on Ruby Talk, but got no satisfying answer. It is not possible without hacking mkmf, I finally ended up putting everything in one directory. #create_makefile (http://ruby-doc.org/stdlib-1.9.3/libdoc/mkmf/rdoc/Object.html#method-i-create_makefile) has an option for specifying *one* subdirectory where all files reside, but for multiple subdirectories you���d have to create multiple C extensions. If someone knows another way to accomplish the task, I���d be intererested in it, because large C extensions are easier organised by use of multiple directories. Vale, Marvin