X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=Make.inc.in;h=768c5414fc79ed52ed6ef775518776af1df3c00c;hb=refs%2Fheads%2Feap-chbind;hp=73c4b2dac7087f7a5cddf386ac30cdc498d86c73;hpb=76217359b1a719af733594ee57abe5a1caa51b7f;p=freeradius.git diff --git a/Make.inc.in b/Make.inc.in index 73c4b2d..768c541 100644 --- a/Make.inc.in +++ b/Make.inc.in @@ -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