~ubuntu-branches/ubuntu/precise/postgresql-9.1/precise-security

« back to all changes in this revision

Viewing changes to src/makefiles/Makefile.win32

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2011-05-11 10:41:53 UTC
  • Revision ID: james.westby@ubuntu.com-20110511104153-psbh2o58553fv1m0
Tags: upstream-9.1~beta1
ImportĀ upstreamĀ versionĀ 9.1~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# src/makefiles/Makefile.win32
 
2
 
 
3
# Use replacement include files for those missing on Win32
 
4
override CPPFLAGS+="-I$(top_srcdir)/src/include/port/win32"
 
5
 
 
6
ifdef PGXS
 
7
BE_DLLLIBS= -L$(libdir) -lpostgres
 
8
else
 
9
BE_DLLLIBS= -L$(top_builddir)/src/backend -lpostgres
 
10
endif
 
11
 
 
12
AROPT = crs
 
13
DLSUFFIX = .dll
 
14
CFLAGS_SL =
 
15
 
 
16
ifneq (,$(findstring backend,$(subdir)))
 
17
ifeq (,$(findstring conversion_procs,$(subdir)))
 
18
ifeq (,$(findstring snowball,$(subdir)))
 
19
ifeq (,$(findstring libpqwalreceiver,$(subdir)))
 
20
override CPPFLAGS+= -DBUILDING_DLL
 
21
endif
 
22
endif
 
23
endif
 
24
endif
 
25
 
 
26
ifneq (,$(findstring timezone,$(subdir)))
 
27
override CPPFLAGS+= -DBUILDING_DLL
 
28
endif
 
29
 
 
30
ifneq (,$(findstring ecpg/ecpglib,$(subdir)))
 
31
override CPPFLAGS+= -DBUILDING_DLL
 
32
endif
 
33
 
 
34
# required by Python headers
 
35
ifneq (,$(findstring src/pl/plpython,$(subdir)))
 
36
override CPPFLAGS+= -DUSE_DL_IMPORT
 
37
endif
 
38
 
 
39
# special win32 headers are provided here
 
40
ifdef PGXS
 
41
override CPPFLAGS+= -I$(includedir_server)/port/win32
 
42
endif
 
43
 
 
44
# it is better to install shared-libraries anyway?
 
45
# may be overriden with make MAKE_DLL=false install
 
46
ifndef MAKE_DLL
 
47
MAKE_DLL        = true
 
48
endif
 
49
 
 
50
 
 
51
# Build rules to add versioninfo resources to win32 binaries
 
52
 
 
53
WIN32RES += win32ver.o
 
54
ifeq ($(PGFILESHLIB),1)
 
55
PGFTYPE = VFT_DLL
 
56
else
 
57
PGFTYPE = VFT_APP
 
58
endif
 
59
ifneq (,$(PGAPPICON))
 
60
PGICOSTR = $(subst /,\/,IDI_ICON ICON \"$(top_builddir)/src/port/$(PGAPPICON).ico\")
 
61
endif
 
62
 
 
63
win32ver.rc: $(top_srcdir)/src/port/win32ver.rc
 
64
        sed -e 's;FILEDESC;$(PGFILEDESC);' -e 's;VFT_APP;$(PGFTYPE);' -e 's;_ICO_;$(PGICOSTR);' -e 's;\(VERSION.*\),0 *$$;\1,'`date '+%y%j' | sed 's/^0*//'`';' $< >$@
 
65
 
 
66
win32ver.o: win32ver.rc
 
67
        $(WINDRES) -i $< -o $@ --include-dir=$(top_builddir)/src/include --include-dir=$(srcdir)
 
68
 
 
69
# Rule for building a shared library from a single .o file
 
70
%.dll: %.o
 
71
        $(DLLTOOL) --export-all --output-def $*.def $<
 
72
        $(DLLWRAP) -o $@ --def $*.def $< $(LDFLAGS) $(LDFLAGS_SL) $(BE_DLLLIBS)
 
73
        rm -f $*.def