postgresql/src/interfaces/ecpg/pgtypeslib/Makefile

55 lines
1.6 KiB
Makefile
Raw Normal View History

#-------------------------------------------------------------------------
#
# Makefile for ecpg pgtypes library
#
# Copyright (c) 1994, Regents of the University of California
#
# $PostgreSQL: pgsql/src/interfaces/ecpg/pgtypeslib/Makefile,v 1.33 2007/09/27 19:53:44 tgl Exp $
#
#-------------------------------------------------------------------------
subdir = src/interfaces/ecpg/pgtypeslib
top_builddir = ../../../..
include $(top_builddir)/src/Makefile.global
NAME= pgtypes
SO_MAJOR_VERSION= 2
SO_MINOR_VERSION= 3
DLTYPE= library
override CPPFLAGS := -I../include -I$(top_srcdir)/src/interfaces/ecpg/include \
-I$(top_srcdir)/src/include/utils -I$(libpq_srcdir) $(CPPFLAGS)
override CFLAGS += $(PTHREAD_CFLAGS)
# Need to recompile any libpgport object files
LIBS := $(filter-out -lpgport, $(LIBS))
SHLIB_LINK += -lm
2003-05-09 18:26:29 +02:00
OBJS= numeric.o datetime.o common.o dt_common.o timestamp.o interval.o \
pgstrcasecmp.o \
$(filter rint.o snprintf.o, $(LIBOBJS))
all: all-lib
# Shared library stuff
include $(top_srcdir)/src/Makefile.shlib
# We use some port modules verbatim, but since we need to
# compile with appropriate options to build a shared lib, we can't
# necessarily use the same object files as the backend uses. Instead,
# symlink the source files in here and build our own object file.
pgstrcasecmp.c rint.c snprintf.c: % : $(top_srcdir)/src/port/%
rm -f $@ && $(LN_S) $< .
install: all installdirs install-lib
installdirs:
$(mkinstalldirs) '$(DESTDIR)$(libdir)'
uninstall: uninstall-lib
clean distclean maintainer-clean: clean-lib
rm -f $(OBJS) pgstrcasecmp.c rint.c snprintf.c