##
##  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/nspr -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/nspr
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)

OBJS=	os.o os-inline.o http_main.o

LIB=	libos.a

all:	$(LIB)

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

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

clean:
	rm -f $(OBJS) $(LIB)

distclean: clean
	-rm -f Makefile

# 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

$(OBJS): Makefile

# DO NOT REMOVE
http_main.o: http_main.c $(INCDIR)/httpd.h $(INCDIR)/conf.h \
 ../../os/nspr/os.h $(INCDIR)/hsregex.h $(INCDIR)/alloc.h \
 $(INCDIR)/buff.h $(INCDIR)/ap.h $(INCDIR)/util_uri.h \
 $(INCDIR)/http_main.h $(INCDIR)/http_log.h \
 $(INCDIR)/http_config.h $(INCDIR)/http_protocol.h \
 $(INCDIR)/http_request.h $(INCDIR)/http_conf_globals.h \
 $(INCDIR)/http_core.h $(INCDIR)/http_vhost.h \
 $(INCDIR)/util_script.h $(INCDIR)/scoreboard.h \
 $(INCDIR)/explain.h
os-inline.o: os-inline.c $(INCDIR)/conf.h ../../os/nspr/os.h \
 $(INCDIR)/hsregex.h
os.o: os.c $(INCDIR)/conf.h ../../os/nspr/os.h \
 $(INCDIR)/hsregex.h os.h
