]> granicus.if.org Git - postgresql/blob - src/interfaces/ecpg/ecpglib/Makefile
Add exec.c to ecpg library because path.c now uses it.
[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.23 2004/05/25 17:35:51 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) -I$(top_builddir)/src/port $(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 path.o exec.o
25
26 SHLIB_LINK = -L../pgtypeslib -lpgtypes $(libpq) \
27         $(filter -lintl -lssl -lcrypto -lkrb5 -lcrypt -lm, $(LIBS)) $(PTHREAD_LIBS)
28
29 all: all-lib
30
31 # Shared library stuff
32 include $(top_srcdir)/src/Makefile.shlib
33
34 # We use some port modules verbatim, but since we need to
35 # compile with appropriate options to build a shared lib, we can't
36 # necessarily use the same object files as the backend uses. Instead,
37 # symlink the source files in here and build our own object file.
38
39 path.c: % : $(top_srcdir)/src/port/%
40         rm -f $@ && $(LN_S) $< .
41
42 exec.c: % : $(top_srcdir)/src/port/%
43         rm -f $@ && $(LN_S) $< .
44
45 install: all installdirs install-lib
46
47 installdirs:
48         $(mkinstalldirs) $(DESTDIR)$(libdir)
49
50 uninstall: uninstall-lib
51
52 clean distclean maintainer-clean: clean-lib
53         rm -f $(OBJS) path.c exec.c
54
55 depend dep:
56         $(CC) -MM $(CFLAGS) *.c >depend
57
58 ifeq (depend,$(wildcard depend))
59 include depend
60 endif