9 exec_prefix = @exec_prefix@
10 sysconfdir = @sysconfdir@
11 localstatedir = @localstatedir@
18 dictdir = $(datadir)/freeradius
20 includedir = @includedir@
23 # In some systems, we don't want to over-write ANY configuration.
28 # $ make -Draddbdir=/tmp/garbage install
30 # and all of the configuration files go into /tmp/garbage
35 modconfdir = @modconfdir@
36 radacctdir = @radacctdir@
37 top_builddir = @abs_top_builddir@
38 top_build_prefix=@abs_top_builddir@/
39 top_srcdir = @abs_top_srcdir@
40 datarootdir = @datarootdir@
44 # Makeflags set within the makefile appear to be additive and override
45 # flags set on the command line and the environmental variables
46 MAKEFLAGS = @FR_MAKEFLAGS@
50 IMACROS = -imacros ${top_srcdir}/src/freeradius-devel/build.h -imacros ${top_srcdir}/src/freeradius-devel/autoconf.h -imacros ${top_srcdir}/src/freeradius-devel/features.h
51 INCLUDE = -I${top_srcdir} -I${top_srcdir}/src
52 CFLAGS = $(IMACROS) $(INCLUDE) -std=c99 -fno-strict-aliasing @CFLAGS@
54 LIBPREFIX = @LIBPREFIX@
60 AUTOHEADER = @AUTOHEADER@
61 INSTALL = ${top_builddir}/install-sh -c
62 INSTALL_PROGRAM = ${INSTALL}
63 INSTALL_DATA = ${INSTALL} -m 644
64 INSTALL_SCRIPT = ${INSTALL_PROGRAM}
65 INSTALLSTRIP = @INSTALLSTRIP@
66 DARWIN_CFLAGS = @DARWIN_CFLAGS@
73 RADDBDIR = ${raddbdir}
74 RUNDIR = ${localstatedir}/run/radiusd
77 LIBRADIUS = $(top_builddir)/src/lib/$(LIBPREFIX)freeradius-radius.la -ltalloc
79 USE_SHARED_LIBS = @USE_SHARED_LIBS@
80 bm_shared_libs = @USE_SHARED_LIBS@
81 USE_STATIC_LIBS = @USE_STATIC_LIBS@
82 bm_static_libs = @USE_STATIC_LIBS@
84 STATIC_MODULES = @STATIC_MODULES@
86 OPENSSL_LIBS = @OPENSSL_LIBS@
87 OPENSSL_INCLUDE = @OPENSSL_INCLUDE@
90 # If the system has OpenSSL, use it's version of MD4/MD5/SHA1, instead of
93 ifneq "$(OPENSSL_INCLUDE)" ""
94 CFLAGS += -DWITH_OPENSSL_MD4 -DWITH_OPENSSL_MD5
97 LIBREADLINE = @LIBREADLINE@
100 # Version to use for packaging and other Make related things
102 RADIUSD_VERSION_STRING = @RADIUSD_VERSION_STRING@
105 # This allows dlopen to do runtime checks for version mistmatches
106 # between what it was originally linked with, and the library it's
109 #LDFLAGS += -release=$(RADIUSD_VERSION_STRING)
112 HOSTINFO = @HOSTINFO@
114 ifneq ($(WITH_OPENSSL_MD5),)
115 LIBRADIUS_WITH_OPENSSL = 1
116 CFLAGS += -DWITH_OPENSSL_MD5
119 ifneq ($(WITH_OPENSSL_SHA1),)
120 LIBRADIUS_WITH_OPENSSL = 1
121 CFLAGS += -DWITH_OPENSSL_SHA1
124 ifneq ($(LIBRADIUS_WITH_OPENSSL),)
125 ifeq ($(OPENSSL_LIBS),)
126 $(error OPENSSL_LIBS must be define in order to use WITH_OPENSSL_*)
128 LIBRADIUS += $(OPENSSL_LIBS)
132 # http://clang.llvm.org/StaticAnalysis.html
134 # $ make SCAN=/path/to/checker/
137 CC := $(SCAN)/scan-build gcc -DFR_SCAN_BUILD
142 # Portability cruft. This is for replacing libtroll && libltdl
143 # with gcc and dlopen().
145 ifeq "$(USE_SHARED_LIBS)" "yes"
146 LINK_MODE.exe = -export-dynamic
149 LINK_MODE.exe = -static
152 ifneq "$(LIBTOOL)" ""
153 COMPILE.c := $(LIBTOOL) --quiet --mode=compile $(CC)
154 LINK.lib := $(LIBTOOL) --quiet --mode=link $(CC) -rpath $(libdir) -o
161 ifeq "$(USE_SHARED_LIBS)" "yes"
162 LINK.lib := $(CC) -shared -o
165 LINK.lib := $(AR) cru
172 ifneq "$(findstring Darwin,$(shell uname -a))" ""
177 # Path to clang, setting this enables the 'scan.*' build targets
178 # which perform static analysis on various server components.
179 ANALYZE.c := @clang_path@
182 ifeq "${ANALYZE.c}" ""
188 # With shared libs, the test binaries are in a different place
189 # AND the method we use to run those binaries changes.
191 ifeq "$(USE_SHARED_LIBS)" "yes"
192 TESTBINDIR = ./$(BUILD_DIR)/bin/local
193 TESTBIN = $(JLIBTOOL) --quiet --mode=execute $(TESTBINDIR)
195 TESTBINDIR = ./$(BUILD_DIR)/bin
196 TESTBIN = ./$(BUILD_DIR)/bin