#
# Copyright (c) 1999,2000 WU-FTPD Development Group.
# All rights reserved.
# 
# Portions Copyright (c) 1980, 1985, 1988, 1989, 1990, 1991, 1993, 1994 
#    The Regents of the University of California.  
# Portions Copyright (c) 1993, 1994 Washington University in Saint Louis.  
# Portions Copyright (c) 1989 Massachusetts Institute of Technology.  
# Portions Copyright (c) 1998 Sendmail, Inc.
# Portions Copyright (c) 1983, 1995, 1996, 1997 Eric P. Allman.  
# Portions Copyright (c) 1996, 1998 Berkeley Software Design, Inc.  
# Portions Copyright (C) 1991, 1992, 1993, 1994, 1995 1996, 1997 
#    Free Software Foundation, Inc.  
# Portions Copyright (c) 1997 Stan Barber.  
# Portions Copyright (c) 1997 Kent Landfield.
# 
# Use and distribution of this software and its source code are governed by 
# the terms and conditions of the WU-FTPD Software License ("LICENSE").
# 
# If you did not receive a copy of the license, it may be obtained online at
# http://www.wu-ftpd.org/license.html.
# 
# $Id: Makefile.in,v 1.8 2000/07/01 18:43:59 wuftpd Exp $
#

prefix=/usr
exec_prefix=${prefix}
srcdir=.
mandir=${prefix}/man
INSTALL=/usr/bin/install -c

CC=gcc
 
#WNOERROR=-Werror
#WARNINGS=$(WNOERROR) -Wall -Wpointer-arith -Wcast-align -Wstrict-prototypes -Wmissing-prototypes 

CFLAGS=$(WARNINGS) -g -O2
LIBS= -lcrypt -lnsl -lresolv -lsupport

all: privatepw

privatepw:   privatepw.c ../../src/COPYRIGHT.c vers.c
	$(CC) $(CFLAGS) -L../../support $(LIBS) -o $@ privatepw.c ../../src/COPYRIGHT.c vers.c 

install: $(BINDIR)/privatepw $(MANDIR)/privatepw.8

$(BINDIR)/privatepw: privatepw
	$(INSTALL) -o bin -g bin -m 755 ../../bin/privatepw $(sbindir)/privatepw

$(mandir)/privatepw.8:
	$(INSTALL) -o bin -g bin -m 644 privatepw.8 $(mandir)/man8/privatepw.8

vers.c: 
	(sh ../../src/newvers.sh)

clean:
	rm -f core *.o *.lint .depend edit
	rm -f privatepw 

distclean: clean
	rm -f Makefile
	rm -f vers.c
