# Compiling only a module

**URL:** <https://www.ruby-forum.com/t/compiling-only-a-module/181468>\
**Category:** NGINX\
**Created:** [January 12, 2010, 2:13pm UTC](https://www.ruby-forum.com/t/compiling-only-a-module/181468 "2010-01-12T14:13:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dennis\_J](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/a183cd/32.png) [@Dennis\_J](https://www.ruby-forum.com/u/Dennis_J)\
**Post date:** [January 12, 2010, 2:13pm UTC](https://www.ruby-forum.com/t/compiling-only-a-module/181468/1 "2010-01-12T14:13:33Z")

</div>

Hi,  
I’m trying to develop a module for nginx and I’m wondering how I can  
compile just a module by itself. I check out this page:

> **[Emiller’s Guide to Nginx Module Development](https://www.evanmiller.org/nginx-modules-guide.html#compiling)**
>
> Ever wanted to extend Nginx’s functionality with custom C code? This is the comprehensive guide that you need. Maintained since 2007.

but it basically says that you have to compile nginx completely to  
compile  
the module. This seems rather cumbersome, is there a way around this?

Regards,  
Dennis

---

<div class="post-metadata">

**Author:** ![Dennis\_J](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/a183cd/32.png) [@Dennis\_J](https://www.ruby-forum.com/u/Dennis_J)\
**Post date:** [January 12, 2010, 3:53pm UTC](https://www.ruby-forum.com/t/compiling-only-a-module/181468/2 "2010-01-12T15:53:40Z")

</div>

On Tue, Jan 12, 2010 at 8:12 PM, Dennis J. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Hi,  
> I’m trying to develop a module for nginx and I’m wondering how I can compile  
> just a module by itself. I check out this page:  
> [Emiller’s Guide to Nginx Module Development – Evan Miller](http://www.evanmiller.org/nginx-modules-guide.html#compiling)  
> but it basically says that you have to compile nginx completely to compile  
> the module. This seems rather cumbersome, is there a way around this?

No

–  
Aleksej Besciokov  
EMail/JID: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
phone: +7 495 7853149

---

<div class="post-metadata">

**Author:** ![Dennis\_J](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/a183cd/32.png) [@Dennis\_J](https://www.ruby-forum.com/u/Dennis_J)\
**Post date:** [January 12, 2010, 4:51pm UTC](https://www.ruby-forum.com/t/compiling-only-a-module/181468/3 "2010-01-12T16:51:37Z")

</div>

On 12.01.2010, at 16:12, Dennis J. wrote:

> Hi,  
> I’m trying to develop a module for nginx and I’m wondering how I can compile just a module by itself. I check out this page:  
> [Emiller’s Guide to Nginx Module Development – Evan Miller](http://www.evanmiller.org/nginx-modules-guide.html#compiling)  
> but it basically says that you have to compile nginx completely to compile the module. This seems rather cumbersome, is there a way around this?  
> Nginx modules a all compiled in. There is no mechanism to build and load  
> a shared library.  
> Fortunately, the makefile is properly configured to recompile only  
> changed stuff. To fine tune dependencies within your module, try  
> NGX\_ADDON\_DEPS.

Other way is to write you own custom makefile in your module dir. But it  
may be a complicated thing due to cross platform nature of nginx.

Peter.

---

<div class="post-metadata">

**Author:** ![Dennis\_J](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/a183cd/32.png) [@Dennis\_J](https://www.ruby-forum.com/u/Dennis_J)\
**Post date:** [January 13, 2010, 1:19am UTC](https://www.ruby-forum.com/t/compiling-only-a-module/181468/4 "2010-01-13T01:19:09Z")

</div>

On Tue, Jan 12, 2010 at 7:50 AM, Peter L. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Peter.
> 
> * * *
> 
> nginx mailing list  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> [mailman.nginx.org archive](http://nginx.org/mailman/listinfo/nginx)

I don’t think it makes _any_ sense to compile an nginx module by  
itself. If you want to just check the syntax simply running gcc on it  
should more or less suffice, but it won’t do anything without NginX  
and NginX doesn’t dynamically (THANK $DIETY) load modules so building  
it without building NginX is pretty much pointless.

Next! 🙂

– Merlin
