rlm_eap: add eap_chbind.c to build
[freeradius.git] / Make.inc.in
index 557853a..1e11dc9 100644 (file)
@@ -21,13 +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@
@@ -106,3 +107,39 @@ 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