]> granicus.if.org Git - postgresql/blob - src/interfaces/ecpg/ecpglib/Makefile
Add -lpgport to ecpglib link only on win32. Other platforms have
[postgresql] / src / interfaces / ecpg / ecpglib / Makefile
1 #-------------------------------------------------------------------------
2 #
3 # Makefile for ecpg library
4 #
5 # Copyright (c) 1994, Regents of the University of California
6 #
7 # $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/Makefile,v 1.20 2004/05/21 03:10:47 momjian Exp $
8 #
9 #-------------------------------------------------------------------------
10
11 subdir = src/interfaces/ecpg/ecpglib
12 top_builddir = ../../../..
13 include $(top_builddir)/src/Makefile.global
14
15 NAME= ecpg
16 SO_MAJOR_VERSION= 4
17 SO_MINOR_VERSION= 2
18
19 override CPPFLAGS := -I$(top_srcdir)/src/interfaces/ecpg/include \
20         -I$(libpq_srcdir) $(CPPFLAGS)
21 override CFLAGS += $(PTHREAD_CFLAGS)
22
23 OBJS= execute.o typename.o descriptor.o data.o error.o prepare.o memory.o \
24         connect.o misc.o
25
26 ifeq ($(PORTNAME), win32)
27 PGPORT=-lpgport
28 endif
29
30 SHLIB_LINK = -L../pgtypeslib -lpgtypes $(PGPORT) $(libpq) \
31         $(filter -lintl -lssl -lcrypto -lkrb5 -lcrypt -lm, $(LIBS)) $(PTHREAD_LIBS)
32
33 all: all-lib
34
35 # Shared library stuff
36 include $(top_srcdir)/src/Makefile.shlib
37
38 install: all installdirs install-lib
39
40 installdirs:
41         $(mkinstalldirs) $(DESTDIR)$(libdir)
42
43 uninstall: uninstall-lib
44
45 clean distclean maintainer-clean: clean-lib
46         rm -f $(OBJS)
47
48 depend dep:
49         $(CC) -MM $(CFLAGS) *.c >depend
50
51 ifeq (depend,$(wildcard depend))
52 include depend
53 endif