aboutsummaryrefslogtreecommitdiff
path: root/src/makefiles/Makefile.win
blob: e91e5a5746454eb86e09989f7af9537daf33e593 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# $Header: /cvsroot/pgsql/src/makefiles/Attic/Makefile.win,v 1.15 2001/09/06 02:58:33 momjian Exp $
LDFLAGS+= -g
DLLTOOL= dlltool
DLLWRAP= dllwrap
DLLLIBS= -lcygipc -lcrypt
BE_DLLLIBS= -L$(top_builddir)/src/backend -lpostgres
MK_NO_LORDER=true
MAKE_DLL=true
#MAKE_DLL=false
# 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))

AROPT = crs
DLSUFFIX = .dll
CFLAGS_SL =

%.dll: %.o
	$(DLLTOOL) --export-all --output-def $*.def $<
	$(DLLWRAP) -o $@ --def $*.def $< $(top_builddir)/src/utils/dllinit.o $(DLLLIBS)
	rm -f $*.def

ifeq ($(findstring backend,$(subdir)), backend)
override CPPFLAGS+= -DBUILDING_DLL=1
endif

ifeq ($(findstring ecpg/lib,$(subdir)), ecpg/lib)
override CPPFLAGS+= -DBUILDING_DLL=1
endif

ifeq ($(findstring interfaces/libpq++,$(subdir)), interfaces/libpq++)
override CPPFLAGS+= -DBUILDING_DLL=1
endif

ifeq ($(findstring src/pl/plpython,$(subdir)), src/pl/plpython)
override CPPFLAGS+= -DUSE_DL_IMPORT
endif

override javadir := '$(shell cygpath -w $(javadir))'

sqlmansect = 7