# Generated automatically from Makefile.in by configure.
#
# Makefile.in for PGPlib
#
# $Header: /usr/local/cvs-rep/PASTA/src/PGPlib/src/Makefile.in,v 1.14 1998/02/12 10:55:09 ronnya Exp $
#

# Make Rules:
# ===========
#
.c.o:
	$(CC) $(CFLAGS) $(CPPFLAGS) -c $<


# Compiler flags:
# ===============
#
CFLAGS		= -g -O2
CPPFLAGS	= -I. -I/home/perm/src/PGPlib/SSLeay/include -I/usr/include  -DHAVE_CONFIG_H

WITH_FSETPOS=@COMPILE_FSETPOS@


INSTALLDIR	= /usr/local

# Programs:
# =========
#
AR	      =	/usr/bin/ar
CC	      =	gcc
RANLIB	      =	ranlib


# Labels:
# =======
#
SOURCES = armor.c compress.c conf.c conventional.c error.c keybase.c \
	  keymgmnt.c keyring.c literal_data.c misc.c packet.c pke.c \
	  pubencrypt.c pubdecrypt.c secencrypt.c trust.c userid.c \
	  flio.c
# fsetpos is missing on SunOS 4
ifeq ($(WITH_FSETPOS), yes)
	SOURCES += fsetpos.c
endif

OBJECTS	= ${SOURCES:.c=.o}


#
# Targets
#
all:	libpgp.a

clean:
	makedepend
	rm -f $(OBJECTS) libpgp.a

distclean: clean
	rm -f pgplib.h
	rm -f Makefile

palmos:	PGPLib.prc

#
# Actions
#

libpgp.a: pgplib.h $(OBJECTS)
	rm -f libpgp.a
	$(AR) cr libpgp.a $(OBJECTS)
	$(RANLIB) libpgp.a

PGPLib.prc: libpgp.a
# Here comes the GLib magic. Should be cleaned up mightily!
	m68k-palmos-coff-exportlist libpgp.a > pgp.exp
	m68k-palmos-coff-stubgen "PGP Library" PGPL pgpstub.c PGPLib.S < pgp.exp
	$(CC) -shared -o PGPLib PGPLib.S libpgp.a $(LIBS)
	m68k-palmos-coff-obj-res -l PGPLib
	build-prc -l PGPLib.prc "PGP Library" PGPL GLib0000.PGPLib.grc \
	          data0000.PGPLib.grc rloc0000.PGPLib.grc
	m68k-palmos-coff-gcc -c pgpstub.c
	$(AR) rcs libpgp.sa pgpstub.o

install: libpgp.a
	cp libpgp.a $(INSTALLDIR)/lib
	cp pgplib.h $(INSTALLDIR)/include

depend:
	makedepend -- $(CFLAGS) $(CPPFLAGS) -- $(SOURCES)
# DO NOT DELETE
