summaryrefslogtreecommitdiff
path: root/makefiles/Makefile.win32
blob: 82893881690cb14eeff287104a41be6f9342097c (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
# $Header: /local/home/ssinger/cvs2svn/cvs2svn-2.3.0/slony-cvsd/slony1-engine/makefiles/Makefile.win32,v 1.9 2008-04-11 15:44:22 cbbrowne Exp $

# Use replacement include files for those missing on Win32
override CPPFLAGS+=-I${pgincludeserverdir}/port/win32
override LDFLAGS:=-lpgport $(LDFLAGS)

DLLTOOL= dlltool
DLLWRAP= dllwrap
DLLINIT = -L${pglibdir} -lpostgres

AROPT = crs
DLSUFFIX = .dll
CFLAGS_SL =

%.dll: $(SO_OBJS)
	$(DLLTOOL) --export-all --output-def $*.def $^
	$(DLLWRAP) -o $@ --def $*.def $^ $(DLLINIT) $(SHLIB_LINK)
	rm -f $*.def

# Make sure all: is the default target
all:

ifeq ($(SLFILESHLIB),1)
PGFTYPE=VFT_DLL
else
PGFTYPE=VFT_APP
endif

WIN32RES = win32ver.o
win32ver.rc: $(slony_top_builddir)/src/slon/port/win32ver.rc.in
	sed -e 's;FILEDESC;$(SLFILEDESC);' -e 's;VFT_APP;$(PGFTYPE);' -e 's;SLVERSION;SLONY_I_VERSION_STRING_DEC ,'`date '+%y%j' | sed 's/^0*//'`';' $(slony_top_builddir)/src/slon/port/win32ver.rc.in > win32ver.rc
win32ver.o: win32ver.rc
	windres -i win32ver.rc -o win32ver.o --include-dir=$(slony_top_builddir)
	rm -f win32ver.rc

sqlmansect = 7