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))
16 override CPPFLAGS += -DWIN32_STACK_RLIMIT=$(WIN32_STACK_RLIMIT)
18 ifneq (,$(findstring backend,$(subdir)))
19 ifeq (,$(findstring conversion_procs,$(subdir)))
20 ifeq (,$(findstring libpqwalreceiver,$(subdir)))
21 ifeq (,$(findstring replication/pgoutput,$(subdir)))
22 ifeq (,$(findstring snowball,$(subdir)))
23 override CPPFLAGS+= -DBUILDING_DLL
30 ifneq (,$(findstring src/common,$(subdir)))
31 override CPPFLAGS+= -DBUILDING_DLL
34 ifneq (,$(findstring src/port,$(subdir)))
35 override CPPFLAGS+= -DBUILDING_DLL
38 ifneq (,$(findstring timezone,$(subdir)))
39 override CPPFLAGS+= -DBUILDING_DLL
42 ifneq (,$(findstring ecpg/ecpglib,$(subdir)))
43 override CPPFLAGS+= -DBUILDING_DLL
46 # required by Python headers
47 ifneq (,$(findstring src/pl/plpython,$(subdir)))
48 override CPPFLAGS+= -DUSE_DL_IMPORT
51 # Rule for building a shared library from a single .o file
53 $(CC) $(CFLAGS) -shared -o $@ $< $(LDFLAGS) $(LDFLAGS_SL) $(BE_DLLLIBS)