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

These are old archives. They are kept for historic purposes only.
Post Reply
Posts: 7
Joined: Tue Mar 29, 2005 4:49 am

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

Post 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.
Former UnrealIRCd head coder
Posts: 811
Joined: Sat Mar 06, 2004 8:47 pm
Location: United States

Post by codemastr »

make custommodule MODULEFILE=mymod EXLIBS=-ldb
-- codemastr
Post Reply