2014-02-01 22:08:33 +01:00
|
|
|
# src/makefiles/Makefile.cygwin
|
2014-02-11 18:59:48 +01:00
|
|
|
|
2004-12-17 04:52:49 +01:00
|
|
|
ifdef PGXS
|
2006-01-19 21:45:29 +01:00
|
|
|
BE_DLLLIBS= -L$(libdir) -lpostgres
|
2004-12-17 04:52:49 +01:00
|
|
|
else
|
2003-03-21 18:18:34 +01:00
|
|
|
BE_DLLLIBS= -L$(top_builddir)/src/backend -lpostgres
|
2004-12-17 04:52:49 +01:00
|
|
|
endif
|
2003-03-21 18:18:34 +01:00
|
|
|
|
|
|
|
# linking with -lm or -lc causes program to crash
|
|
|
|
# (see http://sources.redhat.com/cygwin/faq/faq.html#SEC110)
|
|
|
|
LIBS:=$(filter-out -lm -lc, $(LIBS))
|
|
|
|
|
2019-04-09 17:25:39 +02:00
|
|
|
override CPPFLAGS += -DWIN32_STACK_RLIMIT=$(WIN32_STACK_RLIMIT)
|
|
|
|
|
2003-03-21 18:18:34 +01:00
|
|
|
ifneq (,$(findstring backend,$(subdir)))
|
|
|
|
ifeq (,$(findstring conversion_procs,$(subdir)))
|
2010-01-20 10:30:07 +01:00
|
|
|
ifeq (,$(findstring libpqwalreceiver,$(subdir)))
|
2017-01-20 18:51:31 +01:00
|
|
|
ifeq (,$(findstring replication/pgoutput,$(subdir)))
|
|
|
|
ifeq (,$(findstring snowball,$(subdir)))
|
2003-03-21 18:18:34 +01:00
|
|
|
override CPPFLAGS+= -DBUILDING_DLL
|
|
|
|
endif
|
|
|
|
endif
|
2007-08-22 08:34:18 +02:00
|
|
|
endif
|
2010-01-15 22:43:21 +01:00
|
|
|
endif
|
2017-01-20 18:51:31 +01:00
|
|
|
endif
|
2003-03-21 18:18:34 +01:00
|
|
|
|
2013-02-22 15:51:15 +01:00
|
|
|
ifneq (,$(findstring src/common,$(subdir)))
|
|
|
|
override CPPFLAGS+= -DBUILDING_DLL
|
|
|
|
endif
|
|
|
|
|
2014-06-12 01:50:41 +02:00
|
|
|
ifneq (,$(findstring src/port,$(subdir)))
|
|
|
|
override CPPFLAGS+= -DBUILDING_DLL
|
|
|
|
endif
|
|
|
|
|
2004-10-27 21:14:07 +02:00
|
|
|
ifneq (,$(findstring timezone,$(subdir)))
|
|
|
|
override CPPFLAGS+= -DBUILDING_DLL
|
|
|
|
endif
|
|
|
|
|
2003-05-22 19:20:44 +02:00
|
|
|
ifneq (,$(findstring ecpg/ecpglib,$(subdir)))
|
2003-03-21 18:18:34 +01:00
|
|
|
override CPPFLAGS+= -DBUILDING_DLL
|
|
|
|
endif
|
|
|
|
|
|
|
|
# required by Python headers
|
|
|
|
ifneq (,$(findstring src/pl/plpython,$(subdir)))
|
|
|
|
override CPPFLAGS+= -DUSE_DL_IMPORT
|
|
|
|
endif
|
2010-07-05 20:54:38 +02:00
|
|
|
|
|
|
|
# Rule for building a shared library from a single .o file
|
|
|
|
%.dll: %.o
|
2014-02-11 18:59:48 +01:00
|
|
|
$(CC) $(CFLAGS) -shared -o $@ $< $(LDFLAGS) $(LDFLAGS_SL) $(BE_DLLLIBS)
|