9 exec_prefix = @exec_prefix@
10 sysconfdir = @sysconfdir@
11 localstatedir = @localstatedir@
18 dictdir = $(datadir)/freeradius
20 includedir = @includedir@
22 radacctdir = @radacctdir@
23 top_builddir = @abs_top_builddir@
24 top_build_prefix=@abs_top_builddir@/
25 top_srcdir = @abs_top_srcdir@
26 datarootdir = @datarootdir@
30 # Makeflags set within the makefile appear to be additive and override
31 # flags set on the command line and the environmental variables
32 MAKEFLAGS = @MAKEFLAGS@
36 IMACROS = -imacros ${top_srcdir}/src/freeradius-devel/autoconf.h -imacros ${top_srcdir}/src/freeradius-devel/features.h
37 INCLUDE = -I${top_srcdir} -I${top_srcdir}/src
38 CFLAGS = $(IMACROS) $(INCLUDE) @CFLAGS@
40 LIBPREFIX = @LIBPREFIX@
46 AUTOHEADER = @AUTOHEADER@
47 INSTALL = ${top_builddir}/install-sh -c
48 INSTALL_PROGRAM = ${INSTALL}
49 INSTALL_DATA = ${INSTALL} -m 644
50 INSTALL_SCRIPT = ${INSTALL_PROGRAM}
51 INSTALLSTRIP = @INSTALLSTRIP@
58 RADDBDIR = ${raddbdir}
59 RUNDIR = ${localstatedir}/run/radiusd
62 LIBRADIUS = $(top_builddir)/src/lib/$(LIBPREFIX)freeradius-radius.la
68 #USE_SHARED_LIBS = @USE_SHARED_LIBS@
69 #USE_STATIC_LIBS = @USE_STATIC_LIBS@
73 STATIC_MODULES = @STATIC_MODULES@
75 OPENSSL_LIBS = @OPENSSL_LIBS@
76 OPENSSL_INCLUDE = @OPENSSL_INCLUDE@
77 CFLAGS += $(OPENSSL_INCLUDE)
79 LIBREADLINE = @LIBREADLINE@
84 SQL_ODBC_LIBS = @ODBC_LIBS@
85 SQL_ODBC_INCLUDE = @ODBC_INCLUDE@
88 # Version to use for packaging and other Make related things
90 RADIUSD_VERSION_STRING = @RADIUSD_VERSION_STRING@
93 # This allows dlopen to do runtime checks for version mistmatches
94 # between what it was originally linked with, and the library it's
97 #LDFLAGS += -release=$(RADIUSD_VERSION_STRING)
100 HOSTINFO = @HOSTINFO@
102 ifneq ($(WITH_OPENSSL_MD5),)
103 LIBRADIUS_WITH_OPENSSL = 1
104 CFLAGS += -DWITH_OPENSSL_MD5
107 ifneq ($(WITH_OPENSSL_SHA1),)
108 LIBRADIUS_WITH_OPENSSL = 1
109 CFLAGS += -DWITH_OPENSSL_SHA1
112 ifneq ($(LIBRADIUS_WITH_OPENSSL),)
113 ifeq ($(OPENSSL_LIBS),)
114 $(error OPENSSL_LIBS must be define in order to use WITH_OPENSSL_*)
116 LIBRADIUS += $(OPENSSL_LIBS)
120 # http://clang.llvm.org/StaticAnalysis.html
122 # $ make SCAN=/path/to/checker/
125 CC := $(SCAN)/scan-build gcc -DFR_SCAN_BUILD
130 # Portability cruft. This is for replacing libtroll && libltdl
131 # with gcc and dlopen().
133 ifeq "$(USE_SHARED_LIBS)" "yes"
134 LINK_MODE.exe = -export-dynamic
137 LINK_MODE.exe = -static
140 ifneq "$(LIBTOOL)" ""
141 COMPILE.c := $(LIBTOOL) --quiet --mode=compile $(CC)
142 LINK.lib := $(LIBTOOL) --quiet --mode=link $(CC) -rpath $(libdir) -o
149 ifeq "$(USE_SHARED_LIBS)" "yes"
150 LINK.lib := $(CC) -shared -o
153 LINK.lib := $(AR) cru
160 ifneq "$(findstring Darwin,$(shell uname -a))" ""
166 BOILER = @boilermake@
168 ifneq "$(BOILER)" "yes"
169 all: $(top_srcdir)/scripts/jlibtool
171 $(top_srcdir)/scripts/jlibtool: $(top_srcdir)/scripts/jlibtool.c
174 # Add -module for normal libtool. It doesn't like building "foo.la"
175 # as a library unless you tell it to shut up, yes, I KNOW this is a module
176 ifeq "$(findstring jlibtool,$(LIBTOOL))" ""
179 MOD_RPATH = -rpath $(libdir)
183 $(error Building FreeRADIUS requires libtool)