Fix xslt_process() to ensure that it inserts a NULL terminator after the
[PostgreSQL.git] / src / interfaces / ecpg / ecpglib / Makefile
blob7472379a485d98f6048034ba99ae18e5734226ef
1 #-------------------------------------------------------------------------
3 # Makefile for ecpg library
5 # Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
6 # Portions Copyright (c) 1994, Regents of the University of California
8 # $PostgreSQL$
10 #-------------------------------------------------------------------------
12 subdir = src/interfaces/ecpg/ecpglib
13 top_builddir = ../../../..
14 include $(top_builddir)/src/Makefile.global
16 NAME= ecpg
17 SO_MAJOR_VERSION= 6
18 SO_MINOR_VERSION= 1
20 override CPPFLAGS := -I../include -I$(top_srcdir)/src/interfaces/ecpg/include \
21 -I$(libpq_srcdir) -I$(top_builddir)/src/port $(CPPFLAGS)
22 override CFLAGS += $(PTHREAD_CFLAGS)
24 # Need to recompile any libpgport object files
25 LIBS := $(filter-out -lpgport, $(LIBS))
27 OBJS= execute.o typename.o descriptor.o data.o error.o prepare.o memory.o \
28 connect.o misc.o path.o pgstrcasecmp.o \
29 $(filter snprintf.o strlcpy.o, $(LIBOBJS))
31 # thread.c is needed only for non-WIN32 implementation of path.c
32 ifneq ($(PORTNAME), win32)
33 OBJS += thread.o
34 endif
36 SHLIB_LINK = -L../pgtypeslib -lpgtypes $(libpq) $(filter -lintl -lm, $(LIBS)) $(PTHREAD_LIBS)
38 SHLIB_EXPORTS = exports.txt
40 ifeq ($(PORTNAME), win32)
41 # Link to shfolder.dll instead of shell32.dll
42 SHLIB_LINK += -lshfolder
43 endif
45 all: libpq pgtypeslib all-lib
47 libpq:
48 $(MAKE) -C $(top_builddir)/src/interfaces/libpq all
50 pgtypeslib:
51 $(MAKE) -C $(top_builddir)/src/interfaces/ecpg/pgtypeslib all
53 # Shared library stuff
54 include $(top_srcdir)/src/Makefile.shlib
56 # We use some port modules verbatim, but since we need to
57 # compile with appropriate options to build a shared lib, we can't
58 # necessarily use the same object files as the backend uses. Instead,
59 # symlink the source files in here and build our own object file.
61 path.c pgstrcasecmp.c snprintf.c strlcpy.c thread.c: % : $(top_srcdir)/src/port/%
62 rm -f $@ && $(LN_S) $< .
64 misc.o: misc.c $(top_builddir)/src/port/pg_config_paths.h
65 path.o: path.c $(top_builddir)/src/port/pg_config_paths.h
67 $(top_builddir)/src/port/pg_config_paths.h:
68 $(MAKE) -C $(top_builddir)/src/port pg_config_paths.h
70 install: all installdirs install-lib
72 installdirs: installdirs-lib
74 uninstall: uninstall-lib
76 clean distclean: clean-lib
77 rm -f $(OBJS)
78 rm -f path.c pgstrcasecmp.c snprintf.c strlcpy.c thread.c
80 maintainer-clean: distclean maintainer-clean-lib