ttls: return channel bindings on half round trip success
[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         = $(datadir)/freeradius
19 logdir          = @logdir@
20 includedir      = @includedir@
21 raddbdir        = @raddbdir@
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@
27
28 MAKE            = @MAKE@
29
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@
33
34 CC              = @CC@
35 RANLIB          = @RANLIB@
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) -fno-strict-aliasing @CFLAGS@
39 CPPFLAGS        = @CPPFLAGS@
40 LIBPREFIX       = @LIBPREFIX@
41 EXEEXT          = @EXEEXT@
42
43 LIBTOOL         = JLIBTOOL
44 ACLOCAL         = @ACLOCAL@
45 AUTOCONF        = @AUTOCONF@
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@
52
53 LCRYPT          = @CRYPTLIB@
54 LIBS            = @LIBS@
55 LDFLAGS         = @LDFLAGS@
56
57 LOGDIR          = ${logdir}
58 RADDBDIR        = ${raddbdir}
59 RUNDIR          = ${localstatedir}/run/radiusd
60 SBINDIR         = ${sbindir}
61 RADIR           = ${radacctdir}
62 LIBRADIUS       = $(top_builddir)/src/lib/$(LIBPREFIX)freeradius-radius.la -l talloc
63
64 #USE_SHARED_LIBS = @USE_SHARED_LIBS@
65 #USE_STATIC_LIBS = @USE_STATIC_LIBS@
66
67 USE_SHARED_LIBS = yes
68 USE_STATIC_LIBS = yes
69 STATIC_MODULES  = @STATIC_MODULES@
70
71 OPENSSL_LIBS    = @OPENSSL_LIBS@
72 OPENSSL_INCLUDE = @OPENSSL_INCLUDE@
73 CFLAGS          += $(OPENSSL_INCLUDE)
74
75 LIBREADLINE     = @LIBREADLINE@
76
77 #
78 #  Version to use for packaging and other Make related things
79 #
80 RADIUSD_VERSION_STRING = @RADIUSD_VERSION_STRING@
81
82 #
83 #  This allows dlopen to do runtime checks for version mistmatches
84 #  between what it was originally linked with, and the library it's
85 #  actually loading.
86 #
87 #LDFLAGS += -release=$(RADIUSD_VERSION_STRING)
88
89 MODULES         = @MODULES@
90 HOSTINFO        = @HOSTINFO@
91
92 ifneq ($(WITH_OPENSSL_MD5),)
93 LIBRADIUS_WITH_OPENSSL = 1
94 CFLAGS += -DWITH_OPENSSL_MD5
95 endif
96
97 ifneq ($(WITH_OPENSSL_SHA1),)
98 LIBRADIUS_WITH_OPENSSL = 1
99 CFLAGS += -DWITH_OPENSSL_SHA1
100 endif
101
102 ifneq ($(LIBRADIUS_WITH_OPENSSL),)
103 ifeq ($(OPENSSL_LIBS),)
104 $(error OPENSSL_LIBS must be define in order to use WITH_OPENSSL_*)
105 else
106 LIBRADIUS += $(OPENSSL_LIBS)
107 endif
108 endif
109
110 #  http://clang.llvm.org/StaticAnalysis.html
111 #
112 #  $ make SCAN=/path/to/checker/ 
113 #
114 ifneq ($(SCAN),)
115 CC              := $(SCAN)/scan-build gcc -DFR_SCAN_BUILD
116 LIBTOOL         := 
117 endif
118
119 #
120 #  Portability cruft.  This is for replacing libtroll && libltdl
121 #  with gcc and dlopen().
122 #
123 ifeq "$(USE_SHARED_LIBS)" "yes"
124 LINK_MODE.exe   = -export-dynamic
125 CFLAGS          += -fPIC
126 else
127 LINK_MODE.exe   = -static
128 endif
129
130 ifneq "$(LIBTOOL)" ""
131 COMPILE.c       := $(LIBTOOL) --quiet --mode=compile $(CC) 
132 LINK.lib        := $(LIBTOOL) --quiet --mode=link $(CC) -rpath $(libdir) -o
133 LO              := lo
134 LA              := la
135 else
136 COMPILE.c       := $(CC)
137 LO              := o
138
139 ifeq "$(USE_SHARED_LIBS)" "yes"
140 LINK.lib        := $(CC) -shared -o
141 LA              := so
142 else
143 LINK.lib        := $(AR) cru
144 LA              := a
145 endif
146
147 endif
148
149 ifeq "$(LA)" "so"
150 ifneq "$(findstring Darwin,$(shell uname -a))" ""
151 LA              := dylib
152 endif
153 endif