Include soft links in the installation directory for major version number.
Use the existing $(DLSUFFIX) parameter to name shared library.
-SRCDIR= ../../..
+NAME= ecpg
+SO_MAJOR_VERSION= 2
+SO_MINOR_VERSION= 6
+SO_PATCHLEVEL= 2
+
+SRCDIR= @top_srcdir@
+
include $(SRCDIR)/Makefile.global
PQ_INCLUDE=-I$(SRCDIR)/interfaces/libpq
-SO_MAJOR_VERSION=2
-SO_MINOR_VERSION=6
-SO_PATCHLEVEL=2
-
PORTNAME=@PORTNAME@
ifdef KRBVERS
LINUX_ELF=@LINUX_ELF@
ifdef LINUX_ELF
install-shlib-dep := install-shlib
- shlib := libecpg.so.$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION).$(SO_PATCHLEVEL)
- LDFLAGS_SL = -shared -soname libecpg.so.$(SO_MAJOR_VERSION)
+ shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION).$(SO_PATCHLEVEL)
+ LDFLAGS_SL = -shared -soname lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)
endif
endif
ifeq ($(PORTNAME), bsd)
ifdef BSD_SHLIB
install-shlib-dep := install-shlib
- shlib := libecpg.so.$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION).$(SO_PATCHLEVEL)
+ shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION).$(SO_PATCHLEVEL)
LDFLAGS_SL = -x -Bshareable -Bforcearchive
CFLAGS += $(CFLAGS_SL)
endif
ifeq ($(PORTNAME), solaris_sparc)
install-shlib-dep := install-shlib
- shlib := libecpg.so.$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION).$(SO_PATCHLEVEL)
+ shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION).$(SO_PATCHLEVEL)
LDFLAGS_SL = -G
CFLAGS += $(CFLAGS_SL)
endif
ifeq ($(PORTNAME), solaris_i386)
install-shlib-dep := install-shlib
- shlib := libecpg.so.$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION).$(SO_PATCHLEVEL)
+ shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION).$(SO_PATCHLEVEL)
LDFLAGS_SL = -G
CFLAGS += $(CFLAGS_SL)
endif
ifeq ($(PORTNAME), svr4)
install-shlib-dep := install-shlib
- shlib := libecpg.so.$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION).$(SO_PATCHLEVEL)
+ shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION).$(SO_PATCHLEVEL)
LDFLAGS_SL = -G
CFLAGS += $(CFLAGS_SL)
endif
ifeq ($(PORTNAME), univel)
install-shlib-dep := install-shlib
- shlib := libecpg.so.1
+ shlib := lib$(NAME)$(DLSUFFIX).1
LDFLAGS_SL = -G -z text
CFLAGS += $(CFLAGS_SL)
endif
ifeq ($(PORTNAME), unixware)
install-shlib-dep := install-shlib
- shlib := libecpg.so.1
+ shlib := lib$(NAME)$(DLSUFFIX).1
LDFLAGS_SL = -G -z text
CFLAGS += $(CFLAGS_SL)
endif
-all: libecpg.a $(shlib)
+all: lib$(NAME).a $(shlib)
$(shlib): ecpglib.sho typename.sho
$(LD) $(LDFLAGS_SL) -o $@ ecpglib.sho typename.sho
- $(LN_S) -f $@ libecpg.so
clean:
- rm -f *.o *.sho *.a core a.out *~ $(shlib) libecpg.so
+ rm -f *.o *.sho *.a core a.out *~ $(shlib) lib$(NAME)$(DLSUFFIX)
dep depend:
-install: libecpg.a $(shlib) $(install-shlib-dep)
- $(INSTALL) $(INSTLOPTS) libecpg.a $(LIBDIR)
+install: lib$(NAME).a $(shlib) $(install-shlib-dep)
+ $(INSTALL) $(INSTLOPTS) lib$(NAME).a $(LIBDIR)
install-shlib:
$(INSTALL) $(INSTLOPTS) $(shlib) $(LIBDIR)
- $(LN_S) -f $(shlib) $(LIBDIR)/libecpg.so
+ cd $(LIBDIR) && $(LN_S) -f $(shlib) lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)
+ cd $(LIBDIR) && $(LN_S) -f $(shlib) lib$(NAME)$(DLSUFFIX)
+
uninstall::
- rm -f $(LIBDIR)/libecpg.a $(LIBDIR)/$(shlib)
+ rm -f $(LIBDIR)/lib$(NAME).a $(LIBDIR)/$(shlib)
+ rm -f $(LIBDIR)/lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)
+ rm -f $(LIBDIR)/lib$(NAME)$(DLSUFFIX)
# Rules that do something
-libecpg.a : libecpg.a(ecpglib.o) libecpg.a(typename.o)
+lib$(NAME).a : lib$(NAME).a(ecpglib.o) lib$(NAME).a(typename.o)
ecpglib.o : ecpglib.c ../include/ecpglib.h ../include/ecpgtype.h
$(CC) $(CFLAGS) -I../include $(PQ_INCLUDE) -c $< -o $@
#
#
# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/Makefile.in,v 1.30 1998/10/12 02:40:59 momjian Exp $
+# $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/Makefile.in,v 1.31 1998/10/14 16:12:54 thomas Exp $
#
#-------------------------------------------------------------------------
-SO_MAJOR_VERSION=2
-SO_MINOR_VERSION=0
+NAME= pgtcl
+SO_MAJOR_VERSION= 2
+SO_MINOR_VERSION= 0
-SRCDIR= ../..
+SRCDIR= @top_srcdir@
include $(SRCDIR)/Makefile.global
INCLUDE_OPT= \
install-shlib-dep :=
shlib :=
-LIBPQ = -L$(SRCDIR)/interfaces/libpq -lpq
+LIBPQ= -L$(SRCDIR)/interfaces/libpq -lpq
ifeq ($(PORTNAME), linux)
install-shlib-dep := install-shlib
- shlib := libpgtcl.so.$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
- CFLAGS += $(CFLAGS_SL)
+ shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
+ CFLAGS += $(CFLAGS_SL)
LDFLAGS_SL = -shared
endif
ifeq ($(PORTNAME), bsd)
ifdef BSD_SHLIB
install-shlib-dep := install-shlib
- shlib := libpgtcl.so.$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
- LDFLAGS_SL = -x -Bshareable -Bforcearchive
- CFLAGS += $(CFLAGS_SL)
+ shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
+ LDFLAGS_SL = -x -Bshareable -Bforcearchive
+ CFLAGS += $(CFLAGS_SL)
endif
endif
ifdef BSD_SHLIB
ifeq ($(DLSUFFIX), .so)
install-shlib-dep := install-shlib
- shlib := libpgtcl.so.$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
- LDFLAGS_SL += -shared
- CFLAGS += $(CFLAGS_SL)
+ shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
+ LDFLAGS_SL += -shared
+ CFLAGS += $(CFLAGS_SL)
endif
ifeq ($(DLSUFFIX), .o)
install-shlib-dep := install-shlib
- shlib := libpgtcl.o.$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
- LD := shlicc
- LDFLAGS_SL += -O -r
- CFLAGS += $(CFLAGS_SL)
+ shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
+ LD := shlicc
+ LDFLAGS_SL += -O -r
+ CFLAGS += $(CFLAGS_SL)
endif
endif
endif
ifeq ($(PORTNAME), solaris_sparc)
install-shlib-dep := install-shlib
- shlib := libpgtcl.so.$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
+ shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
LDFLAGS_SL := -G
- CFLAGS += $(CFLAGS_SL)
+ CFLAGS += $(CFLAGS_SL)
endif
ifeq ($(PORTNAME), solaris_i386)
install-shlib-dep := install-shlib
- shlib := libpgtcl.so.$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
+ shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
LDFLAGS_SL := -G
- CFLAGS += $(CFLAGS_SL)
+ CFLAGS += $(CFLAGS_SL)
endif
ifeq ($(PORTNAME), svr4)
install-shlib-dep := install-shlib
- shlib := libpgtcl.so.$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
+ shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
LDFLAGS_SL := -G
- CFLAGS += $(CFLAGS_SL)
+ CFLAGS += $(CFLAGS_SL)
endif
ifeq ($(PORTNAME), unixware)
install-shlib-dep := install-shlib
- shlib := libpgtcl.so.$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
+ shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
LDFLAGS_SL := -G -z text
- CFLAGS += $(CFLAGS_SL)
+ CFLAGS += $(CFLAGS_SL)
endif
ifeq ($(PORTNAME), univel)
install-shlib-dep := install-shlib
- shlib := libpgtcl.so.$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
+ shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
LDFLAGS_SL := -G -z text
- CFLAGS += $(CFLAGS_SL)
+ CFLAGS += $(CFLAGS_SL)
endif
ifeq ($(PORTNAME), hpux)
install-shlib-dep := install-shlib
- shlib := libpgtcl.sl
+ shlib := lib$(NAME)$(DLSUFFIX)
LDFLAGS_SL := -b
- CFLAGS += $(CFLAGS_SL)
+ CFLAGS += $(CFLAGS_SL)
endif
OBJS= pgtcl.o pgtclCmds.o pgtclId.o
-all: libpgtcl.a $(shlib)
+all: lib$(NAME).a $(shlib)
-libpgtcl.a: $(OBJS)
+lib$(NAME).a: $(OBJS)
ifdef MK_NO_LORDER
- $(AR) $(AROPT) libpgtcl.a $(OBJS)
+ $(AR) $(AROPT) lib$(NAME).a $(OBJS)
else
- $(AR) $(AROPT) libpgtcl.a `lorder $(OBJS) | tsort`
+ $(AR) $(AROPT) lib$(NAME).a `lorder $(OBJS) | tsort`
endif
- $(RANLIB) libpgtcl.a
+ $(RANLIB) lib$(NAME).a
$(shlib): $(OBJS)
$(LD) $(LDFLAGS_SL) -o $@ $(OBJS) $(LIBPQ)
- $(LN_S) -f $@ libpgtcl.so
.PHONY: beforeinstall-headers install-headers
.PHONY: install install-libpgtcl
beforeinstall-headers:
@if [ ! -d $(HEADERDIR) ]; then mkdir $(HEADERDIR); fi
-install-libpgtcl: libpgtcl.a
- $(INSTALL) $(INSTL_LIB_OPTS) libpgtcl.a $(LIBDIR)/libpgtcl.a
+install-libpgtcl: lib$(NAME).a
+ $(INSTALL) $(INSTL_LIB_OPTS) lib$(NAME).a $(LIBDIR)/lib$(NAME).a
install-shlib: $(shlib)
$(INSTALL) $(INSTL_SHLIB_OPTS) $(shlib) \
$(LIBDIR)/$(shlib)
- rm -f $(LIBDIR)/libpgtcl.so
- $(LN_S) -f $(shlib) $(LIBDIR)/libpgtcl.so
+ rm -f $(LIBDIR)/lib$(NAME)$(DLSUFFIX)
+ cd $(LIBDIR) && $(LN_S) -f $(shlib) lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)
+ cd $(LIBDIR) && $(LN_S) -f $(shlib) lib$(NAME)$(DLSUFFIX)
.PHONY: clean
clean:
- rm -f $(OBJS) $(shlib) libpgtcl.a libpgtcl.so
+ rm -f $(OBJS) $(shlib) lib$(NAME).a lib$(NAME)$(DLSUFFIX)
dep depend:
#
#
# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/interfaces/libpq/Attic/Makefile.in,v 1.37 1998/10/12 01:23:25 momjian Exp $
+# $Header: /cvsroot/pgsql/src/interfaces/libpq/Attic/Makefile.in,v 1.38 1998/10/14 16:13:03 thomas Exp $
#
#-------------------------------------------------------------------------
-SO_MAJOR_VERSION=2
-SO_MINOR_VERSION=0
+NAME= pq
+SO_MAJOR_VERSION= 2
+SO_MINOR_VERSION= 0
-SRCDIR= ../..
+SRCDIR= @top_srcdir@
include $(SRCDIR)/Makefile.global
-PORTNAME=@PORTNAME@
+PORTNAME= @PORTNAME@
-CFLAGS+=-DFRONTEND
+CFLAGS+= -DFRONTEND
ifdef KRBVERS
CFLAGS+= $(KRBFLAGS)
ifeq ($(PORTNAME), linux)
install-shlib-dep := install-shlib
- shlib := libpq.so.$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
- LDFLAGS_SL := -shared -soname libpq.so.$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
- CFLAGS += $(CFLAGS_SL)
+ shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
+ LDFLAGS_SL := -shared -soname lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
+ CFLAGS += $(CFLAGS_SL)
endif
ifeq ($(PORTNAME), bsd)
ifdef BSD_SHLIB
install-shlib-dep := install-shlib
- shlib := libpq.so.$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
- LDFLAGS_SL := -x -Bshareable -Bforcearchive
- CFLAGS += $(CFLAGS_SL)
+ shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
+ LDFLAGS_SL := -x -Bshareable -Bforcearchive
+ CFLAGS += $(CFLAGS_SL)
endif
endif
ifdef BSD_SHLIB
ifeq ($(DLSUFFIX), .so)
install-shlib-dep := install-shlib
- shlib := libpq.so.$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
- LDFLAGS_SL += -shared
- CFLAGS += $(CFLAGS_SL)
+ shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
+ LDFLAGS_SL += -shared
+ CFLAGS += $(CFLAGS_SL)
endif
ifeq ($(DLSUFFIX), .o)
install-shlib-dep := install-shlib
- shlib := libpq.o.$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
- LD := shlicc
- LDFLAGS_SL += -O -r
- CFLAGS += $(CFLAGS_SL)
+ shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
+ LD := shlicc
+ LDFLAGS_SL += -O -r
+ CFLAGS += $(CFLAGS_SL)
endif
endif
endif
ifeq ($(PORTNAME), solaris_sparc)
install-shlib-dep := install-shlib
- shlib := libpq.so.$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
+ shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
LDFLAGS_SL := -G
- CFLAGS += $(CFLAGS_SL)
+ CFLAGS += $(CFLAGS_SL)
endif
ifeq ($(PORTNAME), solaris_i386)
install-shlib-dep := install-shlib
- shlib := libpq.so.$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
+ shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
LDFLAGS_SL := -G
- CFLAGS += $(CFLAGS_SL)
+ CFLAGS += $(CFLAGS_SL)
endif
ifeq ($(PORTNAME), svr4)
install-shlib-dep := install-shlib
- shlib := libpq.so.$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
+ shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
LDFLAGS_SL := -G
- CFLAGS += $(CFLAGS_SL)
+ CFLAGS += $(CFLAGS_SL)
endif
ifeq ($(PORTNAME), unixware)
install-shlib-dep := install-shlib
- shlib := libpq.so.$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
+ shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
LDFLAGS_SL := -G -z text
- CFLAGS += $(CFLAGS_SL)
+ CFLAGS += $(CFLAGS_SL)
endif
ifeq ($(PORTNAME), univel)
install-shlib-dep := install-shlib
- shlib := libpq.so.$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
+ shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
LDFLAGS_SL := -G -z text
- CFLAGS += $(CFLAGS_SL)
+ CFLAGS += $(CFLAGS_SL)
endif
ifeq ($(PORTNAME), hpux)
install-shlib-dep := install-shlib
- shlib := libpq.sl
+ shlib := lib$(NAME).sl
LDFLAGS_SL := -b
- CFLAGS += $(CFLAGS_SL)
+ CFLAGS += $(CFLAGS_SL)
endif
all: libpq.a $(shlib)
$(shlib): $(OBJS)
$(LD) $(LDFLAGS_SL) -o $@ $(OBJS)
- $(LN_S) -f $@ libpq.so
.PHONY: beforeinstall-headers install-headers
install-shlib: $(shlib)
$(INSTALL) $(INSTL_SHLIB_OPTS) $(shlib) $(LIBDIR)/$(shlib)
- rm -f $(LIBDIR)/libpq.so
- $(LN_S) $(shlib) $(LIBDIR)/libpq.so
+ rm -f $(LIBDIR)/lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)
+ rm -f $(LIBDIR)/lib$(NAME)$(DLSUFFIX)
+ cd $(LIBDIR) && $(LN_S) -f $(shlib) lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)
+ cd $(LIBDIR) && $(LN_S) -f $(shlib) lib$(NAME)$(DLSUFFIX)
+
depend dep:
$(CC) -MM $(CFLAGS) *.c >depend
.PHONY: clean
clean:
- rm -f libpq.a $(shlib) libpq.so $(OBJS)
+ rm -f libpq.a $(shlib) $(OBJS)
rm -f dllist.c common.c wchar.c conv.c
ifeq (depend,$(wildcard depend))