Makefile 1.6 KB
Newer Older
1 2
#-------------------------------------------------------------------------
#
3
# Makefile for ecpg pgtypes library
4
#
5
# Portions Copyright (c) 1996-2012, PostgreSQL Global Development Group
6
# Portions Copyright (c) 1994, Regents of the University of California
7
#
8
# src/interfaces/ecpg/pgtypeslib/Makefile
9 10 11 12 13 14 15 16
#
#-------------------------------------------------------------------------

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

NAME= pgtypes
17
SO_MAJOR_VERSION= 3
18
SO_MINOR_VERSION= 3
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 30
SHLIB_EXPORTS = exports.txt

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 38 39

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

40 41 42 43
# 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.
44

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

48 49
install: all installdirs install-lib

50
installdirs: installdirs-lib
51 52 53

uninstall: uninstall-lib

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

57
maintainer-clean: distclean maintainer-clean-lib