$OpenBSD$

Index: Makefile
--- Makefile.orig
+++ Makefile
@@ -1,32 +1,25 @@
 # $FreeBSD$
 
-.include <src.opts.mk>
-
-PACKAGE=lib${LIB}
 LIB=		fetch
 CFLAGS+=	-I.
-SRCS=		fetch.c common.c ftp.c http.c file.c \
-		ftperr.h httperr.h
+SRCS=		ftperr.h httperr.h fetch.c common.c ftp.c http.c file.c
 INCS=		fetch.h
 MAN=		fetch.3
 CLEANFILES=	ftperr.h httperr.h
 
-.if ${MK_INET6_SUPPORT} != "no"
 CFLAGS+=	-DINET6
-.endif
 
-.if ${MK_OPENSSL} != "no"
 CFLAGS+=	-DWITH_SSL
-LIBADD+=	ssl crypto
-.else
-LIBADD+=	md
-.endif
+LDADD+=		-lssl -lcrypto
+DPADD+=		${LIBSSL} ${LIBCRYPTO}
 
 CFLAGS+=	-DFTP_COMBINE_CWDS
 
 CSTD?=		c99
 
 SHLIB_MAJOR=    6
+
+BUILDFIRST=	ftperr.h httperr.h
 
 ftperr.h: ftp.errors ${.CURDIR}/Makefile
 	@echo "static struct fetcherr ftp_errlist[] = {" > ${.TARGET}
