$OpenBSD: patch-Makefile,v 1.5 2014/09/06 07:09:34 benoit Exp $
--- Makefile.orig	Tue Sep  6 07:59:53 2005
+++ Makefile	Fri Sep  5 10:18:07 2014
@@ -5,7 +5,7 @@
 
 ZBD_VERSION = 2.5.3
 
-OS = 
+#OS = 
 
 ###
 ### Locations of tools, libraries and installation directories.
@@ -46,19 +46,19 @@
 # BFINC = /usr/include/openssl
 # BFLIB = -lcrypto
 
-BFINC = -I../blowfish-0.9.5a
-BFLIB = ../blowfish-0.9.5a/libblowfish.a
+BFINC = -I/usr/include/openssl
+BFLIB = /usr/lib/libcrypto.a
 
 # Location of zlib include and library
 
-ZINC = -I../zlib-1.2.3
-ZLIB = ../zlib-1.2.3/libz.a
+ZINC = -I/usr/include
+ZLIB = /usr/lib/libz.a
 
 # Location of bzlib include and library
 # Set these empty if you don't want bzib2 support
 
-BZINC = -I../bzip2-1.0.3
-BZLIB = ../bzip2-1.0.3/libbz2.a
+BZINC = -I${PREFIX}/include
+BZLIB = ${PREFIX}/lib/libbz2.a
 
 #
 # Tools needed for Perl "POD"-format documentation conversion.
@@ -186,11 +186,12 @@
 #### You REALLY shouldn't have to modify anything beyond here ...
 ####
 
-CFLAGS = $(OPTIM) $(DEFINES) -I. $(GMPINC) $(BFINC) $(ZINC) $(BZINC)
+ZCFLAGS = $(DEFINES) -I. $(GMPINC) $(BFINC) $(ZINC) $(BZINC)
 
 LIBS = $(GMPLIB) $(BFLIB) $(ZLIB) $(BZLIB) $(OSLIBS)
 
 OBJS = zebedee.o sha_func.o huge.o $(GETOPTOBJ) $(SERVICEOBJ)
+SRCS = $(OBJS:S/.o$/.c/g)
 
 ZBDFILES = server.zbd vncviewer.zbd vncserver.zbd server.key server.id \
 	client1.key client2.key clients.id
@@ -200,13 +201,16 @@
 
 EXTRAFILES = $(ZBDFILES) $(TXTFILES)
 
-all : precheck zebedee$(EXE) zebedee.1 zebedee.html ftpgw.tcl.1 ftpgw.tcl.html zebedee.ja_JP.html
+all : precheck zebedee$(EXE) zebedee.1 zebedee.html ftpgw.tcl.1 ftpgw.tcl.html
 
 precheck :
 	@ if test -z "$(OS)"; then echo "Use '$(MAKE) OS=xxx' where xxx is win32, linux, linux64, solaris, freebsd, tru64, irix, hpux, macosx or bsdi"; exit 1; fi
 
 zebedee$(EXE) : $(OBJS)
-	$(CC) $(CFLAGS) -o zebedee$(EXE) $(OBJS) $(LIBS)
+	$(CC) $(CFLAGS) $(ZCFLAGS) -o zebedee$(EXE) $(OBJS) $(LIBS)
+
+$(OBJS) : $(SRCS)
+	$(CC) $(CFLAGS) $(ZCFLAGS) -c -o $@ $<
 
 huge.o : huge.h
 
