From: Quintus Date: 2012-02-10T06:58:50+09:00 Subject: Ruby C-Extensions: Compile files in subdirectory? -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi folks, I’m writing a C extension (it’s actually C++ but that doesn’t matter for this problem) for Ruby that consists of many files that are intended to be compiled into a _single_ C extension, not a dozen ones. To structure the code, I’ve got some subdirectories under the ext/ directory, i.e. my directory structure looks something like this: / ext/ - extconf.rb - my_ext.c - my_ext.h thing1/ - thing1.c - thing1.h - thing1_2.c - thing1_2.h thing2/ - thing2.c - thing2.h thing2_1/ - something.c - something.h Now, as I said before I want a single C extension "my_ext.so", but I just can't find out how to instruct mkmf to recognise subdiretories. It just compiles the files residing in the toplevel directory into object files, completely ignoring all the subdirectories. So, my question is: How to tell mkmf about the subdirectories? Valete, Marvin -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJPNEGDAAoJELh1XLHFkqha0/kH/2b5BCo1qIjYS6af3L9Zj+EA K6836EYnrZNvyvmWTOKms4PkRGfucWQNygS0xm/HtC8CqkIL8Co+J85fi9+9g137 O5VTgypLwjCogFr1UMqv4+bJlxaO3EAgDWoJOArRj9esYOHa+o6hTsLl7npM1Who fOuH8J8MUTv3G6ic1TVffxlAWMMdD/FMGvn0AmWjCZbrAws57HyMHnWNx4tvBUIu nWp7nJ0usl4M9gtGPk+D2A8BMe9ufnci5eBQ2QyZN28FGT4dW8ufoXSxzPBuZhKh 4BkVAi9WjRFxLUYD7LIs6nEjdQkYwjLtaSLl4grUCE1JCglts0ixb5ywpTp9qWA= =8zss -----END PGP SIGNATURE-----