Ignore not-yet-defined Portals in pg_cursors view.
[pgsql.git] / src / makefiles / Makefile.cygwin
blob7759397263821738f8557c6cc60bb42adbfb2443
1 # src/makefiles/Makefile.cygwin
3 ifdef PGXS
4 BE_DLLLIBS= -L$(libdir) -lpostgres
5 else
6 BE_DLLLIBS= -L$(top_builddir)/src/backend -lpostgres
7 endif
9 # linking with -lm or -lc causes program to crash
10 # (see http://sources.redhat.com/cygwin/faq/faq.html#SEC110)
11 LIBS:=$(filter-out -lm -lc, $(LIBS))
13 override CPPFLAGS += -DWIN32_STACK_RLIMIT=$(WIN32_STACK_RLIMIT)
15 ifneq (,$(findstring backend,$(subdir)))
16 ifeq (,$(findstring conversion_procs,$(subdir)))
17 ifeq (,$(findstring libpqwalreceiver,$(subdir)))
18 ifeq (,$(findstring replication/pgoutput,$(subdir)))
19 ifeq (,$(findstring snowball,$(subdir)))
20 override CPPFLAGS+= -DBUILDING_DLL
21 endif
22 endif
23 endif
24 endif
25 endif
27 ifneq (,$(findstring src/common,$(subdir)))
28 override CPPFLAGS+= -DBUILDING_DLL
29 endif
31 ifneq (,$(findstring src/port,$(subdir)))
32 override CPPFLAGS+= -DBUILDING_DLL
33 endif
35 ifneq (,$(findstring timezone,$(subdir)))
36 override CPPFLAGS+= -DBUILDING_DLL
37 endif
39 ifneq (,$(findstring ecpg/ecpglib,$(subdir)))
40 override CPPFLAGS+= -DBUILDING_DLL
41 endif
43 # required by Python headers
44 ifneq (,$(findstring src/pl/plpython,$(subdir)))
45 override CPPFLAGS+= -DUSE_DL_IMPORT
46 endif
48 # Rule for building a shared library from a single .o file
49 %.dll: %.o
50         $(CC) $(CFLAGS)  -shared -o $@ $<  $(LDFLAGS) $(LDFLAGS_SL) $(BE_DLLLIBS)