# Generated automatically from Makefile.in by configure.
#
# config/pre.in
#
# Copyright (C) 1996,1997 Pretty Good Privacy, Inc.  All rights reserved.
#
# Written by:	Derek Atkins <warlord@MIT.EDU> and Colin Plumb
#
# $Id: pre.in,v 1.34.2.9.2.2 1997/08/23 00:42:54 quark Exp $
#

SHELL=/bin/sh
.SUFFIXES:
.SUFFIXES: .c .h .o

prefix=/usr/local
exec_prefix=${prefix}

includedir=$(prefix)/include
mandir=$(prefix)/man
bindir=$(exec_prefix)/bin
libdir=$(exec_prefix)/lib

srcdir=.
top_srcdir=.
top_builddir=.
buildinc=$(top_builddir)/include
buildlib=$(top_builddir)/lib
dir_suffix=
DESTDIR=
THIS_DIR=pgp50-linux

LN_S=ln -s
INSTALL=/usr/bin/install -c
RANLIB=ranlib
TEST_L=test -L
CC=gcc
RM=rm -f
MV=mv -f
OPT= -O
OSDEF=-DUNIX=1
CCOPTS=
DEFINES=-DPGPTRUSTMODEL=0 -DDEBUG=0 -DUNFINISHED_CODE_ALLOWED=0
LOCALDEFINES=
DO_DISTRIBUTION_COMMON_SRC=1
DO_DISTRIBUTION_COMMON_BIN=1

CFLAGS=	$(OPT) $(OSDEF)  -Wall -W -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -DHAVE_CONFIG_H $(DEFINES) $(LOCALDEFINES) \
	$(RSAOPTS) $(RELOPTS) \
	-I$(top_builddir) -I$(buildinc) -I../include -I$(srcdir) \
	$(LOCALINCLUDES) $(CCOPTS) 
LDFLAGS= -L$(buildlib)

LIBPRE=	lib
LIBEXT=	a

#
# due to how post.in works, some systems, like AIX, require PROG
# to be set to something real.  This is here in case it isn't set
# in the Makefile.in, so make wont complain!
PROG=aix-and-pains
LIBTARGET=aix-and-pains2

DEPEND=gcc -E -M 
SRCS=${OBJS:.o=.c}

TTYUI=	$(LIBPRE)pgptty.$(LIBEXT)
LIBTTYUI= -lpgptty
DEPTTYUI= $(buildlib)/$(TTYUI)

PGPLIB=	$(LIBPRE)pgp.$(LIBEXT)
LIBPGP= -lpgp
DEPLIBPGP= $(buildlib)/$(PGPLIB)

BNLIB=	$(LIBPRE)bn.$(LIBEXT)
LIBBN=	-lbn
DEPLIBBN= $(buildlib)/$(BNLIB)

SIMPLE=	$(LIBPRE)simple.$(LIBEXT)
LIBSIMPLE=	-lsimple
DEPLIBSIMPLE=	$(buildlib)/$(SIMPLE)

LIBS=	$(LIBTTYUI) $(LIBPGP) $(LIBBN) $(LIBSIMPLE) -lm  
DEPLIBS= $(DEPTTYUI) $(DEPLIBPGP) $(DEPLIBBN) $(DEPLIBSIMPLE)

all::

# Recursively perform operations on all SUBDIRS
all check clean depend headers install very-clean distribution-common-src \
distribution-freeware-src-internal::
	@if test 'x$(SUBDIRS)' != x; then \
		for i in $(SUBDIRS)''; do \
			echo Making $@ in $(SUB)$$i ; \
			(cd $$i; $(MAKE) $(MFLAGS) SUB=$(SUB)$$i/ $@) \
					|| exit 1; \
		done \
	else :; \
	fi

#
# Top level Makefile.in
#
# Copyright (C) 1996,1997 Pretty Good Privacy, Inc. All rights reserved.
#
# $Id: Makefile.in,v 1.11.2.5.2.10 1997/08/28 05:33:35 quark Exp $
#

POSTSUBDIRS=lib apps man plugins
DO_DISTRIBUTION_COMMON_SRC=0

.incs:
	touch .incs
	-mkdir include
	$(MAKE) $(MFLAGS) headers

incs: .incs

all:: incs
headers:: incs
	./mklang.pl

world::
	$(MAKE) $(MFLAGS) headers
	$(MAKE) $(MFLAGS) depend
	$(MAKE) $(MFLAGS) all

clean::
	$(RM) .incs

very-clean::
	$(RM) config.h
	$(RM) config.log
	$(RM) config.cache
	$(RM) config.status

distribution-freeware-fcs-src::
	$(MAKE) $(MFLAGS) "RELOPTS=-DLICENSE=1"\
	distribution-freeware-src-internal
	(cd ..; tar -cf $(THIS_DIR)/$(THIS_DIR)-freeware-src.tar\
	 -T $(THIS_DIR)/MANIFEST)
	mkdir $(THIS_DIR)-rsaref-src
	mv $(THIS_DIR)-freeware-src.tar $(THIS_DIR)-rsaref-src
	cp rsaref/rsaref.tar $(THIS_DIR)-rsaref-src
	cat rsaref/README | sed "s;SOURCE-DIR;$(THIS_DIR);" >\
	$(THIS_DIR)-rsaref-src/README
	tar -czf $(THIS_DIR)-rsaref-src.tgz $(THIS_DIR)-rsaref-src
	rm -rf $(THIS_DIR)-rsaref-src
	rm README
	rm LICENSE

distribution-full-beta-bin::
	$(MAKE) clean
	$(MAKE) $(MFLAGS) "RSAOPTS=-DUSE_RSAREF_FULL=0 -DUSE_RSA_LEGACY=0 \
	-DNO_RSA=0 -DNO_RSA_KEYGEN=0 -DUSE_MPI_LIB=1"\
	"RELOPTS=-DLICENSE=2"
	$(MAKE) $(MFLAGS) distribution-common-bin
	(cd ..; tar -czf $(THIS_DIR)/$(THIS_DIR)-beta-bin.tgz\
	 -T $(THIS_DIR)/MANIFEST)
	rm README
	rm LICENSE

dist:
	$(MAKE) clean
	$(MAKE) $(MFLAGS) "RSAOPTS=-DUSE_RSAREF_FULL=0 -DUSE_RSA_LEGACY=0 \
	-DNO_RSA=0 -DNO_RSA_KEYGEN=0 -DUSE_MPI_LIB=1"\
	"RELOPTS=-DLICENSE=3"
	$(MAKE) $(MFLAGS) distribution-common-bin
	(cd ..; tar -czf $(THIS_DIR)/$(THIS_DIR).tgz\
	 -T $(THIS_DIR)/MANIFEST)
	rm README
	rm LICENSE

distribution-freeware-src-internal::
	$(MAKE) $(MFLAGS) distribution-common-src

distribution-common-src::
	$(RM) MANIFEST
	@cp README-SRC README
	@echo $(THIS_DIR)/README >> MANIFEST
#	@echo $(THIS_DIR)/TODO >> MANIFEST
	@echo $(THIS_DIR)/aclocal.m4 >> MANIFEST
	@echo $(THIS_DIR)/config.h.in >> MANIFEST
	@echo $(THIS_DIR)/configure >> MANIFEST
	@echo $(THIS_DIR)/configure.in >> MANIFEST
	@echo $(THIS_DIR)/makefile.msc >> MANIFEST
	@echo $(THIS_DIR)/MANIFEST >> MANIFEST
	@echo $(THIS_DIR)/config/post.in >> MANIFEST
	@echo $(THIS_DIR)/config/pre.in >> MANIFEST
	@echo $(THIS_DIR)/Makefile.in >> MANIFEST
	@echo $(THIS_DIR)/config/install-sh >> MANIFEST
	@echo $(THIS_DIR)/mklang.pl >> MANIFEST
	@echo $(THIS_DIR)/language50.txt >> MANIFEST
	@echo $(THIS_DIR)/50devteam.asc >> MANIFEST
	cp LICENSE-SRC LICENSE
	@echo $(THIS_DIR)/LICENSE >> MANIFEST

distribution-common-bin::
	$(RM) MANIFEST
	@cp README-BIN README
	@echo $(THIS_DIR)/README >> MANIFEST
	@echo $(THIS_DIR)/language50.txt >> MANIFEST
	@echo $(THIS_DIR)/reseller.txt >> MANIFEST
	@echo $(THIS_DIR)/export.txt >> MANIFEST
	@echo $(THIS_DIR)/man/pgp.1 >> MANIFEST
	@echo $(THIS_DIR)/man/pgpe.1 >> MANIFEST
	@echo $(THIS_DIR)/man/pgps.1 >> MANIFEST
	@echo $(THIS_DIR)/man/pgpk.1 >> MANIFEST
	@echo $(THIS_DIR)/man/pgpv.1 >> MANIFEST
	@echo $(THIS_DIR)/man/pgp-integration.7 >> MANIFEST
	@echo $(THIS_DIR)/man/pgp-intro.7 >> MANIFEST
	@echo $(THIS_DIR)/man/pgp.cfg.5 >> MANIFEST
	@echo $(THIS_DIR)/apps/pgpk/pgpk >> MANIFEST
	@echo $(THIS_DIR)/apps/pgp/pgp >> MANIFEST
	@echo $(THIS_DIR)/pgpinst >> MANIFEST
#	@echo $(THIS_DIR)/50devteam.asc >> MANIFEST
	@echo $(THIS_DIR)/plugins/README >> MANIFEST
	@echo $(THIS_DIR)/plugins/README-PINE >> MANIFEST
	@echo $(THIS_DIR)/plugins/README-elm2.4.ME+.35+pgp50.patch >> MANIFEST
	@echo $(THIS_DIR)/plugins/README-mutt-0.81+pgp50.patch >> MANIFEST
	@echo $(THIS_DIR)/plugins/elm2.4.ME+.35+pgp50.patch >> MANIFEST
	@echo $(THIS_DIR)/plugins/mutt-0.81+pgp50.patch >> MANIFEST
	cp LICENSE-BIN LICENSE
	@echo $(THIS_DIR)/LICENSE >> MANIFEST
#	@echo $(THIS_DIR)/lib/libbn.a >> MANIFEST
#	@echo $(THIS_DIR)/lib/libpgp.a >> MANIFEST
#	@echo $(THIS_DIR)/lib/libpgptty.a >> MANIFEST
#	@echo $(THIS_DIR)/lib/libsimple.a >> MANIFEST
#
# config/post.in
#
# Copyright (C) 1996,1997 Pretty Good Privacy, Inc.  All rights reserved.
#
# Written by:	Derek Atkins <warlord@MIT.EDU> and Colin Plumb
#
# $Id: post.in,v 1.35.2.4.2.2 1997/07/16 11:57:36 colin Exp $
#

# Recursively perform operations on all POSTSUBDIRS
all check clean depend headers install very-clean distribution-common-src\
distribution-freeware-src-internal::
	@if test 'x$(POSTSUBDIRS)' != x; then \
		for i in $(POSTSUBDIRS)''; do \
			echo Making $@ in $(SUB)$$i ; \
			(cd $$i; $(MAKE) $(MFLAGS) SUB=$(SUB)$$i/ $@) \
					|| exit 1; \
		done \
	else :; \
	fi

# Install all SHAREDHDRS into the public header directory, PRIVHDRS into
# the private interface directory
headers::
	@if test 'x$(SHAREDHDRS)' != x; then \
		echo Linking $(SHAREDHDRS) to public include ; \
		for i in $(SHAREDHDRS)''; do \
			if $(TEST_L) $(buildinc)/$$i; then \
				$(RM) $(buildinc)/$$i ; \
			else :; \
			fi ; \
			if test ! -f $(buildinc)/$$i; then \
				$(LN_S) \
..$(dir_suffix)/$(top_srcdir)$(dir_suffix)/$$i \
	$(buildinc) ; \
			else :; \
			fi; \
		done \
	else :; \
	fi
	@if test 'x$(PRIVHDRS)' != x; then \
		echo Linking $(PRIVHDRS) to private include ; \
		if test ! -d ../include; then mkdir ../include; fi; \
		for i in $(PRIVHDRS)''; do \
			if $(TEST_L) ../include/$$i && test \
				`(cd ../include; pwd)` != \
				`(cd $(top_srcdir)$(dir_suffix); pwd)`; then \
				$(RM) ../include/$$i ; \
			else :; \
			fi ; \
			if test ! -f ../include/$$i; then \
				$(LN_S) $(top_srcdir)$(dir_suffix)/$$i \
					../include ; \
			else :; \
			fi; \
		done \
	else :; \
	fi

# Install PUBHDRS, INSTALLLIBS, and INSTALLPROGS into the appropriate
# locations
install::
	if test 'x$(PUBHDRS)' != x; then \
		if test ! -d $(DESTDIR)$(includedir); then \
			mkdir -p $(DESTDIR)$(includedir); \
		fi; \
		for i in $(PUBHDRS)''; do \
			$(INSTALL) -m 644 $(srcdir)/$$i \
					  $(DESTDIR)$(includedir); \
		done \
	else :; \
	fi
	if test 'x$(INSTALLLIBS)' != x; then \
		if test ! -d $(DESTDIR)$(libdir); then \
			mkdir -p $(DESTDIR)$(libdir); \
		fi; \
		for i in $(INSTALLLIBS)''; do \
			$(INSTALL) -m 644 $$i $(DESTDIR)$(libdir); \
		done \
	else :; \
	fi
	if test 'x$(INSTALLPROGS)' != x; then \
		if test ! -d $(DESTDIR)$(bindir); then \
			mkdir -p $(DESTDIR)$(bindir); \
		fi; \
		for i in $(INSTALLPROGS)''; do \
			$(INSTALL) -m 755 $$i $(DESTDIR)$(bindir); \
		done \
	else :; \
	fi

# Remove appropriate things
clean do-clean::
	$(RM) *.o *~ *.bak core DONE LIBDONE

# Remove clean and PROG  as well
very-clean:: do-clean
	$(RM) $(PROG)

# Add the files we want to ship into the manifest
distribution-common-src::
	@if test '$(DO_DISTRIBUTION_COMMON_SRC)' = 1; then \
	ls *.[ch] Makefile.in *.asm *.s | \
		sed "s;\(.*\);$(THIS_DIR)/$(SUB)\1;" >> \
		$(top_srcdir)/MANIFEST ; \
	else :; \
	fi
	@DO_DISTRIBUTION_COMMON_SRC=1

depend::
	@if test 'x$(SRCS)' != x; then \
		sed -e '/^#### DO NOT DELETE this line$$/,$$d' Makefile > \
				Makefile.new ; \
		echo "#### DO NOT DELETE this line" >> Makefile.new ; \
		$(DEPEND) $(CFLAGS) $(SRCS) >> Makefile.new ; \
		$(MV) Makefile.new Makefile ; \
	else :; \
	fi

# Compile library objects, OBJS.  Requires OBJS and "all:: DONE"
DONE:: $(OBJS)
	@if test x'$(OBJS)' = x && test -r $@; then :; \
	else \
		(set -x; echo $(OBJS) > $@) \
	fi

# Compile subdirectories files, $(LIBDONE) into LIBDONE.  Requires
# LIBDONE and "all:: LIBDONE"
LIBDONE: $(LIBDONE)
	$(RM) $@
	for i in $(LIBDONE); do \
		j=`echo $$i | sed -e 's;/[^/]*$$;;'` ; \
		sed -e "s;^\([^ ]\);$$j/\1;" -e "s; \([^ ]\); $$j/\1;g" \
		< $$i >> $@; \
	done

# Compile program, PROG
$(PROG): $(OBJS) $(DEPLIBS) $(LOCALDEPLIBS)
	$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) $(LOCALLIBS)

# Build a library, LIBTARGET, based on LIBTDEPS.  Requires LIBTDEPS be
# either DONE or LIBDONE
$(LIBTARGET):	$(LIBTDEPS)
	$(RM) $@
	$(AR) cru $@ `cat $(LIBTDEPS)`
	$(RANLIB) $@
	$(RM) ../$@
	$(LN_S) ..$(dir_suffix)/$@ ../

# GNU make feature: If there's an error building a target, remove it
.DELETE_ON_ERROR:
