ttls chbind: update VSA to use
[freeradius.git] / Make.inc.in
index 73c4b2d..768c541 100644 (file)
@@ -21,12 +21,14 @@ includedir  = @includedir@
 raddbdir       = @raddbdir@
 radacctdir     = @radacctdir@
 top_builddir   = @abs_top_builddir@
+top_build_prefix=@abs_top_builddir@/
 top_srcdir     = @abs_top_srcdir@
+datarootdir    = @datarootdir@
 
 MAKE           = @MAKE@
 CC             = @CC@
 RANLIB         = @RANLIB@
-INCLUDE                =
+INCLUDE                = -I${top_srcdir} -I${top_srcdir}/src
 CFLAGS         = $(INCLUDE) @CFLAGS@
 CPPFLAGS       = @CPPFLAGS@
 LIBPREFIX      = @LIBPREFIX@
@@ -56,6 +58,7 @@ LIBRADIUS     = $(top_builddir)/src/lib/$(LIBPREFIX)freeradius-radius.la
 LIBLTDL                = @LIBLTDL@
 INCLTDL                = @INCLTDL@
 LTDL_SUBDIRS   = @LTDL_SUBDIRS@
+CFLAGS         += $(INCLTDL)
 
 USE_SHARED_LIBS        = @USE_SHARED_LIBS@
 USE_STATIC_LIBS = @USE_STATIC_LIBS@
@@ -98,4 +101,46 @@ endif
 endif
 
 #  http://clang.llvm.org/StaticAnalysis.html
-SCAN_BUILD     = /path/to/checker-0.167/scan-build
+#
+#  $ make SCAN=/path/to/checker/ 
+#
+ifneq ($(SCAN),)
+CC             := $(SCAN)/scan-build gcc -DFR_SCAN_BUILD
+LIBTOOL                := 
+endif
+
+#
+#  Portability cruft.  This is for replacing libtroll && libltdl
+#  with gcc and dlopen().
+#
+ifeq "$(USE_SHARED_LIBS)" "yes"
+LINK_MODE.exe  = -export-dynamic
+CFLAGS         += -fPIC
+else
+LINK_MODE.exe  = -static
+endif
+
+ifneq "$(LIBTOOL)" ""
+COMPILE.c      := $(LIBTOOL) --quiet --mode=compile $(CC)
+LINK.lib       := $(LIBTOOL) --quiet --mode=link $(CC) -release $(RADIUSD_VERSION) -rpath $(libdir) -o
+LO             := lo
+LA             := la
+else
+COMPILE.c      := $(CC)
+LO             := o
+
+ifeq "$(USE_SHARED_LIBS)" "yes"
+LINK.lib       := $(CC) -shared -o
+LA             := so
+else
+LINK.lib       := $(AR) cru
+LA             := a
+endif
+
+endif
+
+ifeq "$(LA)" "so"
+ifneq "$(findstring Darwin,$(shell uname -a))" ""
+LA             := dylib
+endif
+endif