FreeRADIUS 3.0: 3rd party module build structure?
aland at deployingradius.com
Thu Feb 27 22:27:41 CET 2014
Julius Plenz wrote:
> I'm currently trying to migrate a FreeRADIUS 2.x config to the new 3.0
> version. I have a few custom rlm_* modules that I want to compile
> against the 3.0 sources.
It should be *very* simple. See the examples in the other modules.
Previously, I had a Makefile similar to this:
> FR_SOURCE = $(HOME)/src/freeradius
> TARGET = rlm_omapi
> SRCS = rlm_omapi.c
> RLM_DIR = $(FR_SOURCE)/src/modules/rlm_example/
> top_builddir = $(FR_SOURCE)/
> include $(FR_SOURCE)/src/modules/rules.mak
> RLM_CFLAGS = -I/server/dhcp/server/include -I/server/dhcp/src/isc-dhcp/bind/include
> RLM_LDFLAGS = -L/server/dhcp/server/lib -ldhcpctl -lomapi -ldns -lisc
> This way I got "magically working" targets to build and install my
> module. However, now the build system was changed for good and I
> cannot really figure out how to achieve the same effect.
Copy an "all.mk" from another module, and set the relevant flags.
Notice it's a *lot* simpler than before:
TARGET = rlm_omapi.la
SRCS = rlm_omapi.c
TGT_CFLAGS = -I/server/dhcp/server/include
TGT_LDFLAGS = -L/server/dhcp/server/lib -ldhcpctl -lomapi -ldns -lisc
> particular, the "rules.mak" file is apparently "No longer needed"
> since 80f92e5aee, Feb 27 2013.)
Yes. We've completely re-done the build system. It's very nice.
> Is there an easy way so I don't have to write out all the long libtool
> command lines myself?
We've gotten rid of libtool and libltdl completely. Life is *much*
More information about the Freeradius-Users