#
#  Makefile for FastCGI development kit
#
#  Open Market, Inc.
#
#  $Id: Makefile.in,v 1.2 2001/06/05 14:26:57 grendel Exp $
#

VPATH=@srcdir@:@srcdir@/../
prefix=@prefix@
SRCDIR=@srcdir@
INSTALL=@INSTALL@
@SET_MAKE@
CC=@CC@
CFLAGS=@CFLAGS@
LDFLAGS=@LDFLAGS@
CFLAGSUP=$(CFLAGS)

SHELL=/bin/sh

all: 
	(cd libfcgi; $(MAKE) all "CC=$(CC)" "CFLAGSUP=$(CFLAGSUP)" "LDFLAGS=$(LDFLAGS)")
	(cd cgi-fcgi; $(MAKE) all "CC=$(CC)" "CFLAGSUP=$(CFLAGSUP)" "LDFLAGS=$(LDFLAGS)")

reconfig: clean
	uname -rs >config.uname
	./configure

install: all
	$(INSTALL) -s cgi-fcgi/cgi-fcgi $(DESTDIR)/$(prefix)/caudium$(EXTRAVER)/server/bin/fcgi

install_alt: all
	$(INSTALL) cgi-fcgi/cgi-fcgi $(DESTDIR)/$(prefix)/lib/caudium$(EXTRAVER)/bin/fcgi
	-strip --strip-unneeded $(DESTDIR)/$(prefix)/lib/caudium$(EXTRAVER)/bin/fcgi

install_bin:
	@true

distribute: spotless
	Makefile

spotless: 
	rm -f config.cache config.log config.status config.uname

clean:
	(cd libfcgi; $(MAKE) clean "CC=$(CC)" "CFLAGSUP=$(CFLAGSUP)" "LDFLAGS=$(LDFLAGS)")
	(cd cgi-fcgi; $(MAKE) clean "CC=$(CC)" "CFLAGSUP=$(CFLAGSUP)" "LDFLAGS=$(LDFLAGS)")

# ----------------------------------------------------------------------------
