From 8fe24125cae4872a14af74f7b45a36cde942802f Mon Sep 17 00:00:00 2001 From: delphij Date: Mon, 13 Oct 2014 22:15:26 +0000 Subject: Promote libevent to lib/ level and fold ftp-proxy into its parent Makefile. This allows us to use libevent for other application in the future. For now libevent is still INTERNALLIB and no shared library is installed. MFC after: 1 month --- lib/Makefile | 5 +++++ lib/libevent/Makefile | 31 +++++++++++++++++++++++++++++++ share/mk/src.libnames.mk | 4 ++++ usr.sbin/ftp-proxy/Makefile | 16 ++++++++++++++-- usr.sbin/ftp-proxy/Makefile.inc | 5 ----- usr.sbin/ftp-proxy/ftp-proxy/Makefile | 17 ----------------- usr.sbin/ftp-proxy/libevent/Makefile | 27 --------------------------- 7 files changed, 54 insertions(+), 51 deletions(-) create mode 100644 lib/libevent/Makefile delete mode 100644 usr.sbin/ftp-proxy/Makefile.inc delete mode 100644 usr.sbin/ftp-proxy/ftp-proxy/Makefile delete mode 100644 usr.sbin/ftp-proxy/libevent/Makefile diff --git a/lib/Makefile b/lib/Makefile index a5ab970..c558f11 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -44,6 +44,7 @@ SUBDIR= ${SUBDIR_ORDERED} \ libdevstat \ libdwarf \ libedit \ + ${_libevent} \ libexecinfo \ libexpat \ libfetch \ @@ -226,6 +227,10 @@ _libnetgraph= libnetgraph _libypclnt= libypclnt .endif +.if ${MK_PF} != "no" +_libevent= libevent +.endif + .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" _libsmb= libsmb _libvgl= libvgl diff --git a/lib/libevent/Makefile b/lib/libevent/Makefile new file mode 100644 index 0000000..d8b1e20 --- /dev/null +++ b/lib/libevent/Makefile @@ -0,0 +1,31 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR}/../../contrib/pf/libevent + +.include + +LIB= event +SHLIB_MAJOR= 1 +PRIVATELIB= +INTERNALLIB= + +SRCS= buffer.c evbuffer.c event.c kqueue.c log.c poll.c select.c signal.c +HDRS= event.h + +CFLAGS+= -I${.CURDIR} \ + -DHAVE_CLOCK_GETTIME \ + -DHAVE_FCNTL_H \ + -DHAVE_POLL \ + -DHAVE_SELECT \ + -DHAVE_SETFD \ + -DHAVE_STDARG_H \ + -DHAVE_SYS_IOCTL_H \ + -DHAVE_SYS_TIME_H \ + -DHAVE_UNISTD_H \ + -DHAVE_VASPRINTF \ + -DHAVE_WORKING_KQUEUE \ + -DVERSION='"1.3b"' + +WARNS?= 2 + +.include diff --git a/share/mk/src.libnames.mk b/share/mk/src.libnames.mk index bc41ea2..336ede1 100644 --- a/share/mk/src.libnames.mk +++ b/share/mk/src.libnames.mk @@ -21,6 +21,10 @@ LIBBSDSTATDIR= ${ROOTOBJDIR}/lib/libbsdstat LDBSDSTAT?= ${LIBBSDSTATDIR}/libbsdstat.so LIBBSDSTAT?= ${LIBBSDSTATDIR}/libbsdstat.a +LIBEVENTDIR= ${ROOTOBJDIR}/lib/libevent +LDEVENT?= ${LIBEVENTDIR}/libevent.so +LIBEVENT?= ${LIBEVENTDIR}/libevent.a + LIBHEIMIPCCDIR= ${ROOTOBJDIR}/kerberos5/lib/libheimipcc LDHEIMIPCC?= ${LIBHEIMIPCCDIR}/libheimipcc.so LIBHEIMIPCC?= ${LIBHEIMIPCCDIR}/libheimipcc.a diff --git a/usr.sbin/ftp-proxy/Makefile b/usr.sbin/ftp-proxy/Makefile index 67660c8..7a3ef47 100644 --- a/usr.sbin/ftp-proxy/Makefile +++ b/usr.sbin/ftp-proxy/Makefile @@ -1,5 +1,17 @@ # $FreeBSD$ -SUBDIR= libevent ftp-proxy +.PATH: ${.CURDIR}/../../contrib/pf/ftp-proxy -.include +PROG= ftp-proxy +MAN= ftp-proxy.8 + +SRCS= ftp-proxy.c filter.c + +CFLAGS+=-I${.CURDIR}/../../contrib/pf/libevent + +LDADD+= ${LIBEVENT} +DPADD+= ${LIBEVENT} + +WARNS?= 3 + +.include diff --git a/usr.sbin/ftp-proxy/Makefile.inc b/usr.sbin/ftp-proxy/Makefile.inc deleted file mode 100644 index 9043d09..0000000 --- a/usr.sbin/ftp-proxy/Makefile.inc +++ /dev/null @@ -1,5 +0,0 @@ -# $FreeBSD$ - -LIBEVENT= ${.OBJDIR}/../libevent/libevent.a - -.include "../Makefile.inc" diff --git a/usr.sbin/ftp-proxy/ftp-proxy/Makefile b/usr.sbin/ftp-proxy/ftp-proxy/Makefile deleted file mode 100644 index de49888..0000000 --- a/usr.sbin/ftp-proxy/ftp-proxy/Makefile +++ /dev/null @@ -1,17 +0,0 @@ -# $FreeBSD$ - -.PATH: ${.CURDIR}/../../../contrib/pf/ftp-proxy - -PROG= ftp-proxy -MAN= ftp-proxy.8 - -SRCS= ftp-proxy.c filter.c - -CFLAGS+= -I${.CURDIR}/../../../contrib/pf/libevent - -LDADD+= ${LIBEVENT} -DPADD+= ${LIBEVENT} - -WARNS?= 3 - -.include diff --git a/usr.sbin/ftp-proxy/libevent/Makefile b/usr.sbin/ftp-proxy/libevent/Makefile deleted file mode 100644 index a8ff09b..0000000 --- a/usr.sbin/ftp-proxy/libevent/Makefile +++ /dev/null @@ -1,27 +0,0 @@ -# $FreeBSD$ - -.PATH: ${.CURDIR}/../../../contrib/pf/libevent - - -LIB= event -INTERNALLIB=yes -SRCS= buffer.c evbuffer.c event.c kqueue.c log.c poll.c select.c signal.c -HDRS= event.h - -CFLAGS+= -I${.CURDIR} \ - -DHAVE_CLOCK_GETTIME \ - -DHAVE_FCNTL_H \ - -DHAVE_POLL \ - -DHAVE_SELECT \ - -DHAVE_SETFD \ - -DHAVE_STDARG_H \ - -DHAVE_SYS_IOCTL_H \ - -DHAVE_SYS_TIME_H \ - -DHAVE_UNISTD_H \ - -DHAVE_VASPRINTF \ - -DHAVE_WORKING_KQUEUE \ - -DVERSION='"1.3b"' - -WARNS?= 2 - -.include -- cgit v1.1