--- embedaddon/mpd/src/Makefile 2012/02/21 23:32:47 1.1.1.1 +++ embedaddon/mpd/src/Makefile 2016/11/01 09:56:12 1.1.1.3 @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.1.1.1 2012/02/21 23:32:47 misho Exp $ +# $Id: Makefile,v 1.1.1.3 2016/11/01 09:56:12 misho Exp $ # # Makefile for mpd, multi-link PPP daemon for FreeBSD # @@ -10,10 +10,13 @@ PROG?= mpd5 PREFIX?= /usr/local BINDIR?= ${PREFIX}/sbin -VERSION= 5.6 +VERSION= 5.8 NOMAN= NO_MAN= +BINOWN!= /usr/bin/id -n -u +BINGRP!= /usr/bin/id -n -g + # Default configuration directory MPD_CONF_DIR?= ${PREFIX}/etc/mpd5 @@ -58,21 +61,26 @@ USE_AUTH_PAM= yes USE_AUTH_SYSTEM= yes # Build with builtin libpdel - NOLIBPDEL= yes -# Build without builtin web server - +# Build without builtin web server. #NOWEB= yes # Set syslog logging facility. Change LOG_DAEMON to whatever you like. - +# Comment this line disable syslog (3) support SYSLOG_FACILITY= LOG_DAEMON + +# Print wide protocol names instead of short names. +# Comment this line, to save about 10 KB space COPTS+= -DPROTO_NAME_LIST +# Reduce some internal structures size to save more memory +# This is to limit amount of active sessions +#SMALL_SYSTEM= yes + # Compiler & linker flags -.if defined ( USE_TCP_WRAP ) +.if exists ( /usr/lib/libwrap.so ) && defined ( USE_TCP_WRAP ) ## filter TCP accept connections LDADD+= -lwrap DPADD+= ${LIBWRAP} @@ -86,7 +94,7 @@ DPADD+= ${LIBOPIE} COPTS+= -DUSE_OPIE .endif -.if defined ( USE_AUTH_PAM ) +.if exists ( /usr/lib/libpam.so ) && defined ( USE_AUTH_PAM ) LDADD+= -lpam DPADD+= ${LIBPAM} COPTS+= -DUSE_PAM @@ -94,12 +102,12 @@ COPTS+= -DUSE_PAM .if defined ( USE_AUTH_SYSTEM ) ## based on /etc/password -LDADD+= -lcrypt -lutil +LDADD+= -lcrypt DPADD+= ${LIBCRYPT} ${LIBUTIL} COPTS+= -DUSE_SYSTEM .endif -LDADD+= -lnetgraph +LDADD+= -lnetgraph -lutil DPADD+= ${LIBNETGRAPH} LDADD+= -L/usr/lib -lradius @@ -111,12 +119,10 @@ LDADD+= -L${PREFIX}/lib LDADD+= -lpdel LDADD+= -lexpat .endif -LDADD+= -lssl MPD_VERSION!= echo -n "${VERSION} (`id -un`@`uname -n` `LC_TIME=C date +'%R %v'`)" -COPTS+= -DPATH_CONF_DIR=\"${MPD_CONF_DIR}\" -COPTS+= -DSYSLOG_FACILITY=${SYSLOG_FACILITY} +COPTS+= -DPATH_CONF_DIR='"${MPD_CONF_DIR}"' COPTS+= -DMPD_VERSION='"${MPD_VERSION}"' COPTS+= -g COPTS+= -Wall \ @@ -133,9 +139,13 @@ COPTS+= -Wall \ -I${PREFIX}/include .if defined ( MPD_VENDOR ) -COPTS+= '-DMPD_VENDOR="${MPD_VENDOR}"' +COPTS+= -DMPD_VENDOR='"${MPD_VENDOR}"' .endif +.if defined ( SYSLOG_FACILITY ) +COPTS+= -DSYSLOG_FACILITY='"${SYSLOG_FACILITY}"' +.endif + # Standard sources STDSRCS= assert.c auth.c bund.c rep.c ccp.c chap.c \ @@ -148,6 +158,7 @@ STDSRCS= assert.c auth.c bund.c rep.c ccp.c cha COPTS+= -DNOWEB .else STDSRCS+= web.c +LDADD+= -lssl .endif .if defined ( NOLIBPDEL ) @@ -289,12 +300,17 @@ COPTS+= -DUSE_FETCH LDADD+= -lfetch DPADD+= ${LIBFETCH} .endif +.if defined ( SMALL_SYSTEM ) +COPTS+= -DSMALL_SYSTEM +.endif # Add in required support files and libraries - -.if defined ( NEED_DES ) LDADD+= -lcrypto DPADD+= ${LIBCRYPTO} + +.if exists ( /usr/lib/libexecinfo.so ) +LDADD+= -lexecinfo +COPTS+= -DUSE_BACKTRACE .endif # Now add standard sources