]> granicus.if.org Git - postgresql/blob - src/interfaces/ecpg/pgtypeslib/Makefile
Update copyright for 2009.
[postgresql] / src / interfaces / ecpg / pgtypeslib / Makefile
1 #-------------------------------------------------------------------------
2 #
3 # Makefile for ecpg pgtypes library
4 #
5 # Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
6 # Portions Copyright (c) 1994, Regents of the University of California
7 #
8 # $PostgreSQL: pgsql/src/interfaces/ecpg/pgtypeslib/Makefile,v 1.43 2009/01/01 17:24:02 momjian Exp $
9 #
10 #-------------------------------------------------------------------------
11
12 subdir = src/interfaces/ecpg/pgtypeslib
13 top_builddir = ../../../..
14 include $(top_builddir)/src/Makefile.global
15
16 NAME= pgtypes
17 SO_MAJOR_VERSION= 3
18 SO_MINOR_VERSION= 1
19
20 override CPPFLAGS := -I../include -I$(top_srcdir)/src/interfaces/ecpg/include \
21         -I$(top_srcdir)/src/include/utils -I$(libpq_srcdir) $(CPPFLAGS)
22 override CFLAGS += $(PTHREAD_CFLAGS)
23
24 # Need to recompile any libpgport object files
25 LIBS := $(filter-out -lpgport, $(LIBS))
26
27 SHLIB_LINK += -lm
28
29 SHLIB_EXPORTS = exports.txt
30
31 OBJS= numeric.o datetime.o common.o dt_common.o timestamp.o interval.o \
32         pgstrcasecmp.o \
33         $(filter rint.o snprintf.o, $(LIBOBJS))
34
35 all: all-lib
36
37 # Shared library stuff
38 include $(top_srcdir)/src/Makefile.shlib
39
40 # We use some port modules verbatim, but since we need to
41 # compile with appropriate options to build a shared lib, we can't
42 # necessarily use the same object files as the backend uses. Instead,
43 # symlink the source files in here and build our own object file.
44
45 pgstrcasecmp.c rint.c snprintf.c: % : $(top_srcdir)/src/port/%
46         rm -f $@ && $(LN_S) $< .
47
48 install: all installdirs install-lib
49
50 installdirs: installdirs-lib
51
52 uninstall: uninstall-lib
53
54 clean distclean: clean-lib
55         rm -f $(OBJS) pgstrcasecmp.c rint.c snprintf.c
56
57 maintainer-clean: distclean maintainer-clean-lib