X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=Make.inc.in;h=a69292e333a3fdbadb0636d1d5a536d79e0e266b;hb=e22ff46e0eafa1db34e27f772fa238d7cd412b63;hp=684c30c719100feae4feca31207354ba0030a7da;hpb=b684088bedcec866ba7f772d8d233d6c9afa7100;p=freeradius.git diff --git a/Make.inc.in b/Make.inc.in index 684c30c..a69292e 100644 --- a/Make.inc.in +++ b/Make.inc.in @@ -15,10 +15,24 @@ sbindir = @sbindir@ docdir = @docdir@ mandir = @mandir@ datadir = @datadir@ -dictdir = $(datadir)/freeradius +dictdir = @dictdir@ logdir = @logdir@ includedir = @includedir@ + +# +# In some systems, we don't want to over-write ANY configuration. +# So we do: +# +# $./configure +# $ make +# $ make -Draddbdir=/tmp/garbage install +# +# and all of the configuration files go into /tmp/garbage +# +ifeq "${raddbdir}" "" raddbdir = @raddbdir@ +endif +modconfdir = @modconfdir@ radacctdir = @radacctdir@ top_builddir = @abs_top_builddir@ top_build_prefix=@abs_top_builddir@/ @@ -29,18 +43,21 @@ MAKE = @MAKE@ # Makeflags set within the makefile appear to be additive and override # flags set on the command line and the environmental variables -MAKEFLAGS = @MAKEFLAGS@ +MAKEFLAGS = @FR_MAKEFLAGS@ CC = @CC@ RANLIB = @RANLIB@ -IMACROS = -imacros ${top_srcdir}/src/freeradius-devel/autoconf.h -imacros ${top_srcdir}/src/freeradius-devel/features.h -INCLUDE = -I${top_srcdir} -I${top_srcdir}/src -CFLAGS = $(IMACROS) $(INCLUDE) @CFLAGS@ +INCLUDE = -I. -Isrc \ + -include src/freeradius-devel/autoconf.h \ + -include src/freeradius-devel/build.h \ + -include src/freeradius-devel/features.h \ + -include src/freeradius-devel/radpaths.h +CFLAGS = $(INCLUDE) -fno-strict-aliasing @CFLAGS@ CPPFLAGS = @CPPFLAGS@ LIBPREFIX = @LIBPREFIX@ EXEEXT = @EXEEXT@ -LIBTOOL = @LIBTOOL@ +LIBTOOL = JLIBTOOL ACLOCAL = @ACLOCAL@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -50,70 +67,76 @@ INSTALL_DATA = ${INSTALL} -m 644 INSTALL_SCRIPT = ${INSTALL_PROGRAM} INSTALLSTRIP = @INSTALLSTRIP@ +# +# Linker arguments for libraries searched for by the main +# configure script. +# +TALLOC_LIBS = @TALLOC_LIBS@ +TALLOC_LDFLAGS = @TALLOC_LDFLAGS@ + +OPENSSL_LIBS = @OPENSSL_LIBS@ +OPENSSL_LDFLAGS = @OPENSSL_LDFLAGS@ +OPENSSL_CPPFLAGS = @OPENSSL_CPPFLAGS@ + +PCAP_LIBS = @PCAP_LIBS@ +PCAP_LDFLAGS = @PCAP_LDFLAGS@ + +COLLECTDC_LIBS = @COLLECTDC_LIBS@ +COLLECTDC_LDFLAGS = @COLLECTDC_LDFLAGS@ + LCRYPT = @CRYPTLIB@ -LIBS = @LIBS@ -LDFLAGS = @LDFLAGS@ + +# +# OpenSSL libs (if used) must be linked everywhere in order for +# the server to work properly on on all platforms. +# +LIBS = $(OPENSSL_LIBS) $(TALLOC_LIBS) @LIBS@ +LDFLAGS = $(OPENSSL_LDFLAGS) $(TALLOC_LDFLAGS) @LDFLAGS@ LOGDIR = ${logdir} RADDBDIR = ${raddbdir} RUNDIR = ${localstatedir}/run/radiusd SBINDIR = ${sbindir} RADIR = ${radacctdir} -LIBRADIUS = $(top_builddir)/src/lib/$(LIBPREFIX)freeradius-radius.la - -LIBLTDL = @LIBLTDL@ -INCLTDL = @INCLTDL@ -CFLAGS += $(INCLTDL) +LIBRADIUS = $(top_builddir)/src/lib/$(LIBPREFIX)freeradius-radius.la $(TALLOC_LIBS) -#USE_SHARED_LIBS = @USE_SHARED_LIBS@ -#USE_STATIC_LIBS = @USE_STATIC_LIBS@ +USE_SHARED_LIBS = @USE_SHARED_LIBS@ +bm_shared_libs = @USE_SHARED_LIBS@ +USE_STATIC_LIBS = @USE_STATIC_LIBS@ +bm_static_libs = @USE_STATIC_LIBS@ -USE_SHARED_LIBS = yes -USE_STATIC_LIBS = yes STATIC_MODULES = @STATIC_MODULES@ - -OPENSSL_LIBS = @OPENSSL_LIBS@ -OPENSSL_INCLUDE = @OPENSSL_INCLUDE@ -CFLAGS += $(OPENSSL_INCLUDE) - LIBREADLINE = @LIBREADLINE@ -# -# SQL driver defines -# -SQL_ODBC_LIBS = @ODBC_LIBS@ -SQL_ODBC_INCLUDE = @ODBC_INCLUDE@ +WITH_DHCP = @WITH_DHCP@ # -# Make version info available to the build targets and linker +# Version to use for packaging and other Make related things # -RADIUSD_MAJOR_VERSION = @RADIUSD_MAJOR_VERSION@ -RADIUSD_MINOR_VERSION = @RADIUSD_MINOR_VERSION@ -RADIUSD_INCRM_VERSION = @RADIUSD_INCRM_VERSION@ -RADIUSD_VERSION = @RADIUSD_VERSION@ -RADIUSD_VERSION_STRING = @RADIUSD_VERSION_STRING@ -RADIUSD_VERSION_COMMIT = @RADIUSD_VERSION_COMMIT@ - -CFLAGS += -DRADIUSD_MAJOR_VERSION=\"${RADIUSD_MAJOR_VERSION}\" -CFLAGS += -DRADIUSD_MINOR_VERSION=\"${RADIUSD_MINOR_VERSION}\" -CFLAGS += -DRADIUSD_INCRM_VERSION=\"${RADIUSD_INCRM_VERSION}\" -CFLAGS += -DRADIUSD_VERSION=\"${RADIUSD_VERSION}\" -CFLAGS += -DRADIUSD_VERSION_STRING=\"${RADIUSD_VERSION_STRING}\" - -ifdef RADIUSD_VERSION_COMMIT -CFLAGS += -DRADIUSD_VERSION_COMMIT=\"${RADIUSD_VERSION_COMMIT}\" -endif +RADIUSD_VERSION_STRING = @RADIUSD_VERSION_STRING@ # -# This allows dlopen to do runtime checks for version mistmatches +# This allows dlopen to do runtime checks for version mismatches # between what it was originally linked with, and the library it's # actually loading. # -#LDFLAGS += -release=$(RADIUSD_VERSION_STRING) - MODULES = @MODULES@ HOSTINFO = @HOSTINFO@ +# +# If the system has OpenSSL, use it's version of MD4/MD5/SHA1, instead of +# using ours. +# +# We don't use OpenSSL SHA1 by default because src/modules/rlm_eap/libeap/fips186prf.c +# needs access to the SHA internals. +# +ifeq "$(WITH_OPENSSL)" "yes" +CFLAGS += -DWITH_OPENSSL_MD4 -DWITH_OPENSSL_MD5 +CPPFLAGS := "$(OPENSSL_CPPFLAGS) $(CPPFLAGS)" +endif + +OPENSSL_LIBS = @OPENSSL_LIBS@ + ifneq ($(WITH_OPENSSL_MD5),) LIBRADIUS_WITH_OPENSSL = 1 CFLAGS += -DWITH_OPENSSL_MD5 @@ -132,69 +155,18 @@ LIBRADIUS += $(OPENSSL_LIBS) endif endif -# http://clang.llvm.org/StaticAnalysis.html -# -# $ make SCAN=/path/to/checker/ -# -ifneq ($(SCAN),) -CC := $(SCAN)/scan-build gcc -DFR_SCAN_BUILD -LIBTOOL := -endif +# Path to clang, setting this enables the 'scan.*' build targets +# which perform static analysis on various server components. +ANALYZE.c := @clang_path@ # -# Portability cruft. This is for replacing libtroll && libltdl -# with gcc and dlopen(). +# With shared libs, the test binaries are in a different place +# AND the method we use to run those binaries changes. # 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_STRING) -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 - - -BOILER = @boilermake@ - -ifneq "$(BOILER)" "yes" -all: $(top_srcdir)/scripts/jlibtool - -$(top_srcdir)/scripts/jlibtool: $(top_srcdir)/scripts/jlibtool.c - $(CC) $^ -o $@ - -# Add -module for normal libtool. It doesn't like building "foo.la" -# as a library unless you tell it to shut up, yes, I KNOW this is a module -ifeq "$(findstring jlibtool,$(LIBTOOL))" "" - RLM_MOD = -module + TESTBINDIR = ./$(BUILD_DIR)/bin/local + TESTBIN = FR_LIBRARY_PATH=./build/lib/.libs $(JLIBTOOL) --quiet --mode=execute $(TESTBINDIR) else - MOD_RPATH = -rpath $(libdir) -endif - -ifeq "$(LIBTOOL)" "" -$(error Building FreeRADIUS requires libtool) -endif + TESTBINDIR = ./$(BUILD_DIR)/bin + TESTBIN = ./$(BUILD_DIR)/bin endif