Skip to content

Commit 41857f3

Browse files
committed
Additional fixes for shared library (BSD44_Derived port).
1 parent f91b26a commit 41857f3

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

src/interfaces/libpq/Makefile

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#
88
#
99
# IDENTIFICATION
10-
# $Header: /cvsroot/pgsql/src/interfaces/libpq/Makefile,v 1.24 1997/01/06 00:24:24 scrappy Exp $
10+
# $Header: /cvsroot/pgsql/src/interfaces/libpq/Makefile,v 1.25 1997/01/10 04:01:09 vadim Exp $
1111
#
1212
#-------------------------------------------------------------------------
1313

@@ -29,8 +29,11 @@ VPATH:= $(VPATH):../backend/lib
2929
OBJS= fe-auth.o fe-connect.o fe-exec.o fe-misc.o fe-lobj.o \
3030
../backend/lib/dllist.o pqsignal.o
3131

32+
3233
shlib :=
34+
install-shlib-dep :=
3335
ifdef LINUX_ELF
36+
install-shlib-dep := install-shlib
3437
ifeq ($(PORTNAME), linux)
3538
shlib := libpq.so.1
3639
endif
@@ -62,7 +65,7 @@ fe-lobj.o: ../backend/fmgr.h
6265
../backend/lib/dllist.o:
6366
$(MAKE) -C ../backend/lib dllist.o
6467

65-
libpq.so.1: $(OBJS)
68+
$(shlib): $(OBJS)
6669
$(LD) $(LDFLAGS) -shared $(OBJS) -o $(shlib)
6770

6871
c.h: ../include/c.h
@@ -127,24 +130,18 @@ beforeinstall-headers:
127130
@if [ ! -d $(HEADERDIR)/access ]; \
128131
then mkdir $(HEADERDIR)/access; fi
129132

130-
ifdef LINUX_ELF
131-
install-shlib-dep := install-shlib
132-
else
133-
install-shlib-dep :=
134-
endif
135-
136133
install-libpq: libpq.a
137134
$(INSTALL) $(INSTL_LIB_OPTS) libpq.a $(DESTDIR)$(LIBDIR)/libpq.a
138135

139-
install-shlib: libpq.so.1
136+
install-shlib: $(shlib)
140137
$(INSTALL) $(INSTL_LIB_OPTS) $(shlib) $(DESTDIR)$(LIBDIR)/$(shlib)
141138

142139
depend dep:
143140
$(CC) -MM $(INCLUDE_OPT) *.c >depend
144141

145142
.PHONY: clean
146143
clean:
147-
rm -f libpq.a libpq.so.1 $(OBJS) c.h
144+
rm -f libpq.a $(shlib) $(OBJS) c.h
148145

149146
ifeq (depend,$(wildcard depend))
150147
include depend

0 commit comments

Comments
 (0)