##
##  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)
##           - ./Makefile.tmpl
##

##
##  Inherited Makefile options from Configure script
##  (Begin of automatically generated section)
##
SRCDIR=..
EXTRA_CFLAGS=-Wall -Wshadow -Wmissing-prototypes -pipe -fno-common -DNSPR
EXTRA_LDFLAGS=-g -Wl,-Map -Wl,httpd.map -Wl,-rpath -Wl,/home/dgaudet/nsprlink/lib -static
EXTRA_LIBS=-L/home/dgaudet/nsprlink/lib -lnspr21 -ldl
EXTRA_INCLUDES=-I/home/dgaudet/nsprlink/include
CC=gcc
OPTIM=-O2 -g
CFLAGS1= -DLINUX=2 -DUSE_HSREGEX
INCDIR=$(SRCDIR)/include
INCLUDES0=-I$(SRCDIR)/os/unix -I$(SRCDIR)/include
INCLUDES1=
LIBS1= -lm -lcrypt -lndbm
LDFLAGS1=
BROKEN_BPRINTF_FLAGS=
MFLAGS_STATIC=--no-print-directory
REGLIB=regex/libregex.a
RANLIB=ranlib
SHELL=/bin/sh
OSDIR=os/unix
SUBDIRS=regex $(OSDIR) ap main modules
##
##  (End of automatically generated section)
##

CFLAGS=$(OPTIM) $(CFLAGS1) $(EXTRA_CFLAGS)
LIBS=$(EXTRA_LIBS) $(LIBS1)
INCLUDES=$(INCLUDES1) $(INCLUDES0) $(EXTRA_INCLUDES)
LDFLAGS=$(LDFLAGS1) $(EXTRA_LDFLAGS)

LIB=libap.a

OBJS=ap_execve.o ap_cpystrn.o \
     ap_slack.o ap_snprintf.o ap_strings.o

.c.o:
	$(CC) -c $(INCLUDES) $(CFLAGS) $(SPACER) $<

all: $(LIB)

clean:
	rm -f *.o *.a

distclean: clean
	-rm -f Makefile

$(OBJS): Makefile

$(LIB): $(OBJS)
	rm -f $@
	ar cr $@ $(OBJS)
	$(RANLIB) $@

# We really don't expect end users to use this rule.  It works only with
# gcc, and rebuilds Makefile.tmpl.  You have to re-run Configure after
# using it.
depend:
	cp Makefile.tmpl Makefile.tmpl.bak \
	    && sed -ne '1,/^# DO NOT REMOVE/p' Makefile.tmpl > Makefile.new \
	    && gcc -MM $(INCLUDES) $(CFLAGS) *.c >> Makefile.new \
	    && sed -e '1,$$s: $(INCDIR)/: $$(INCDIR)/:g' Makefile.new \
		> Makefile.tmpl \
	    && rm Makefile.new

# DO NOT REMOVE
ap_cpystrn.o: ap_cpystrn.c $(INCDIR)/httpd.h $(INCDIR)/conf.h \
 ../os/unix/os.h $(INCDIR)/hsregex.h $(INCDIR)/alloc.h \
 $(INCDIR)/buff.h $(INCDIR)/ap.h $(INCDIR)/util_uri.h
ap_execve.o: ap_execve.c $(INCDIR)/httpd.h $(INCDIR)/conf.h \
 ../os/unix/os.h $(INCDIR)/hsregex.h $(INCDIR)/alloc.h \
 $(INCDIR)/buff.h $(INCDIR)/ap.h $(INCDIR)/util_uri.h
ap_signal.o: ap_signal.c $(INCDIR)/httpd.h $(INCDIR)/conf.h \
 ../os/unix/os.h $(INCDIR)/hsregex.h $(INCDIR)/alloc.h \
 $(INCDIR)/buff.h $(INCDIR)/ap.h $(INCDIR)/util_uri.h
ap_slack.o: ap_slack.c $(INCDIR)/httpd.h $(INCDIR)/conf.h \
 ../os/unix/os.h $(INCDIR)/hsregex.h $(INCDIR)/alloc.h \
 $(INCDIR)/buff.h $(INCDIR)/ap.h $(INCDIR)/util_uri.h \
 $(INCDIR)/http_log.h
ap_snprintf.o: ap_snprintf.c $(INCDIR)/httpd.h $(INCDIR)/conf.h \
 ../os/unix/os.h $(INCDIR)/hsregex.h $(INCDIR)/alloc.h \
 $(INCDIR)/buff.h $(INCDIR)/ap.h $(INCDIR)/util_uri.h
ap_strings.o: ap_strings.c $(INCDIR)/httpd.h $(INCDIR)/conf.h \
 ../os/unix/os.h $(INCDIR)/hsregex.h $(INCDIR)/alloc.h \
 $(INCDIR)/buff.h $(INCDIR)/ap.h $(INCDIR)/util_uri.h
