# DSTART
#                      getpop3 - a POP3 client for Linux.
# 
#                    Copyright 1996, Double Precision, Inc.
# 
# THE SOFTWARE IS PROVIDED FREE OF CHARGE, "AS IS", WITHOUT WARRANTY OF ANY
# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
# EVENT SHALL DOUBLE PRECISION, INC BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, ARISING FROM, OUT OF, OR IN CONNECTION WITH, OR USE OF THIS
# SOFTWARE.
# 
# Permission is granted to copy and distribute this software provided:
# 
#   1. The original getpop3 *.tgz is distributed by itself, or as a component
#      of another distribution, without any modifications, or changes.
#      You may not charge for copying or distributing the original, unaltered,
#      program, except for a nominal fee to cover duplication costs only.
# 
#   2. If you distribute a modified version of getpop3 by itself, or as a
#      component of another distribution, you must clearly identify your
#      changes or alterations, and acknowledge that you are responsible for
#      supporting any changes, and, identify the author of the original version
#      of this product.
# 
# Please see the included documentation for further information.
# 
# DEND
# $Id: Makefile.dist,v 1.10 1997/04/29 04:27:54 mrsam Exp $

CXXFLAGS=-DDEBUG=1 -fno-strength-reduce -fhandle-exceptions -g
VERSION=afx_1.15
SHELL=/bin/bash
ARFLAGS=rcs

ifndef INCLUDE_DEPENDS
all:
	[ ! -f Makefile.dist ] || { rm -f Makefile ; ln -s Makefile.dist Makefile ; }
	$(MAKE) -$(MAKEFLAGS) Makefile.checkout
	$(MAKE) -$(MAKEFLAGS) Makefile.depend
	export INCLUDE_DEPENDS=1 ; $(MAKE) -$(MAKEFLAGS) 
endif

AFXOBJ=string.o string2.o exception.o
AFXSRC=string.C string2.C exception.C
AFXINCLUDE=afx.h afxtempl.h

afx.a: $(AFXOBJ)
	$(AR) $(ARFLAGS) afx.a $(AFXOBJ)

afx.o: afx.h

ifdef INCLUDE_DEPENDS
include Makefile.depend
include Makefile.checkout
endif

Makefile.checkout: $(AFXSRC) $(AFXINCLUDE) Makefile
	@for f in $(AFXSRC) $(AFXINCLUDE) ; do \
		if [ -f RCS/$$f",v" ] ; then \
		   echo "$$f: RCS/$$f"",v" ; echo "	co $$f" ; echo "" ;\
		fi ; done >Makefile.checkout

Makefile.depend: $(AFXSRC) $(AFXINCLUDE) Makefile
	@for f in $(AFXSRC) ; do echo -n $$f | sed "s/.$$/o: $$f/" ; \
		$(CXX) -E $(CXXFLAGS) $$f | sed -n '/^# *[0-9]/p' | \
		sed 's/.*"\(.*\)".*/\1/;/\.C$$/d;s/\(.*\)/	\1 \\/' | sort | uniq; \
		echo "" ; echo ""; done > Makefile.depend

clean:
	rm -f afx.a *.o

