# LBL style Makefile to put the links into a directory in the build/<platform>
# area and then build from there. One should do a make config first and then
# make all.

srcdir		= @srcdir@
top_srcdir      = @top_srcdir@
prefix          = @prefix@
exec_prefix     = @exec_prefix@
bindir          = @bindir@
libdir          = @libdir@
incdir          = $(exec_prefix)/include
mandir          = @mandir@

RANLIB		= @RANLIB@
INSTALL		= @INSTALL@
MAKE		= @MAKE@

all:
	$(MAKE) -f Makefile.wrapper

config:
	echo "Renaming Makefile to Makefile.LBL"
	mv Makefile Makefile.LBL
	-ln -s $(srcdir)/configure .
	-ln -s $(srcdir)/src .
	-ln -s $(srcdir)/Makefile.tmpl .
	./configure --verbose --shadow
	-ln -s /usr/include/regex.h src.`src/helpers/GuessOS`/include/regex.h
	echo "now type make all to build"
	echo "When done type make -f Makefile.LBL install to just install httpsd"

install: 
	$(INSTALL) -m 755 src.`src/helpers/GuessOS`/httpsd $(bindir)/httpd-akenti
	$(INSTALL) -m 755 src.`src/helpers/GuessOS`/modules/ssl/gcache $(bindir)/gcache

clean:
	rm -rf Makefile.tmpl Makefile Makefile.`src/helpers/GuessOS` src* config* *log log*

