##
## $Id$
##
## Licensed to the Apache Software Foundation (ASF) under one or more
## contributor license agreements. See the NOTICE file distributed with
## this work for additional information regarding copyright ownership.
## The ASF licenses this file to You 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.

##
##  Makefile -- Build procedure for sample authz_ad_annotate Apache module
##  Autogenerated via ``apxs -n authz_ad_annotate -g''.
##

#   the used tools
APXS=apxs2

CURL_LIBS=-lcurl


#   the default target
all: mod_authz_annotate.so

CPPFLAGS = -Wall -Werror
LDFLAGS = $(CURL_LIBS)

APXS_CPPFLAGS = ${shell [ -n "${CPPFLAGS}" ] && echo ${CPPFLAGS} | sed -e 's/\([^ ]*\)/-Wc,\1/g'}
APXS_LDFLAGS  = ${shell [ -n "${LDFLAGS}"  ] && echo ${LDFLAGS} | sed -e 's/\([^ ]*\)/-Wl,\1/g'}

mod_authz_annotate.so: mod_authz_annotate.c
	$(APXS) -c $(APXS_CPPFLAGS) $(APXS_CFLAGS) $(APXS_LDFLAGS) $<
	cp .libs/mod_authz_annotate.so .

#   install the DSO file into the Apache installation
#   and activate it in the Apache configuration
install: mod_authz_annotate.so
	$(APXS) -i $(APXS_CPPFLAGS) $(APXS_CFLAGS) $(APXS_LDFLAGS) mod_authz_annotate.so

#   cleanup
clean:
	-rm -f mod_authz_annotate.so
	-rm -rf .libs


