]> granicus.if.org Git - postgresql/blob - src/makefiles/Makefile.cygwin
Remove cvs keywords from all files.
[postgresql] / src / makefiles / Makefile.cygwin
1 # src/makefiles/Makefile.cygwin
2 DLLTOOL= dlltool
3 DLLWRAP= dllwrap
4 ifdef PGXS
5 BE_DLLLIBS= -L$(libdir) -lpostgres
6 else
7 BE_DLLLIBS= -L$(top_builddir)/src/backend -lpostgres
8 endif
9
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))
13
14 AROPT = crs
15 DLSUFFIX = .dll
16 CFLAGS_SL =
17
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
23 endif
24 endif
25 endif
26 endif
27
28 ifneq (,$(findstring timezone,$(subdir)))
29 override CPPFLAGS+= -DBUILDING_DLL
30 endif
31
32 ifneq (,$(findstring ecpg/ecpglib,$(subdir)))
33 override CPPFLAGS+= -DBUILDING_DLL
34 endif
35
36 # required by Python headers
37 ifneq (,$(findstring src/pl/plpython,$(subdir)))
38 override CPPFLAGS+= -DUSE_DL_IMPORT
39 endif
40
41 # Rule for building a shared library from a single .o file
42 %.dll: %.o
43         $(DLLTOOL) --export-all --output-def $*.def $<
44         $(DLLWRAP) -o $@ --def $*.def $< $(LDFLAGS) $(LDFLAGS_SL) $(BE_DLLLIBS)
45         rm -f $*.def