add DHCP-Do-Not-Respond value to make it easier to not respond
[freeradius.git] / Make.inc.in
1 # -*- makefile -*-
2 # Make.inc.in
3 #
4 # Version:      $Id$
5 #
6
7 # Location of files.
8 prefix          = @prefix@
9 exec_prefix     = @exec_prefix@
10 sysconfdir      = @sysconfdir@
11 localstatedir   = @localstatedir@
12 libdir          = @libdir@
13 bindir          = @bindir@
14 sbindir         = @sbindir@
15 docdir          = @docdir@
16 mandir          = @mandir@
17 datadir         = @datadir@
18 dictdir         = @dictdir@
19 logdir          = @logdir@
20 includedir      = @includedir@
21
22 #
23 #  In some systems, we don't want to over-write ANY configuration.
24 #  So we do:
25 #
26 #       $./configure
27 #       $ make
28 #       $ make -Draddbdir=/tmp/garbage install
29 #
30 #  and all of the configuration files go into /tmp/garbage
31 #
32 ifeq "${raddbdir}" ""
33 raddbdir        = @raddbdir@
34 endif
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@
41
42 MAKE            = @MAKE@
43
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@
47
48 CC              = @CC@
49 RANLIB          = @RANLIB@
50
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
55
56 CFLAGS          = $(IMACROS) $(INCLUDE) -std=c99 -fno-strict-aliasing @CFLAGS@
57 CPPFLAGS        = @CPPFLAGS@
58 LIBPREFIX       = @LIBPREFIX@
59 EXEEXT          = @EXEEXT@
60
61 LIBTOOL         = JLIBTOOL
62 ACLOCAL         = @ACLOCAL@
63 AUTOCONF        = @AUTOCONF@
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@
71
72 LCRYPT          = @CRYPTLIB@
73 LIBS            = @LIBS@
74 LDFLAGS         = @LDFLAGS@
75
76 LOGDIR          = ${logdir}
77 RADDBDIR        = ${raddbdir}
78 RUNDIR          = ${localstatedir}/run/radiusd
79 SBINDIR         = ${sbindir}
80 RADIR           = ${radacctdir}
81 LIBRADIUS       = $(top_builddir)/src/lib/$(LIBPREFIX)freeradius-radius.la -ltalloc
82
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@
87
88 STATIC_MODULES  = @STATIC_MODULES@
89
90 OPENSSL_LIBS    = @OPENSSL_LIBS@
91 OPENSSL_INCLUDE = @OPENSSL_INCLUDE@
92
93 #
94 #  If the system has OpenSSL, use it's version of MD4/MD5/SHA1, instead of
95 #  using ours.
96 #
97 ifneq "$(OPENSSL_INCLUDE)" ""
98 CFLAGS          +=  -DWITH_OPENSSL_MD4 -DWITH_OPENSSL_MD5
99 endif
100
101 LIBREADLINE     = @LIBREADLINE@
102
103 #
104 #  Version to use for packaging and other Make related things
105 #
106 RADIUSD_VERSION_STRING = @RADIUSD_VERSION_STRING@
107
108 #
109 #  This allows dlopen to do runtime checks for version mistmatches
110 #  between what it was originally linked with, and the library it's
111 #  actually loading.
112 #
113 #LDFLAGS += -release=$(RADIUSD_VERSION_STRING)
114
115 MODULES         = @MODULES@
116 HOSTINFO        = @HOSTINFO@
117
118 ifneq ($(WITH_OPENSSL_MD5),)
119 LIBRADIUS_WITH_OPENSSL = 1
120 CFLAGS += -DWITH_OPENSSL_MD5
121 endif
122
123 ifneq ($(WITH_OPENSSL_SHA1),)
124 LIBRADIUS_WITH_OPENSSL = 1
125 CFLAGS += -DWITH_OPENSSL_SHA1
126 endif
127
128 ifneq ($(LIBRADIUS_WITH_OPENSSL),)
129 ifeq ($(OPENSSL_LIBS),)
130 $(error OPENSSL_LIBS must be define in order to use WITH_OPENSSL_*)
131 else
132 LIBRADIUS += $(OPENSSL_LIBS)
133 endif
134 endif
135
136 #  http://clang.llvm.org/StaticAnalysis.html
137 #
138 #  $ make SCAN=/path/to/checker/
139 #
140 ifneq ($(SCAN),)
141 CC              := $(SCAN)/scan-build gcc -DFR_SCAN_BUILD
142 LIBTOOL         :=
143 endif
144
145 #
146 #  Portability cruft.  This is for replacing libtroll && libltdl
147 #  with gcc and dlopen().
148 #
149 ifeq "$(USE_SHARED_LIBS)" "yes"
150 LINK_MODE.exe   = -export-dynamic
151 CFLAGS          += -fPIC
152 else
153 LINK_MODE.exe   = -static
154 endif
155
156 ifneq "$(LIBTOOL)" ""
157 COMPILE.c       := $(LIBTOOL) --quiet --mode=compile $(CC)
158 LINK.lib        := $(LIBTOOL) --quiet --mode=link $(CC) -rpath $(libdir) -o
159 LO              := lo
160 LA              := la
161 else
162 COMPILE.c       := $(CC)
163 LO              := o
164
165 ifeq "$(USE_SHARED_LIBS)" "yes"
166 LINK.lib        := $(CC) -shared -o
167 LA              := so
168 else
169 LINK.lib        := $(AR) cru
170 LA              := a
171 endif
172
173 endif
174
175 ifeq "$(LA)" "so"
176 ifneq "$(findstring Darwin,$(shell uname -a))" ""
177 LA              := dylib
178 endif
179 endif
180
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@
184
185 ifeq "${CC}" "clang"
186     ifeq "${ANALYZE.c}" ""
187         ANALYZE.c := "${CC}"
188     endif
189 endif
190
191 #
192 #  With shared libs, the test binaries are in a different place
193 #  AND the method we use to run those binaries changes.
194 #
195 ifeq "$(USE_SHARED_LIBS)" "yes"
196         TESTBINDIR = ./$(BUILD_DIR)/bin/local
197         TESTBIN    = $(JLIBTOOL) --quiet --mode=execute $(TESTBINDIR)
198 else
199         TESTBINDIR = ./$(BUILD_DIR)/bin
200         TESTBIN    = ./$(BUILD_DIR)/bin
201 endif