mirror of
https://github.com/postgres/postgres.git
synced 2025-05-02 11:44:50 +03:00
NetBSD Shared Library Patch from Martin J. Laubach
This commit is contained in:
parent
078633e729
commit
3031ec7c72
@ -7,7 +7,7 @@
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
# IDENTIFICATION
|
# IDENTIFICATION
|
||||||
# $Header: /cvsroot/pgsql/src/interfaces/libpq/Makefile,v 1.28 1997/03/14 23:34:03 scrappy Exp $
|
# $Header: /cvsroot/pgsql/src/interfaces/libpq/Makefile,v 1.29 1997/03/15 19:17:03 scrappy Exp $
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
|
||||||
@ -23,21 +23,25 @@ ifdef KRBVERS
|
|||||||
CFLAGS+= $(KRBFLAGS)
|
CFLAGS+= $(KRBFLAGS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# dllist.c is found in backend/lib
|
|
||||||
VPATH:= $(VPATH):../backend/lib
|
|
||||||
|
|
||||||
OBJS= fe-auth.o fe-connect.o fe-exec.o fe-misc.o fe-lobj.o \
|
OBJS= fe-auth.o fe-connect.o fe-exec.o fe-misc.o fe-lobj.o \
|
||||||
../backend/lib/dllist.o pqsignal.o
|
dllist.o pqsignal.o
|
||||||
|
|
||||||
|
|
||||||
|
# Shared library stuff
|
||||||
shlib :=
|
shlib :=
|
||||||
install-shlib-dep :=
|
install-shlib-dep :=
|
||||||
ifeq ($(PORTNAME), linux)
|
ifeq ($(PORTNAME), linux)
|
||||||
ifdef LINUX_ELF
|
ifdef LINUX_ELF
|
||||||
install-shlib-dep := install-shlib
|
install-shlib-dep := install-shlib
|
||||||
shlib := libpq.so.1
|
shlib := libpq.so.1
|
||||||
|
LDFLAGS_SL = -shared
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(PORTNAME), BSD44_derived)
|
||||||
|
install-shlib-dep := install-shlib
|
||||||
|
shlib := libpq.so.1.0
|
||||||
|
LDFLAGS_SL = -x -Bshareable -Bforcearchive
|
||||||
|
CFLAGS += -fpic -DPIC
|
||||||
|
endif
|
||||||
|
|
||||||
all: libpq.a $(shlib) c.h
|
all: libpq.a $(shlib) c.h
|
||||||
|
|
||||||
@ -51,17 +55,19 @@ endif
|
|||||||
|
|
||||||
fe-lobj.o: ../backend/fmgr.h
|
fe-lobj.o: ../backend/fmgr.h
|
||||||
|
|
||||||
|
# We need to compile this with special options for shared libs,
|
||||||
|
# so we can't use the object in ../backend
|
||||||
|
dllist.c: ../backend/lib/dllist.c
|
||||||
|
-ln ../backend/lib/dllist.c
|
||||||
|
|
||||||
# The following rules cause dependencies in the backend directory to
|
# The following rules cause dependencies in the backend directory to
|
||||||
# get made if they don't exist, but don't cause them to get remade if they
|
# get made if they don't exist, but don't cause them to get remade if they
|
||||||
# are out of date.
|
# are out of date.
|
||||||
../backend/fmgr.h:
|
../backend/fmgr.h:
|
||||||
$(MAKE) -C ../backend fmgr.h
|
$(MAKE) -C ../backend fmgr.h
|
||||||
|
|
||||||
../backend/lib/dllist.o:
|
$(shlib): $(OBJS)
|
||||||
$(MAKE) -C ../backend/lib dllist.o
|
$(LD) $(LDFLAGS) $(LDFLAGS_SL) -o $@ $(OBJS)
|
||||||
|
|
||||||
libpq.so.1: $(OBJS)
|
|
||||||
gcc $(LDFLAGS) -shared -o $@ $(OBJS)
|
|
||||||
|
|
||||||
c.h: ../include/c.h
|
c.h: ../include/c.h
|
||||||
rm -f c.h
|
rm -f c.h
|
||||||
|
Loading…
x
Reference in New Issue
Block a user