Fix typo. "post-auth", not "postauth"
[freeradius.git] / Make.inc.in
index 854bade..768c541 100644 (file)
@@ -28,7 +28,7 @@ datarootdir   = @datarootdir@
 MAKE           = @MAKE@
 CC             = @CC@
 RANLIB         = @RANLIB@
-INCLUDE                =
+INCLUDE                = -I${top_srcdir} -I${top_srcdir}/src
 CFLAGS         = $(INCLUDE) @CFLAGS@
 CPPFLAGS       = @CPPFLAGS@
 LIBPREFIX      = @LIBPREFIX@
@@ -58,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@
@@ -107,3 +108,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