##
##  Apache Makefile, automatically generated by Configure script.
##  Hand-edited changes will be lost if the Configure script is re-run.
##  Sources: - ../Makefile.config (via Configuration.apaci)
##           - ./Makefile.tmpl
##

##
##  Inherited Makefile options from Configure script
##  (Begin of automatically generated section)
##
SRCDIR=..
SSL_BASE=/usr/sfw
EXTRA_CFLAGS=-O -xarch=386 -xchip=pentium -xspace -Xa  -xildoff  -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DUSE_SO_LINGER -DHARD_SERVER_LIMIT=2048 -DSSL_EXPERIMENTAL_PERDIRCA_IGNORE -DSSL_EXPERIMENTAL_PROXY_IGNORE `$(SRCDIR)/apaci`
EXTRA_LDFLAGS=-M /sfw10/builds/build/sfw10-patch/usr/src/cmd/mapfile_noexstk -zcombreloc
EXTRA_LIBS=
EXTRA_INCLUDES=
EXTRA_DEPS=
CC=/ws/on10-tools/SUNWspro/SOS8/bin/cc
CFLAGS_SHLIB=-O -xarch=386 -xchip=pentium -xspace -Xa  -xildoff  -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPIC -KPIC -DUSE_SO_LINGER -DHARD_SERVER_LIMIT=2048 -DSSL_EXPERIMENTAL_PERDIRCA_IGNORE -DSSL_EXPERIMENTAL_PROXY_IGNORE
LDFLAGS_SHLIB=-M /sfw10/builds/build/sfw10-patch/usr/src/cmd/mapfile_noexstk -zcombreloc -G
OSDIR=$(SRCDIR)/os/unix
INCDIR=$(SRCDIR)/include
INCLUDES0=-I$(OSDIR) -I$(INCDIR)
SHELL=/bin/sh
OS=Solaris 2100
CPP=/ws/on10-tools/SUNWspro/SOS8/bin/cc -E
TARGET=httpd
OPTIM=
SSL_BASE=/usr/sfw
SSL_BINDIR=$(SSL_BASE)/bin
SSL_INCDIR=$(SSL_BASE)/include
SSL_LIBDIR=$(SSL_BASE)/lib
SSL_PROGRAM=/usr/sfw/bin/openssl
SSL_VERSION=-DMOD_SSL_VERSION=\"2.8.27\"
SSL_CFLAGS= -DSSL_COMPAT -DSSL_EXPERIMENTAL -DSSL_USE_SDBM -DSSL_ENGINE -I$(SSL_INCDIR)
SSL_VENDOR_OBJS=
SSL_VENDOR_OBJS_PIC=
SSL_LIBS= -lssl -lcrypto
SSL_LDFLAGS= -L$(SSL_LIBDIR)
PERL=/usr/perl5/bin/perl
PERL_CC=cc
PERL_OPTIMIZE=-xO3 -xspace -xildoff
PERL_CCFLAGS=-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TS_ERRNO
PERL_CCCDLFLAGS=-KPIC
PERL_DEFS= -DMOD_PERL_VERSION=\"1.29\" -DMOD_PERL_STRING_VERSION=\"mod_perl/1.29\"
PERL_INC=/usr/perl5/5.8.4/lib/i86pc-solaris-64int/CORE
PERL_LD=cc
PERL_LDFLAGS=
PERL_LDDLFLAGS=-G
PERL_LIBS=-R /usr/perl5/5.8.4/lib/i86pc-solaris-64int/CORE  /usr/perl5/5.8.4/lib/i86pc-solaris-64int/auto/DynaLoader/DynaLoader.a -L/usr/perl5/5.8.4/lib/i86pc-solaris-64int/CORE -lperl -lsocket -lnsl -ldl -lm -lc 
PERL_XSINIT=/usr/perl5/bin/perl -MExtUtils::Embed -e xsinit
PERL_XSUBPP=/usr/perl5/bin/perl /usr/perl5/5.8.4/lib/ExtUtils/xsubpp -nolinenumbers -typemap /usr/perl5/5.8.4/lib/ExtUtils/typemap
PERL_AR=ar
PERL_RANLIB=:
PERL_STATIC_EXTS=Apache Apache::Constants Apache::ModuleConfig Apache::Log Apache::URI Apache::Util Apache::Connection Apache::Server Apache::File Apache::Table 
PERL_STATIC_AR=
PERL_STATIC_SRCS=Apache.c Constants.c ModuleConfig.c Log.c URI.c Util.c Connection.c Server.c File.c Table.c
PERL_STATIC_OBJS=Apache.o Constants.o ModuleConfig.o Log.o URI.o Util.o Connection.o Server.o File.o Table.o
PERL_STATIC_OBJS_PIC=Apache.lo Constants.lo ModuleConfig.lo Log.lo URI.lo Util.lo Connection.lo Server.lo File.lo Table.lo
PERL_SSI=yes
LD_SHLIB=ld
LDFLAGS_SHLIB_EXPORT=
LDFLAGS_MOD_SHLIB=-G
LD_SHCORE_DEF=
LD_SHCORE_LIBS=
SHARED_CORE_EP=lib$(TARGET).ep
SHCORE_IMPLIB=
CFLAGS1= -DSOLARIS2=2100 -DMOD_SSL=208127 -DMOD_PERL -DUSE_HSREGEX -DEAPI -DUSE_EXPAT -I$(SRCDIR)/lib/expat-lite
INCLUDES1=
LIBS_SHLIB=
LDFLAGS1=
MFLAGS_STATIC=
REGLIB=regex/libregex.a
EXPATLIB=lib/expat-lite/libexpat.a
RANLIB=ranlib
LIBS1=  -lsocket -lnsl -lpthread
##
##  (End of automatically generated section)
##


# You probably want to take -DREDEBUG out of CFLAGS, and put something like
# -O in, *after* testing (-DREDEBUG strengthens testing by enabling a lot of
# internal assertion checking and some debugging facilities).
# Put -Dconst= in for a pre-ANSI compiler.
# Do not take -DPOSIX_MISTAKE out.
# REGCFLAGS isn't important to you (it's for my use in some special contexts).
INCLUDES=$(INCLUDES1) $(INCLUDES0) $(EXTRA_INCLUDES)
CFLAGS=-I. $(INCLUDES) $(OPTIM) $(CFLAGS1) $(EXTRA_CFLAGS) -DPOSIX_MISTAKE

# If you have a pre-ANSI compiler, put -o into MKHFLAGS.  If you want
# the Berkeley __P macro, put -b in.
MKHFLAGS=

# Flags for linking but not compiling, if any.
LDFLAGS=$(LDFLAGS1) $(EXTRA_LDFLAGS) -L$(SRCDIR)/ap

# Extra libraries for linking, if any.
LIBS=$(EXTRA_LIBS) $(LIBS1) -lap

# Internal stuff, should not need changing.
OBJPRODN=regcomp.o regexec.o regerror.o regfree.o
OBJS=$(OBJPRODN) split.o debug.o main.o
H=cclass.h cname.h regex2.h utils.h
REGSRC=regcomp.c regerror.c regexec.c regfree.c
ALLSRC=$(REGSRC) engine.c debug.c main.c split.c

# Stuff that matters only if you're trying to lint the package.
LINTFLAGS=-I. -Dstatic= -Dconst= -DREDEBUG
LINTC=regcomp.c regexec.c regerror.c regfree.c debug.c main.c
JUNKLINT=possible pointer alignment|null effect

# arrangements to build forward-reference header files
.SUFFIXES:	.ih .h
.c.ih:
	sh ./mkh $(MKHFLAGS) -p $< >$@

all lib: libregex.a

libregex.a: $(OBJPRODN)
	rm -f libregex.a
	ar cr libregex.a $(OBJPRODN)
	$(RANLIB) libregex.a

default:	r

purge:
	rm -f *.o

# stuff to build regex.h
REGEXH=../include/hsregex.h
REGEXHSRC=regex2.h $(REGSRC)
$(REGEXH):	$(REGEXHSRC) mkh
	sh ./mkh $(MKHFLAGS) -i _REGEX_H_ $(REGEXHSRC) > $(REGEXH)

#	cmp -s regex.tmp regex.h 2>/dev/null || cp regex.tmp regex.h
#	rm -f regex.tmp

# no automatic dependencies here
depend:

# dependencies
$(OBJPRODN) debug.o:	utils.h $(REGEXH) regex2.h
regcomp.o:	cclass.h cname.h regcomp.ih
regexec.o:	engine.c engine.ih
regerror.o:	regerror.ih
debug.o:	debug.ih
main.o:	main.ih
 
# tester - just compile... do not link
re-nolink: $(OBJS)
	$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(LIBS) -c

# tester
re:	$(OBJS)
	$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(LIBS) -o $@

# regression test
r:	re tests
	./re <tests
	./re -el <tests
	./re -er <tests

# 57 variants, and other stuff, for development use -- not useful to you
ra:	./re tests
	-./re <tests
	-./re -el <tests
	-./re -er <tests

rx:	./re tests
	./re -x <tests
	./re -x -el <tests
	./re -x -er <tests

t:	./re tests
	-time ./re <tests
	-time ./re -cs <tests
	-time ./re -el <tests
	-time ./re -cs -el <tests

l:	$(LINTC)
	lint $(LINTFLAGS) -h $(LINTC) 2>&1 | egrep -v '$(JUNKLINT)' | tee lint

fullprint:
	ti README WHATSNEW notes todo | list
	ti *.h | list
	list *.c
	list regex.3 regex.7

print:
	ti README WHATSNEW notes todo | list
	ti *.h | list
	list reg*.c engine.c


mf.tmp:	Makefile
	sed '/^REGEXH=/s/=.*/=..\/include\\hsregex.h/' Makefile \
	| sed '/#DEL$$/d' >$@

DTRH=cclass.h cname.h regex2.h utils.h
PRE=COPYRIGHT README WHATSNEW
POST=mkh regex.3 regex.7 tests $(DTRH) $(ALLSRC) fake/*.[ch]
FILES=$(PRE) Makefile $(POST)
DTR=$(PRE) Makefile=mf.tmp $(POST)
dtr:	$(FILES) mf.tmp
	makedtr $(DTR) >$@
	rm mf.tmp

cio:	$(FILES)
	cio $(FILES)

rdf:	$(FILES)
	rcsdiff -c $(FILES) 2>&1 | p

# various forms of cleanup
tidy:
	rm -f junk* core core.* *.core dtr *.tmp lint

clean:	tidy
	rm -f *.o *.s re libregex.a

distclean: clean
	-rm -f Makefile

# don't do this one unless you know what you're doing
spotless:	clean
	rm -f mkh ../include/hsregex.h
