# Pound - the reverse-proxy load-balancer
# Copyright (C) 2002 Apsis GmbH
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA  02111-1307, USA.
#
# Contact information:
# Apsis GmbH
# P.O.Box
# 8707 Uetikon am See
# Switzerland
# Tel: +41-1-920 4904
# EMail: roseg@apsis.ch
#
# $Id: Makefile,v 0.8 2002/08/01 13:29:15 roseg Exp roseg $

CC=gcc
# For GNU-less systems use:
#CC=cc

# Configuration file default; if none, look at config.c for default!
F_CONF=/usr/local/etc/pound/pound.cfg

CFLAGS=-O2 -DF_CONF=\"$(F_CONF)\" -DAEMON
# some old compilers don't like -O2; you may want to try -g for debugging
#CFLAGS=-O -DF_CONF=\"$(F_CONF)\" -DAEMON
# For OpenBSD use:
#CFLAGS=-O2 -pthread -DF_CONF=\"$(F_CONF)\" -DAEMON

LIBS=-lssl -lpthread
# For SystemV/Solaris use:
#LIBS=-lssl -lpthread -lsocket -lnsl
# For OpenBSD use:
#LIBS=-lssl
# Some old Linux and/or SSLeay require:
#LIBS=-lssl -lcrypto -lpthread
# If your libraries are installed in an unusual place:
#LIBS=-L/usr/local/openssl/lib -lssl -lpthread

DEST=/usr/local

OBJS=pound.o http.o config.o svc.o

all:	pound pound.8

pound:	$(OBJS)
		$(CC) $(CFLAGS) -o pound $(OBJS) $(LIBS)

$(OBJS):	pound.h

install:	all
		install -o bin -g bin -m 555 -s pound $(DEST)/bin
		install -o bin -g bin -m 644 pound.8 $(DEST)/man/man8

clean:
		rm -f pound $(OBJS)

uninstall:
		-rm -f $(DEST)/bin/pound $(DEST)/man/man8/pound.8 $(DEST)/man/cat8/pound.8
