Debian Codegraph @

src/interfaces/ecpg/ecpglib/Makefile

raw
1 #-------------------------------------------------------------------------
2 #
3 # Makefile for ecpg library
4 #
5 # Portions Copyright (c) 1996-2025, PostgreSQL Global Development Group
6 # Portions Copyright (c) 1994, Regents of the University of California
7 #
8 # src/interfaces/ecpg/ecpglib/Makefile
9 #
10 #-------------------------------------------------------------------------
11
12 subdir = src/interfaces/ecpg/ecpglib
13 top_builddir = ../../../..
14 include $(top_builddir)/src/Makefile.global
15
16 PGFILEDESC = "ECPG - embedded SQL in C"
17 NAME= ecpg
18 SO_MAJOR_VERSION= 6
19 SO_MINOR_VERSION= $(MAJORVERSION)
20
21 override CPPFLAGS := -I../include -I$(top_srcdir)/src/interfaces/ecpg/include \
22 -I$(libpq_srcdir) -I$(top_builddir)/src/port $(CPPFLAGS)
23 override CFLAGS += $(PTHREAD_CFLAGS)
24
25 OBJS = \
26 $(WIN32RES) \
27 connect.o \
28 data.o \
29 descriptor.o \
30 error.o \
31 execute.o \
32 memory.o \
33 misc.o \
34 prepare.o \
35 sqlda.o \
36 typename.o
37
38 SHLIB_LINK_INTERNAL = -L../pgtypeslib -lpgtypes $(libpq_pgport_shlib)
39 SHLIB_LINK = $(filter -lintl -lm, $(LIBS)) $(PTHREAD_LIBS)
40 SHLIB_PREREQS = submake-libpq submake-pgtypeslib
41
42 SHLIB_EXPORTS = exports.txt
43
44 PKG_CONFIG_REQUIRES_PRIVATE = libpq, libpgtypes
45
46 all: all-lib
47
48 .PHONY: submake-pgtypeslib
49 submake-pgtypeslib:
50 $(MAKE) -C $(top_builddir)/src/interfaces/ecpg/pgtypeslib all
51
52 # Shared library stuff
53 include $(top_srcdir)/src/Makefile.shlib
54
55 # Make dependency on pg_config_paths.h visible.
56 misc.o: misc.c $(top_builddir)/src/port/pg_config_paths.h
57
58 $(top_builddir)/src/port/pg_config_paths.h:
59 $(MAKE) -C $(top_builddir)/src/port pg_config_paths.h
60
61 install: all installdirs install-lib
62
63 installdirs: installdirs-lib
64
65 uninstall: uninstall-lib
66
67 clean distclean: clean-lib
68 rm -f $(OBJS)