Shared library fixes for BSD44_Derived port

Submitted by: "Martin J. Laubach" <mjl@wwx.vip.at>

NOTE: The following patch I was uncertain of, but applied it...will end up
	testing the compile on my machine later tonight anyway, but if anyone
	knows why this *shouldn't* have been done, please change it. (CC -> LD)

***************
*** 61,68 ****
  ../backend/lib/dllist.o:
        $(MAKE) -C ../backend/lib dllist.o

! libpq.so.1: $(OBJS)
!       $(CC) $(LDFLAGS) -shared $(OBJS) -o libpq.so.1

  c.h: ../include/c.h
        rm -f c.h
--- 66,73 ----
  ../backend/lib/dllist.o:
        $(MAKE) -C ../backend/lib dllist.o

! $(shlib): $(OBJS)
!       $(LD) $(LDFLAGS) -shared $(OBJS) -o $(shlib)

  c.h: ../include/c.h
        rm -f c.h
This commit is contained in:
Marc G. Fournier 1997-01-05 23:52:21 +00:00
parent ea7a26c84b
commit 0865f587ea
1 changed files with 8 additions and 3 deletions

View File

@ -7,7 +7,7 @@
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/interfaces/libpq/Makefile,v 1.22 1996/12/10 07:05:09 bryanh Exp $
# $Header: /cvsroot/pgsql/src/interfaces/libpq/Makefile,v 1.23 1997/01/05 23:52:21 scrappy Exp $
#
#-------------------------------------------------------------------------
@ -38,6 +38,11 @@ ifdef LINUX_ELF
ifeq ($(PORTNAME), linux)
shlib := libpq.so.1
endif
ifeq ($(PORTNAME), BSD44_derived)
shlib := libpq.so.1.0
CFLAGS+= -fpic -DPIC
LDFLAGS=-Bshareable -Bforcearchive
endif
endif
all: libpq.a $(shlib) c.h
@ -62,7 +67,7 @@ fe-lobj.o: ../backend/fmgr.h
$(MAKE) -C ../backend/lib dllist.o
libpq.so.1: $(OBJS)
$(CC) $(LDFLAGS) -shared $(OBJS) -o libpq.so.1
$(LD) $(LDFLAGS) -shared $(OBJS) -o $(shlib)
c.h: ../include/c.h
rm -f c.h
@ -136,7 +141,7 @@ install-libpq: libpq.a
$(INSTALL) $(INSTL_LIB_OPTS) libpq.a $(DESTDIR)$(LIBDIR)/libpq.a
install-shlib: libpq.so.1
$(INSTALL) $(INSTL_LIB_OPTS) libpq.so.1 $(DESTDIR)$(LIBDIR)/libpq.so.1
$(INSTALL) $(INSTL_LIB_OPTS) $(shlib) $(DESTDIR)$(LIBDIR)/$(shlib)
depend dep:
$(CC) -MM $(INCLUDE_OPT) *.c >depend