1 # src/makefiles/Makefile.cygwin
4 BE_DLLLIBS= -L$(libdir) -lpostgres
6 BE_DLLLIBS= -L$(top_builddir)/src/backend -lpostgres
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
27 ifneq (,$(findstring src/common,$(subdir)))
28 override CPPFLAGS+= -DBUILDING_DLL
31 ifneq (,$(findstring src/port,$(subdir)))
32 override CPPFLAGS+= -DBUILDING_DLL
35 ifneq (,$(findstring timezone,$(subdir)))
36 override CPPFLAGS+= -DBUILDING_DLL
39 ifneq (,$(findstring ecpg/ecpglib,$(subdir)))
40 override CPPFLAGS+= -DBUILDING_DLL
43 # required by Python headers
44 ifneq (,$(findstring src/pl/plpython,$(subdir)))
45 override CPPFLAGS+= -DUSE_DL_IMPORT
48 # Rule for building a shared library from a single .o file
50 $(CC) $(CFLAGS) -shared -o $@ $< $(LDFLAGS) $(LDFLAGS_SL) $(BE_DLLLIBS)