1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-22 12:22:45 +03:00

From: Michael Meskes <meskes@topsystem.de>

Cleanups for ecpg, as well as a missing patch so that its configured in
This commit is contained in:
Marc G. Fournier
1998-02-11 15:30:00 +00:00
parent 72aa1dabb9
commit df10360d8e
7 changed files with 151 additions and 97 deletions

View File

@@ -3,18 +3,57 @@ include $(SRCDIR)/Makefile.global
PQ_INCLUDE=-I$(SRCDIR)/include -I$(SRCDIR)/interfaces/libpq
all: lib
SO_MAJOR_VERSION=0
SO_MINOR_VERSION=5
lib: libecpg.a
PORTNAME=@PORTNAME@
# Shared library stuff
shlib :=
install-shlib-dep :=
ifeq ($(PORTNAME), linux)
ifdef LINUX_ELF
install-shlib-dep := install-shlib
shlib := libecpg.so.$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
LDFLAGS_SL = -shared
CFLAGS += $(CFLAGS_SL)
endif
endif
ifeq ($(PORTNAME), bsd)
install-shlib-dep := install-shlib
shlib := libecpg.so.$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
LDFLAGS_SL = -x -Bshareable -Bforcearchive
CFLAGS += $(CFLAGS_SL)
endif
ifeq ($(PORTNAME), i386_solaris)
install-shlib-dep := install-shlib
shlib := libecpg.so.$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
LDFLAGS_SL = -G -z text
CFLAGS += $(CFLAGS_SL)
endif
ifeq ($(PORTNAME), univel)
install-shlib-dep := install-shlib
shlib := libecpg.so.1
LDFLAGS_SL = -G -z text
CFLAGS += $(CFLAGS_SL)
endif
all: libecpg.a $(shlib)
$(shlib): ecpglib.o typename.o
$(LD) $(LDFLAGS_SL) -o $@ ecpglib.o typename.o
ln -sf $@ libecpg.so
clean:
rm -f *.o *.a core a.out *~
rm -f *.o *.a core a.out *~ $(shlib) libecpg.so
install: libecpg.a
install -m 644 libecpg.a $(LIBDIR)
install -m 644 libecpg.a $(DESTDIR)$(LIBDIR)
install -m 644 $(shlib) $(DESTDIR)$(LIBDIR)
ln -sf $(shlib) $(DESTDIR)$(LIBDIR)/libecpg.so
uninstall::
rm -f $(LIBDIR)/libecpg.a
rm -f $(DESTDIR)$(LIBDIR)/libecpg.a $(DESTDIR)$(LIBDIR)/$(shlib)
# Rules that do something
libecpg.a : libecpg.a(ecpglib.o) libecpg.a(typename.o)