|
version 1.1, 2012/02/21 23:32:47
|
version 1.1.1.4.2.1, 2017/01/23 15:59:24
|
|
Line 10
|
Line 10
|
| PROG?= mpd5 |
PROG?= mpd5 |
| PREFIX?= /usr/local |
PREFIX?= /usr/local |
| BINDIR?= ${PREFIX}/sbin |
BINDIR?= ${PREFIX}/sbin |
| VERSION= 5.6 | VERSION= 5.8 |
| NOMAN= |
NOMAN= |
| NO_MAN= | MK_MAN=no |
| |
|
| |
BINOWN!= /usr/bin/id -n -u |
| |
BINGRP!= /usr/bin/id -n -g |
| |
|
| # Default configuration directory |
# Default configuration directory |
| |
|
| MPD_CONF_DIR?= ${PREFIX}/etc/mpd5 | MPD_CONF_DIR?= /etc/mpd5 |
| |
|
| # Define supported physical layer types |
# Define supported physical layer types |
| |
|
|
Line 58 USE_AUTH_PAM= yes
|
Line 61 USE_AUTH_PAM= yes
|
| USE_AUTH_SYSTEM= yes |
USE_AUTH_SYSTEM= yes |
| |
|
| # Build with builtin libpdel |
# Build with builtin libpdel |
| |
|
| NOLIBPDEL= yes |
NOLIBPDEL= yes |
| |
|
| # Build without builtin web server | # Build without builtin web server. |
| |
| #NOWEB= yes |
#NOWEB= yes |
| |
|
| # Set syslog logging facility. Change LOG_DAEMON to whatever you like. |
# Set syslog logging facility. Change LOG_DAEMON to whatever you like. |
| # Comment this line disable syslog (3) support |
| SYSLOG_FACILITY= LOG_DAEMON |
SYSLOG_FACILITY= LOG_DAEMON |
| COPTS+= -DPROTO_NAME_LIST |
|
| |
|
| |
# Print wide protocol names instead of short names. |
| |
# Comment this line, to save about 10 KB space |
| |
CFLAGS+= -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 |
# Compiler & linker flags |
| |
|
| .if defined ( USE_TCP_WRAP ) | .if exists ( /usr/lib/libwrap.so ) && defined ( USE_TCP_WRAP ) |
| ## filter TCP accept connections |
## filter TCP accept connections |
| LDADD+= -lwrap |
LDADD+= -lwrap |
| DPADD+= ${LIBWRAP} |
DPADD+= ${LIBWRAP} |
| COPTS+= -DUSE_WRAP | CFLAGS+= -DUSE_WRAP |
| .endif |
.endif |
| |
|
| ## authentication methods: opie, pam, /etc/password |
## authentication methods: opie, pam, /etc/password |
| .if defined ( USE_AUTH_OPIE ) |
.if defined ( USE_AUTH_OPIE ) |
| LDADD+= -lopie |
LDADD+= -lopie |
| DPADD+= ${LIBOPIE} |
DPADD+= ${LIBOPIE} |
| COPTS+= -DUSE_OPIE | CFLAGS+= -DUSE_OPIE |
| .endif |
.endif |
| |
|
| .if defined ( USE_AUTH_PAM ) | .if exists ( /usr/lib/libpam.so ) && defined ( USE_AUTH_PAM ) |
| LDADD+= -lpam |
LDADD+= -lpam |
| DPADD+= ${LIBPAM} |
DPADD+= ${LIBPAM} |
| COPTS+= -DUSE_PAM | CFLAGS+= -DUSE_PAM |
| .endif |
.endif |
| |
|
| .if defined ( USE_AUTH_SYSTEM ) |
.if defined ( USE_AUTH_SYSTEM ) |
| ## based on /etc/password |
## based on /etc/password |
| LDADD+= -lcrypt -lutil | LDADD+= -lcrypt |
| DPADD+= ${LIBCRYPT} ${LIBUTIL} |
DPADD+= ${LIBCRYPT} ${LIBUTIL} |
| COPTS+= -DUSE_SYSTEM | CFLAGS+= -DUSE_SYSTEM |
| .endif |
.endif |
| |
|
| LDADD+= -lnetgraph | LDADD+= -lnetgraph -lutil |
| DPADD+= ${LIBNETGRAPH} |
DPADD+= ${LIBNETGRAPH} |
| |
|
| LDADD+= -L/usr/lib -lradius | LDADD+= -lradius |
| DPADD+= ${LIBRADIUS} |
DPADD+= ${LIBRADIUS} |
| |
|
| ## libpdel needs ssl and libexpat (libxml2 cannot be used) |
## libpdel needs ssl and libexpat (libxml2 cannot be used) |
|
Line 111 LDADD+= -L${PREFIX}/lib
|
Line 119 LDADD+= -L${PREFIX}/lib
|
| LDADD+= -lpdel |
LDADD+= -lpdel |
| LDADD+= -lexpat |
LDADD+= -lexpat |
| .endif |
.endif |
| LDADD+= -lssl |
|
| |
|
| MPD_VERSION!= echo -n "${VERSION} (`id -un`@`uname -n` `LC_TIME=C date +'%R %v'`)" |
MPD_VERSION!= echo -n "${VERSION} (`id -un`@`uname -n` `LC_TIME=C date +'%R %v'`)" |
| |
|
| COPTS+= -DPATH_CONF_DIR=\"${MPD_CONF_DIR}\" | CFLAGS+= -DPATH_CONF_DIR='"${MPD_CONF_DIR}"' |
| COPTS+= -DSYSLOG_FACILITY=${SYSLOG_FACILITY} | CFLAGS+= -DMPD_VERSION='"${MPD_VERSION}"' |
| COPTS+= -DMPD_VERSION='"${MPD_VERSION}"' | CFLAGS+= -g |
| COPTS+= -g | CFLAGS+= -Wall \ |
| COPTS+= -Wall \ | |
| -Wcast-align \ |
-Wcast-align \ |
| -Wchar-subscripts \ |
-Wchar-subscripts \ |
| -Wformat \ |
-Wformat \ |
|
Line 133 COPTS+= -Wall \
|
Line 139 COPTS+= -Wall \
|
| -I${PREFIX}/include |
-I${PREFIX}/include |
| |
|
| .if defined ( MPD_VENDOR ) |
.if defined ( MPD_VENDOR ) |
| COPTS+= '-DMPD_VENDOR="${MPD_VENDOR}"' | CFLAGS+= -DMPD_VENDOR='"${MPD_VENDOR}"' |
| .endif |
.endif |
| |
|
| |
.if defined ( SYSLOG_FACILITY ) |
| |
CFLAGS+= -DSYSLOG_FACILITY='"${SYSLOG_FACILITY}"' |
| |
.endif |
| |
|
| # Standard sources |
# Standard sources |
| |
|
| STDSRCS= assert.c auth.c bund.c rep.c ccp.c chap.c \ |
STDSRCS= assert.c auth.c bund.c rep.c ccp.c chap.c \ |
|
Line 145 STDSRCS= assert.c auth.c bund.c rep.c ccp.c cha
|
Line 155 STDSRCS= assert.c auth.c bund.c rep.c ccp.c cha
|
| util.c vars.c eap.c msoft.c ippool.c |
util.c vars.c eap.c msoft.c ippool.c |
| |
|
| .if defined ( NOWEB ) |
.if defined ( NOWEB ) |
| COPTS+= -DNOWEB | CFLAGS+= -DNOWEB |
| .else |
.else |
| STDSRCS+= web.c |
STDSRCS+= web.c |
| |
LDADD+= -lssl |
| .endif |
.endif |
| |
|
| .if defined ( NOLIBPDEL ) |
.if defined ( NOLIBPDEL ) |
| COPTS+= -DNOLIBPDEL -I./contrib/libpdel | CFLAGS+= -DNOLIBPDEL -I./contrib/libpdel |
| PDPATH1= contrib/libpdel/util:contrib/libpdel/structs |
PDPATH1= contrib/libpdel/util:contrib/libpdel/structs |
| PDPATH2= contrib/libpdel/structs/type |
PDPATH2= contrib/libpdel/structs/type |
| .if defined ( NOWEB ) |
.if defined ( NOWEB ) |
|
Line 195 PDELSRCS+= http_connection.c \
|
Line 206 PDELSRCS+= http_connection.c \
|
| |
|
| .if defined ( PHYSTYPE_MODEM ) |
.if defined ( PHYSTYPE_MODEM ) |
| SRCS+= modem.c chat.c |
SRCS+= modem.c chat.c |
| COPTS+= -DPHYSTYPE_MODEM | CFLAGS+= -DPHYSTYPE_MODEM |
| .endif |
.endif |
| .if defined ( PHYSTYPE_UDP ) |
.if defined ( PHYSTYPE_UDP ) |
| SRCS+= udp.c |
SRCS+= udp.c |
| COPTS+= -DPHYSTYPE_UDP | CFLAGS+= -DPHYSTYPE_UDP |
| .endif |
.endif |
| .if defined ( PHYSTYPE_TCP ) |
.if defined ( PHYSTYPE_TCP ) |
| SRCS+= tcp.c |
SRCS+= tcp.c |
| COPTS+= -DPHYSTYPE_TCP | CFLAGS+= -DPHYSTYPE_TCP |
| .endif |
.endif |
| .if defined ( PHYSTYPE_NG_SOCKET ) |
.if defined ( PHYSTYPE_NG_SOCKET ) |
| SRCS+= ng.c |
SRCS+= ng.c |
| COPTS+= -DPHYSTYPE_NG_SOCKET | CFLAGS+= -DPHYSTYPE_NG_SOCKET |
| .endif |
.endif |
| .if defined ( PHYSTYPE_PPTP ) |
.if defined ( PHYSTYPE_PPTP ) |
| SRCS+= pptp.c pptp_ctrl.c |
SRCS+= pptp.c pptp_ctrl.c |
| COPTS+= -DPHYSTYPE_PPTP | CFLAGS+= -DPHYSTYPE_PPTP |
| COPTS+= -DRANDOMIZE_CID | CFLAGS+= -DRANDOMIZE_CID |
| #COPTS+= -DLOOK_LIKE_NT | #CFLAGS+= -DLOOK_LIKE_NT |
| .endif |
.endif |
| .if defined ( PHYSTYPE_PPPOE ) |
.if defined ( PHYSTYPE_PPPOE ) |
| SRCS+= pppoe.c |
SRCS+= pppoe.c |
| COPTS+= -DPHYSTYPE_PPPOE | CFLAGS+= -DPHYSTYPE_PPPOE |
| .endif |
.endif |
| .if defined ( PHYSTYPE_L2TP ) |
.if defined ( PHYSTYPE_L2TP ) |
| SRCS+= l2tp.c l2tp_avp.c l2tp_ctrl.c |
SRCS+= l2tp.c l2tp_avp.c l2tp_ctrl.c |
| COPTS+= -DPHYSTYPE_L2TP | CFLAGS+= -DPHYSTYPE_L2TP |
| .endif |
.endif |
| |
|
| # CCP |
# CCP |
| |
|
| .if defined ( CCP_DEFLATE ) && defined ( USE_NG_DEFLATE ) |
.if defined ( CCP_DEFLATE ) && defined ( USE_NG_DEFLATE ) |
| SRCS+= ccp_deflate.c |
SRCS+= ccp_deflate.c |
| COPTS+= -DCCP_DEFLATE | CFLAGS+= -DCCP_DEFLATE |
| COPTS+= -DUSE_NG_DEFLATE | CFLAGS+= -DUSE_NG_DEFLATE |
| .endif |
.endif |
| |
|
| .if defined ( CCP_MPPC ) && defined ( USE_NG_MPPC ) |
.if defined ( CCP_MPPC ) && defined ( USE_NG_MPPC ) |
| SRCS+= ccp_mppc.c |
SRCS+= ccp_mppc.c |
| COPTS+= -DCCP_MPPC | CFLAGS+= -DCCP_MPPC |
| COPTS+= -DUSE_NG_MPPC | CFLAGS+= -DUSE_NG_MPPC |
| .endif |
.endif |
| |
|
| .if defined ( CCP_PRED1 ) |
.if defined ( CCP_PRED1 ) |
| SRCS+= ccp_pred1.c |
SRCS+= ccp_pred1.c |
| COPTS+= -DCCP_PRED1 | CFLAGS+= -DCCP_PRED1 |
| .if defined ( USE_NG_PRED1 ) |
.if defined ( USE_NG_PRED1 ) |
| COPTS+= -DUSE_NG_PRED1 | CFLAGS+= -DUSE_NG_PRED1 |
| .endif |
.endif |
| .endif |
.endif |
| |
|
|
Line 251 COPTS+= -DUSE_NG_PRED1
|
Line 262 COPTS+= -DUSE_NG_PRED1
|
| .if defined ( ECP_DES ) |
.if defined ( ECP_DES ) |
| SRCS+= ecp_dese.c |
SRCS+= ecp_dese.c |
| SRCS+= ecp_dese_bis.c |
SRCS+= ecp_dese_bis.c |
| COPTS+= -DECP_DES | CFLAGS+= -DECP_DES |
| NEED_DES= yes |
NEED_DES= yes |
| .endif |
.endif |
| |
|
| # Features |
# Features |
| |
|
| .if defined ( USE_NG_BPF ) |
.if defined ( USE_NG_BPF ) |
| COPTS+= -DUSE_NG_BPF | CFLAGS+= -DUSE_NG_BPF |
| LDADD+= -lpcap |
LDADD+= -lpcap |
| DPADD+= ${LIBPCAP} |
DPADD+= ${LIBPCAP} |
| .endif |
.endif |
| .if defined ( USE_NG_CAR ) |
.if defined ( USE_NG_CAR ) |
| COPTS+= -DUSE_NG_CAR | CFLAGS+= -DUSE_NG_CAR |
| .endif |
.endif |
| .if defined ( USE_NG_IPACCT ) |
.if defined ( USE_NG_IPACCT ) |
| COPTS+= -DUSE_NG_IPACCT | CFLAGS+= -DUSE_NG_IPACCT |
| .endif |
.endif |
| .if defined ( USE_NG_NAT ) |
.if defined ( USE_NG_NAT ) |
| SRCS+= nat.c |
SRCS+= nat.c |
| COPTS+= -DUSE_NG_NAT | CFLAGS+= -DUSE_NG_NAT |
| .endif |
.endif |
| .if defined ( USE_NG_NETFLOW ) |
.if defined ( USE_NG_NETFLOW ) |
| COPTS+= -DUSE_NG_NETFLOW | CFLAGS+= -DUSE_NG_NETFLOW |
| .endif |
.endif |
| .if defined ( USE_NG_TCPMSS ) |
.if defined ( USE_NG_TCPMSS ) |
| COPTS+= -DUSE_NG_TCPMSS | CFLAGS+= -DUSE_NG_TCPMSS |
| .endif |
.endif |
| .if defined ( USE_NG_VJC ) |
.if defined ( USE_NG_VJC ) |
| COPTS+= -DUSE_NG_VJC | CFLAGS+= -DUSE_NG_VJC |
| .endif |
.endif |
| .if defined ( USE_IPFW ) |
.if defined ( USE_IPFW ) |
| COPTS+= -DUSE_IPFW | CFLAGS+= -DUSE_IPFW |
| .endif |
.endif |
| .if defined ( USE_FETCH ) |
.if defined ( USE_FETCH ) |
| COPTS+= -DUSE_FETCH | CFLAGS+= -DUSE_FETCH |
| LDADD+= -lfetch |
LDADD+= -lfetch |
| DPADD+= ${LIBFETCH} |
DPADD+= ${LIBFETCH} |
| .endif |
.endif |
| |
.if defined ( SMALL_SYSTEM ) |
| |
CFLAGS+= -DSMALL_SYSTEM |
| |
.endif |
| |
|
| # Add in required support files and libraries |
# Add in required support files and libraries |
| |
|
| .if defined ( NEED_DES ) |
|
| LDADD+= -lcrypto |
LDADD+= -lcrypto |
| DPADD+= ${LIBCRYPTO} |
DPADD+= ${LIBCRYPTO} |
| |
|
| |
.if exists ( /usr/lib/libexecinfo.so ) |
| |
LDADD+= -lexecinfo |
| |
CFLAGS+= -DUSE_BACKTRACE |
| .endif |
.endif |
| |
|
| # Now add standard sources |
# Now add standard sources |