Page 1 of 1

Config/Makefile changes - how do I link a library?

Posted: Tue Mar 29, 2005 6:29 am
by krbvroc1
Hello, I am trying to write my own module. The one thing I am not sure about is how do I add a system library to the link stage?

Basically, I am writing a module that uses the 'db' (Berkeley DB) so I need to add a '-ldb'.

At first, I modified the Makefile at the top level directory, added '-ldb' to the IRCDLIBS line. I then did a 'make clean', 'make', then 'make custommodule mymodule'. This seems to work - great.

HOWEVER, I'd like to know the 'correct' way to do this so it is not wiped out everytime I run 'Config'. Is there a 'proper' way to accomplish this?

Any ideas or pointers from those of you who use extra libraries in your modules? (such as mysql api for example). I have a feeling its related to autoconf or something which I'm not familiar with.

Posted: Tue Mar 29, 2005 5:09 pm
by codemastr
make custommodule MODULEFILE=mymod EXLIBS=-ldb