4
4
#
5
5
# Copyright (c) 1994, Regents of the University of California
6
6
#
7
- # $PostgreSQL: pgsql/src/interfaces/ecpg/pgtypeslib/Makefile,v 1.26 2005/03/14 17:27:50 momjian Exp $
7
+ # $PostgreSQL: pgsql/src/interfaces/ecpg/pgtypeslib/Makefile,v 1.27 2005/12/06 05:26:21 tgl Exp $
8
8
#
9
9
# -------------------------------------------------------------------------
10
10
@@ -17,28 +17,30 @@ SO_MAJOR_VERSION= 2
17
17
SO_MINOR_VERSION = 1
18
18
DLTYPE = library
19
19
20
- override CPPFLAGS := -I$(top_srcdir ) /src/interfaces/ecpg/include \
21
- -I$(top_srcdir ) /src/include/utils -I$(libpq_srcdir ) $(CPPFLAGS ) \
22
- $(PTHREAD_CFLAGS ) -DFRONTEND
20
+ override CPPFLAGS := -DFRONTEND - I$(top_srcdir ) /src/interfaces/ecpg/include \
21
+ -I$(top_srcdir ) /src/include/utils -I$(libpq_srcdir ) $(CPPFLAGS )
22
+ override CFLAGS += $(PTHREAD_CFLAGS )
23
23
24
- # Need to recomple any libpgport object files
25
- LIBS := $(patsubst -lpgport, , $(LIBS ) )
24
+ # Need to recompile any libpgport object files
25
+ LIBS := $(filter-out -lpgport, $(LIBS ) )
26
26
27
27
SHLIB_LINK += -lm
28
28
29
29
OBJS = numeric.o datetime.o common.o dt_common.o timestamp.o interval.o \
30
30
pgstrcasecmp.o \
31
- $(filter rint.o, $(LIBOBJS ) )
31
+ $(filter rint.o snprintf.o , $(LIBOBJS ) )
32
32
33
33
all : all-lib
34
34
35
35
# Shared library stuff
36
36
include $(top_srcdir ) /src/Makefile.shlib
37
37
38
- rint.c : % .c : $(top_srcdir ) /src/port/% .c
39
- rm -f $@ && $(LN_S ) $< .
38
+ # We use some port modules verbatim, but since we need to
39
+ # compile with appropriate options to build a shared lib, we can't
40
+ # necessarily use the same object files as the backend uses. Instead,
41
+ # symlink the source files in here and build our own object file.
40
42
41
- pgstrcasecmp.c : % .c : $(top_srcdir ) /src/port/% .c
43
+ pgstrcasecmp.c rint .c snprintf.c : % : $(top_srcdir ) /src/port/%
42
44
rm -f $@ && $(LN_S ) $< .
43
45
44
46
install : all installdirs install-lib
@@ -49,7 +51,7 @@ installdirs:
49
51
uninstall : uninstall-lib
50
52
51
53
clean distclean maintainer-clean : clean-lib
52
- rm -f $(OBJS ) rint.c pgstrcasecmp .c
54
+ rm -f $(OBJS ) pgstrcasecmp.c rint.c snprintf .c
53
55
54
56
depend dep :
55
57
$(CC ) -MM $(CFLAGS ) * .c > depend
0 commit comments