1 #-------------------------------------------------------------------------
4 # Makefile for libpq library
6 # Copyright (c) 1994, Regents of the University of California
9 # $Header: /cvsroot/pgsql/src/interfaces/libpq/Attic/Makefile.in,v 1.60 2000/06/17 00:10:09 petere Exp $
11 #-------------------------------------------------------------------------
18 include $(SRCDIR)/Makefile.global
22 OBJS= fe-auth.o fe-connect.o fe-exec.o fe-misc.o fe-print.o fe-lobj.o \
23 pqexpbuffer.o dllist.o pqsignal.o @SNPRINTF@ @INET_ATON@
26 OBJS+= common.o wchar.o conv.o big5.o
29 # If crypt is a separate library, rather than part of libc,
30 # make sure it gets included in shared libpq.
31 SHLIB_LINK+= $(findstring -lcrypt,$(LIBS))
33 # Include kerberos libraries into libpq
34 SHLIB_LINK += $(KRB_LIBS)
37 # Shared library stuff, also default 'all' target
38 include $(SRCDIR)/Makefile.shlib
41 # We use several backend modules verbatim, but since we need to compile
42 # with appropriate options to build a shared lib, we can't necessarily
43 # use the same object files as the backend uses. Instead, symlink the
44 # source files in here and build our own object file.
46 dllist.c: $(SRCDIR)/backend/lib/dllist.c
47 -$(LN_S) $(SRCDIR)/backend/lib/dllist.c .
49 # this only gets done if configure finds system doesn't have snprintf()
50 snprintf.c: $(SRCDIR)/backend/port/snprintf.c
51 -$(LN_S) $(SRCDIR)/backend/port/snprintf.c .
53 # this only gets done if configure finds system doesn't have inet_aton()
54 inet_aton.c: $(SRCDIR)/backend/port/inet_aton.c
55 -$(LN_S) $(SRCDIR)/backend/port/inet_aton.c .
58 common.c: $(SRCDIR)/backend/utils/mb/common.c
59 -$(LN_S) $(SRCDIR)/backend/utils/mb/common.c .
61 wchar.c: $(SRCDIR)/backend/utils/mb/wchar.c
62 -$(LN_S) $(SRCDIR)/backend/utils/mb/wchar.c .
64 conv.c: $(SRCDIR)/backend/utils/mb/conv.c
65 -$(LN_S) $(SRCDIR)/backend/utils/mb/conv.c .
67 big5.c: $(SRCDIR)/backend/utils/mb/big5.c
68 -$(LN_S) $(SRCDIR)/backend/utils/mb/big5.c .
72 .PHONY: install install-headers
74 install: install-headers install-lib $(install-shlib-dep)
76 install-headers: libpq-fe.h libpq-int.h
77 -@if [ ! -d $(HEADERDIR) ]; then mkdir $(HEADERDIR); fi
78 $(INSTALL) $(INSTLOPTS) libpq-fe.h $(HEADERDIR)/libpq-fe.h
79 $(INSTALL) $(INSTLOPTS) libpq-int.h $(HEADERDIR)/libpq-int.h
80 $(INSTALL) $(INSTLOPTS) pqexpbuffer.h $(HEADERDIR)/pqexpbuffer.h
86 rm -f lib$(NAME).a $(OBJS)
87 rm -f dllist.c snprintf.c inet_aton.c common.c wchar.c conv.c big5.c
90 $(CC) -MM $(CFLAGS) *.c >depend
92 ifeq (depend,$(wildcard depend))