9 exec_prefix = @exec_prefix@
10 sysconfdir = @sysconfdir@
11 localstatedir = @localstatedir@
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@
51 INCLUDE = -I${top_srcdir} -I${top_srcdir}/src \
52 -include ${top_srcdir}/src/freeradius-devel/autoconf.h \
53 -include ${top_srcdir}/src/freeradius-devel/build.h \
54 -include ${top_srcdir}/src/freeradius-devel/features.h
56 CFLAGS = $(IMACROS) $(INCLUDE) -std=c99 -fno-strict-aliasing @CFLAGS@
58 LIBPREFIX = @LIBPREFIX@
64 AUTOHEADER = @AUTOHEADER@
65 INSTALL = ${top_builddir}/install-sh -c
66 INSTALL_PROGRAM = ${INSTALL}
67 INSTALL_DATA = ${INSTALL} -m 644
68 INSTALL_SCRIPT = ${INSTALL_PROGRAM}
69 INSTALLSTRIP = @INSTALLSTRIP@
70 DARWIN_CFLAGS = @DARWIN_CFLAGS@
77 RADDBDIR = ${raddbdir}
78 RUNDIR = ${localstatedir}/run/radiusd
81 LIBRADIUS = $(top_builddir)/src/lib/$(LIBPREFIX)freeradius-radius.la -ltalloc
83 USE_SHARED_LIBS = @USE_SHARED_LIBS@
84 bm_shared_libs = @USE_SHARED_LIBS@
85 USE_STATIC_LIBS = @USE_STATIC_LIBS@
86 bm_static_libs = @USE_STATIC_LIBS@
88 STATIC_MODULES = @STATIC_MODULES@
90 OPENSSL_LIBS = @OPENSSL_LIBS@
91 OPENSSL_INCLUDE = @OPENSSL_INCLUDE@
94 # If the system has OpenSSL, use it's version of MD4/MD5/SHA1, instead of
97 ifneq "$(OPENSSL_INCLUDE)" ""
98 CFLAGS += -DWITH_OPENSSL_MD4 -DWITH_OPENSSL_MD5
101 LIBREADLINE = @LIBREADLINE@
104 # Version to use for packaging and other Make related things
106 RADIUSD_VERSION_STRING = @RADIUSD_VERSION_STRING@
109 # This allows dlopen to do runtime checks for version mistmatches
110 # between what it was originally linked with, and the library it's
113 #LDFLAGS += -release=$(RADIUSD_VERSION_STRING)
116 HOSTINFO = @HOSTINFO@
118 ifneq ($(WITH_OPENSSL_MD5),)
119 LIBRADIUS_WITH_OPENSSL = 1
120 CFLAGS += -DWITH_OPENSSL_MD5
123 ifneq ($(WITH_OPENSSL_SHA1),)
124 LIBRADIUS_WITH_OPENSSL = 1
125 CFLAGS += -DWITH_OPENSSL_SHA1
128 ifneq ($(LIBRADIUS_WITH_OPENSSL),)
129 ifeq ($(OPENSSL_LIBS),)
130 $(error OPENSSL_LIBS must be define in order to use WITH_OPENSSL_*)
132 LIBRADIUS += $(OPENSSL_LIBS)
136 # http://clang.llvm.org/StaticAnalysis.html
138 # $ make SCAN=/path/to/checker/
141 CC := $(SCAN)/scan-build gcc -DFR_SCAN_BUILD
146 # Portability cruft. This is for replacing libtroll && libltdl
147 # with gcc and dlopen().
149 ifeq "$(USE_SHARED_LIBS)" "yes"
150 LINK_MODE.exe = -export-dynamic
153 LINK_MODE.exe = -static
156 ifneq "$(LIBTOOL)" ""
157 COMPILE.c := $(LIBTOOL) --quiet --mode=compile $(CC)
158 LINK.lib := $(LIBTOOL) --quiet --mode=link $(CC) -rpath $(libdir) -o
165 ifeq "$(USE_SHARED_LIBS)" "yes"
166 LINK.lib := $(CC) -shared -o
169 LINK.lib := $(AR) cru
176 ifneq "$(findstring Darwin,$(shell uname -a))" ""
181 # Path to clang, setting this enables the 'scan.*' build targets
182 # which perform static analysis on various server components.
183 ANALYZE.c := @clang_path@
186 ifeq "${ANALYZE.c}" ""
192 # With shared libs, the test binaries are in a different place
193 # AND the method we use to run those binaries changes.
195 ifeq "$(USE_SHARED_LIBS)" "yes"
196 TESTBINDIR = ./$(BUILD_DIR)/bin/local
197 TESTBIN = $(JLIBTOOL) --quiet --mode=execute $(TESTBINDIR)
199 TESTBINDIR = ./$(BUILD_DIR)/bin
200 TESTBIN = ./$(BUILD_DIR)/bin