head	0.4;
access;
symbols
	REL_0_3:0.3.0.1
	ANDREW_JOLLY:0.3.0;
locks; strict;
comment	@# @;


0.4
date	94.09.26.20.07.26;	author jolly;	state Exp;
branches;
next	0.3;

0.3
date	94.09.04.00.53.35;	author andrew;	state Exp;
branches
	0.3.0.1;
next	;

0.3.0.1
date	94.09.04.00.53.36;	author andrew;	state Exp;
branches;
next	;


desc
@@


0.4
log
@.
@
text
@#
# $Header: /usr/local/devel/pglite/cvs_repository/src/libpq/Makefile,v 0.3.0.1 1994/09/04 00:53:36 andrew Exp $
#

.include <postgres.global.mk>

LIB= pq

.PATH:	${.CURDIR}/../backend/libpq \
	${.CURDIR}/../backend/utils/error \
	${.CURDIR}/../backend/utils/hash \
	${.CURDIR}/../backend/lib

CFLAGS+= -DFRONTEND \
	-I${.CURDIR}/../backend/${MAKEOBJDIR} \
	-I${.CURDIR}/../backend/include \
	-I${.CURDIR}/../backend

.ifdef KRBVERS
CFLAGS+= ${KRBFLAGS}
.endif

SRCS=	fe-dumpdata.c fe-pqexec.c fe-pqstubs.c fe-pqufs.c \
	auth.c portal.c portalbuf.c pqcomm.c pqpacket.c pqsignal.c \
	dynahash.c format.c hashfn.c simplelists.c

NOPROFILE=1

.if defined(OLD_MKDIR)
beforeinstall:
	@@-if test ! -d ${DESTDIR}${LIBDIR}; \
		then mkdir ${DESTDIR}${LIBDIR}; fi
.endif

#
# We install the necessary header files from the backend directory
# into ${HEADERDIR}.  If this is installed into /usr/include/postgres
# (not the default), then frontend programs could just reference
# the header files as
#
#	#include <postgres/...>
#
# otherwise, the compile line will have to include a directive
# such as in the following example:
#
#	cc -I/usr/local/postgres/include foo.c
#
# -----
#
# We take advantage of the fact that frontend applications
# all will include "tmp/c.h" by prepending macro definitions
# to define PORTNAME and PORTNAME_name to tmp/c.h.  Otherwise
# the applications would have to define these by hand to get
# the right behavior.
#
# By the way, this is of course a total crock.  The headers
# should be laid out such that the visible public headers
# are all in a separate directory, and just that directory
# would need to be copied out or symlinked to.
#

HEADERFILES= port/${PORTNAME}/machine.h catalog/pg_user.h catalog/pg_lobj.h \
	storage/execipc.h storage/ipc.h storage/ipci.h \
	tcop/fastpath.h libpq/libpq-be.h include/libpq-fe.h \
	libpq/libpq-fs.h libpq/libpq.h include/postgres.h libpq/pqcomm.h \
	lib/simplelists.h utils/dynamic_loader.h utils/exc.h \
	utils/geo-decls.h libpq/auth.h libpq/pqsignal.h

.if (${PORTNAME} == "hpux")
HEADERFILES+= port/${PORTNAME}/fixade.h
.endif

install-headers::
.if defined(OLD_MKDIR)
	@@-if [ ! -d ${HEADERDIR} ]; then mkdir ${HEADERDIR}; fi
	@@-if [ ! -d ${HEADERDIR}/port ]; then mkdir ${HEADERDIR}/port; fi
	@@-if [ ! -d ${HEADERDIR}/port/${PORTNAME} ]; \
		then mkdir ${HEADERDIR}/port/${PORTNAME}; fi
	@@-if [ ! -d ${HEADERDIR}/catalog ]; \
		then mkdir ${HEADERDIR}/catalog; fi
	@@-if [ ! -d ${HEADERDIR}/storage ]; \
		then mkdir ${HEADERDIR}/storage; fi
	@@-if [ ! -d ${HEADERDIR}/utils ]; \
		then mkdir ${HEADERDIR}/utils; fi
	@@-if [ ! -d ${HEADERDIR}/include ]; \
		then mkdir ${HEADERDIR}/include; fi
	@@-if [ ! -d ${HEADERDIR}/libpq ]; \
		then mkdir ${HEADERDIR}/libpq; fi
	@@-if [ ! -d ${HEADERDIR}/tcop ]; \
		then mkdir ${HEADERDIR}/tcop; fi
.endif
	-for i in ${HEADERFILES}; do \
		${INSTALL} -c -m 444 \
			${.CURDIR}/../backend/$$i ${HEADERDIR}/$$i; \
	done
	-mv ${HEADERDIR}/include/* ${HEADERDIR}
	-rmdir ${HEADERDIR}/include
	-ln -f ${HEADERDIR}/tmp/libpq.h ${HEADERDIR}
#	XXX - installing fmgr.h depends on the backend being built
	${INSTALL} -c -m 444 \
		${.CURDIR}/../backend/${MAKEOBJDIR}/fmgr.h ${HEADERDIR}/fmgr.h
	${INSTALL} -c -m 444 \
		${.CURDIR}/../backend/${MAKEOBJDIR}/tags.h ${HEADERDIR}/tags.h
	-rm -f ${HEADERDIR}/tmp/c.h
	-echo "#define PORTNAME ${PORTNAME}" > ${HEADERDIR}/c.h
	-echo "#define PORTNAME_${PORTNAME}" >> ${HEADERDIR}/c.h
	-cat ${.CURDIR}/../backend/include/c.h >> ${HEADERDIR}/c.h
	-chmod 444 ${HEADERDIR}/c.h

.include <postgres.lib.mk>

install: install-headers
@


0.3
log
@Initial revision
@
text
@d2 1
a2 1
# $Header: /usr/local/devel/postgres/src/RCS/Makefile,v 1.19 1994/06/16 03:23:06 aoki Exp $
d67 1
a67 2
	utils/exception.h utils/log.h utils/geo-decls.h \
	libpq/auth.h libpq/pqsignal.h
@


0.3.0.1
log
@POSTGRES LITE   (c) 1994 Andrew Yu and Jolly Chen
@
text
@@
