1 # src/makefiles/Makefile.cygwin
5 BE_DLLLIBS= -L$(libdir) -lpostgres
7 BE_DLLLIBS= -L$(top_builddir)/src/backend -lpostgres
10 # linking with -lm or -lc causes program to crash
11 # (see http://sources.redhat.com/cygwin/faq/faq.html#SEC110)
12 LIBS:=$(filter-out -lm -lc, $(LIBS))
18 ifneq (,$(findstring backend,$(subdir)))
19 ifeq (,$(findstring conversion_procs,$(subdir)))
20 ifeq (,$(findstring snowball,$(subdir)))
21 ifeq (,$(findstring libpqwalreceiver,$(subdir)))
22 override CPPFLAGS+= -DBUILDING_DLL
28 ifneq (,$(findstring timezone,$(subdir)))
29 override CPPFLAGS+= -DBUILDING_DLL
32 ifneq (,$(findstring ecpg/ecpglib,$(subdir)))
33 override CPPFLAGS+= -DBUILDING_DLL
36 # required by Python headers
37 ifneq (,$(findstring src/pl/plpython,$(subdir)))
38 override CPPFLAGS+= -DUSE_DL_IMPORT
41 # Rule for building a shared library from a single .o file
43 $(DLLTOOL) --export-all --output-def $*.def $<
44 $(DLLWRAP) -o $@ --def $*.def $< $(LDFLAGS) $(LDFLAGS_SL) $(BE_DLLLIBS)