# $Header: /home/cvspublic/httpd-test/specweb99/specweb99-2.0/Makefile,v 1.6 2004/09/14 19:51:34 sctemme Exp $

# Copyright (c) 2000-2004 The Apache Software Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# This Makefile will build mod_specweb99.so for you as shared
# Apache 2.0 module. Set the variable APXS to point to apxs on 
# your system. 

# I'm sure I'm using some GNU make specifics here.

#   the used tools
APXS ?= /usr/local/apache2/bin/apxs
APACHECTL=$(shell $(APXS) -q sbindir)/apachectl

builddir=.
top_srcdir=$(shell $(APXS) -q prefix)
top_builddir=$(shell $(APXS) -q prefix)
include $(shell $(APXS) -q installbuilddir)/special.mk

#   additional defines, includes and libraries
#DEFS=-Dmy_define=my_value
INCLUDES=-I$(shell $(APXS) -q includedir)
#LIBS=-Lmy/lib/dir -lmylib

all: local-shared-build

#   install the shared object file into Apache 
install: install-modules

#   cleanup
clean:
	-rm -f mod_specweb99.o mod_specweb99.lo mod_specweb99.slo mod_specweb99.la 

#   simple test
test: reload
	lynx -mime_header http://localhost/specweb99

#   install and activate shared object by reloading Apache to
#   force a reload of the shared object file
reload: install restart

#   the general Apache start/restart/stop
#   procedures
start:
	$(APACHECTL) start
restart:
	$(APACHECTL) restart
stop:
	$(APACHECTL) stop
