# $Header: /local/home/ssinger/cvs2svn/cvs2svn-2.3.0/slony-cvsd/slony1-engine/makefiles/Makefile.win,v 1.6 2005-03-25 09:49:33 xfade Exp $
LDFLAGS+= -g
DLLTOOL= dlltool
DLLWRAP= dllwrap
DLLLIBS= -lcygipc -lcrypt -lpostgres -lpthread
BE_DLLLIBS=-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 =
override CFLAGS += -DCYGWIN=1

%.dll: $(SO_OBJS)
	$(DLLTOOL) --export-all --output-def $*.def $<
	$(DLLWRAP) -o $@ --def $*.def $< $(DLLLIBS)
	rm -f $*.def
%.o: %.c
	$(CC) -c $(CFLAGS) $(CPPFLAGS) -o $@ $<

sqlmansect = 7
