From: Kubo Takehiro Date: 2012-05-07T21:43:40+09:00 Subject: Re: [C exten] mkmf: how to include .c and .h files within a subdirectory? On Mon, May 7, 2012 at 7:58 AM, Iņaki Baz Castillo wrote: > 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? Though, IMO, there is no official way, here is a hack. ---------------------------------- require 'mkmf' # set all object files to $objs before create_makefile. $objs = ["my_ext.o", "utils/utils.o"] create_makefile("my_ext") # to clean up object files under util subdirectory. open('Makefile', 'a') do |f| f.write <