~vcs-imports/mammoth-replicator/trunk

« back to all changes in this revision

Viewing changes to src/interfaces/ecpg/ecpglib/Makefile

  • Committer: alvherre
  • Date: 2005-12-16 21:24:52 UTC
  • Revision ID: svn-v4:db760fc0-0f08-0410-9d63-cc6633f64896:trunk:1
Initial import of the REL8_0_3 sources from the Pgsql CVS repository.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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.29.4.2 2005-03-13 22:04:45 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= 5
 
17
SO_MINOR_VERSION= 0
 
18
DLTYPE= library
 
19
 
 
20
override CPPFLAGS := -DFRONTEND -I$(top_srcdir)/src/interfaces/ecpg/include \
 
21
        -I$(libpq_srcdir) -I$(top_builddir)/src/port $(CPPFLAGS)
 
22
override CFLAGS += $(PTHREAD_CFLAGS)
 
23
 
 
24
# Need to recomple any libpgport object files
 
25
LIBS := $(patsubst -lpgport,, $(LIBS))
 
26
 
 
27
OBJS= execute.o typename.o descriptor.o data.o error.o prepare.o memory.o \
 
28
        connect.o misc.o path.o exec.o
 
29
 
 
30
SHLIB_LINK = -L../pgtypeslib -lpgtypes $(libpq) \
 
31
        $(filter -lintl -lssl -lcrypto -lkrb5 -lcrypt -lm, $(LIBS)) $(PTHREAD_LIBS)
 
32
 
 
33
ifeq ($(PORTNAME), win32)
 
34
# Link to shfolder.dll instead of shell32.dll
 
35
SHLIB_LINK += -lshfolder
 
36
endif
 
37
 
 
38
all: all-lib
 
39
 
 
40
# Shared library stuff
 
41
include $(top_srcdir)/src/Makefile.shlib
 
42
 
 
43
# We use some port modules verbatim, but since we need to
 
44
# compile with appropriate options to build a shared lib, we can't
 
45
# necessarily use the same object files as the backend uses. Instead,
 
46
# symlink the source files in here and build our own object file.
 
47
 
 
48
path.c: % : $(top_srcdir)/src/port/%
 
49
        rm -f $@ && $(LN_S) $< .
 
50
 
 
51
exec.c: % : $(top_srcdir)/src/port/%
 
52
        rm -f $@ && $(LN_S) $< .
 
53
 
 
54
path.o: path.c $(top_builddir)/src/port/pg_config_paths.h
 
55
 
 
56
$(top_builddir)/src/port/pg_config_paths.h:
 
57
        $(MAKE) -C $(top_builddir)/src/port pg_config_paths.h
 
58
 
 
59
install: all installdirs install-lib
 
60
 
 
61
installdirs:
 
62
        $(mkinstalldirs) $(DESTDIR)$(libdir)
 
63
 
 
64
uninstall: uninstall-lib
 
65
 
 
66
clean distclean maintainer-clean: clean-lib
 
67
        rm -f $(OBJS) path.c exec.c
 
68
 
 
69
depend dep:
 
70
        $(CC) -MM $(CFLAGS) *.c >depend
 
71
 
 
72
ifeq (depend,$(wildcard depend))
 
73
include depend
 
74
endif