2004-12-17 04:52:49 +01:00
|
|
|
# $PostgreSQL: pgsql/src/makefiles/Makefile.win32,v 1.7 2004/12/17 03:52:49 tgl Exp $
|
2003-05-15 18:35:30 +02:00
|
|
|
|
|
|
|
# Use replacement include files for those missing on Win32
|
2003-05-19 19:31:59 +02:00
|
|
|
override CPPFLAGS+="-I$(top_srcdir)/src/include/port/win32"
|
2003-05-15 18:35:30 +02:00
|
|
|
|
1999-01-18 13:43:55 +01:00
|
|
|
DLLTOOL= dlltool
|
|
|
|
DLLWRAP= dllwrap
|
2004-12-17 04:52:49 +01:00
|
|
|
ifdef PGXS
|
|
|
|
BE_DLLLIBS= -L$(DESTDIR)$(bindir) -lpostgres
|
|
|
|
else
|
2001-04-04 23:15:56 +02:00
|
|
|
BE_DLLLIBS= -L$(top_builddir)/src/backend -lpostgres
|
2004-12-17 04:52:49 +01:00
|
|
|
endif
|
2002-07-27 22:10:05 +02:00
|
|
|
DLLINIT = $(top_builddir)/src/utils/dllinit.o
|
2002-09-05 20:28:46 +02:00
|
|
|
|
2000-10-22 00:36:14 +02:00
|
|
|
AROPT = crs
|
|
|
|
DLSUFFIX = .dll
|
|
|
|
CFLAGS_SL =
|
|
|
|
|
1999-01-18 13:43:55 +01:00
|
|
|
%.dll: %.o
|
|
|
|
$(DLLTOOL) --export-all --output-def $*.def $<
|
2002-09-05 20:28:46 +02:00
|
|
|
$(DLLWRAP) -o $@ --def $*.def $< $(DLLINIT) $(SHLIB_LINK)
|
1999-01-18 13:43:55 +01:00
|
|
|
rm -f $*.def
|
1999-03-09 14:39:15 +01:00
|
|
|
|
2002-09-05 20:28:46 +02:00
|
|
|
ifneq (,$(findstring backend,$(subdir)))
|
|
|
|
ifeq (,$(findstring conversion_procs,$(subdir)))
|
|
|
|
override CPPFLAGS+= -DBUILDING_DLL
|
1999-03-09 14:39:15 +01:00
|
|
|
endif
|
2001-05-03 18:07:52 +02:00
|
|
|
endif
|
2001-05-25 16:28:58 +02:00
|
|
|
|
2004-10-23 00:33:58 +02:00
|
|
|
ifneq (,$(findstring timezone,$(subdir)))
|
|
|
|
override CPPFLAGS+= -DBUILDING_DLL
|
|
|
|
endif
|
|
|
|
|
2004-10-27 21:14:07 +02:00
|
|
|
ifneq (,$(findstring ecpg/ecpglib,$(subdir)))
|
2002-09-05 20:28:46 +02:00
|
|
|
override CPPFLAGS+= -DBUILDING_DLL
|
2001-09-06 04:58:33 +02:00
|
|
|
endif
|
|
|
|
|
2002-09-05 20:28:46 +02:00
|
|
|
# required by Python headers
|
|
|
|
ifneq (,$(findstring src/pl/plpython,$(subdir)))
|
2001-05-25 17:48:33 +02:00
|
|
|
override CPPFLAGS+= -DUSE_DL_IMPORT
|
|
|
|
endif
|
2004-11-17 18:16:17 +01:00
|
|
|
|
|
|
|
# special win32 headers are provided here
|
|
|
|
ifdef PGXS
|
|
|
|
override CPPFLAGS+= -I$(includedir_server)/port/win32
|
|
|
|
endif
|
|
|
|
|
|
|
|
# it is better to install shared-libraries anyway?
|
|
|
|
# may be overriden with make MAKE_DLL=false install
|
|
|
|
ifndef MAKE_DLL
|
|
|
|
MAKE_DLL = true
|
|
|
|
endif
|