Makefile 1.6 KB
Newer Older
1 2
#-------------------------------------------------------------------------
#
3
# Makefile for ecpg pgtypes library
4 5 6
#
# Copyright (c) 1994, Regents of the University of California
#
7
# $PostgreSQL: pgsql/src/interfaces/ecpg/pgtypeslib/Makefile,v 1.33 2007/09/27 19:53:44 tgl Exp $
8 9 10 11 12 13 14 15
#
#-------------------------------------------------------------------------

subdir = src/interfaces/ecpg/pgtypeslib
top_builddir = ../../../..
include $(top_builddir)/src/Makefile.global

NAME= pgtypes
16
SO_MAJOR_VERSION= 2
17
SO_MINOR_VERSION= 3
18
DLTYPE= library
19

20
override CPPFLAGS := -I../include -I$(top_srcdir)/src/interfaces/ecpg/include \
21 22
	-I$(top_srcdir)/src/include/utils -I$(libpq_srcdir) $(CPPFLAGS)
override CFLAGS += $(PTHREAD_CFLAGS)
23

24 25
# Need to recompile any libpgport object files
LIBS := $(filter-out -lpgport, $(LIBS))
26

27
SHLIB_LINK += -lm
28

29
OBJS= numeric.o datetime.o common.o dt_common.o timestamp.o interval.o \
30
	pgstrcasecmp.o \
31
	$(filter rint.o snprintf.o, $(LIBOBJS))
32 33 34 35 36 37

all: all-lib

# Shared library stuff
include $(top_srcdir)/src/Makefile.shlib

38 39 40 41
# 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.
42

43
pgstrcasecmp.c rint.c snprintf.c: % : $(top_srcdir)/src/port/%
M
Michael Meskes 已提交
44 45
	rm -f $@ && $(LN_S) $< .

46 47 48
install: all installdirs install-lib

installdirs:
49
	$(mkinstalldirs) '$(DESTDIR)$(libdir)'
50 51 52 53

uninstall: uninstall-lib

clean distclean maintainer-clean: clean-lib
54
	rm -f $(OBJS) pgstrcasecmp.c rint.c snprintf.c