1 # Licensed to the Apache Software Foundation (ASF) under one or more
2 # contributor license agreements. See the NOTICE file distributed with
3 # this work for additional information regarding copyright ownership.
4 # The ASF licenses this file to You under the Apache License, Version 2.0
5 # (the "License"); you may not use this file except in compliance with
6 # the License. You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
22 APACHE_DIR=@APACHE_DIR@
24 APXSCFLAGS=@APXSCFLAGS@
25 APXSCPPFLAGS=@APXSCPPFLAGS@
26 APXSLDFLAGS=@APXSLDFLAGS@
30 libexecdir=${APACHE_DIR}/modules
33 # Defines APACHE_OBJECTS - the list of all common files
34 include ../common/list.mk
36 # Apache2 settings, values guessed by Apache config and used to build it
37 # Will define libexecdir, LIBTOOL, etc
38 include @APACHE_CONFIG_VARS@
40 # Local settings ( overriding/appending to Apache's )
42 JK_INCL=-DUSE_APACHE_MD5 -I ${COMMON}
43 JAVA_INCL=-I ${JAVA_HOME}/include -I ${JAVA_HOME}/include/${OS}
44 JAVA_LIB=-L ${JAVA_HOME}/jre/lib/${ARCH} -L ${JAVA_HOME}/lib/${ARCH}/native_threads
45 CFLAGS=@apache_include@ @CFLAGS@ ${JK_INCL} ${JAVA_INCL} ${APXSCPPFLAGS} ${APXSCFLAGS} ${EXTRA_CFLAGS} ${EXTRA_CPPFLAGS}
49 include ../scripts/build/rules.mk
53 all: Makefile @LIB_JK_TYPE@
54 install: @INSTALL_TYPE@
57 echo Regenerating Makefile
58 ( cd ..; ./config.status )
60 lib_jk.la: mod_jk.lo ${APACHE_OBJECTS}
61 $(LIBTOOL) --mode=link $(CC) -o lib_jk.la -static -rpath ${libexecdir}/jk mod_jk.lo $(APACHE_OBJECTS)
65 @echo "Copying files to Apache Modules Directory..."
66 -${MKDIR} ${APACHE_DIR}/modules/jk
67 ${CP} config.m4 ${APACHE_DIR}/modules/jk
68 ${LIBTOOL} --mode=install cp lib_jk.la ${APACHE_DIR}/modules/jk
70 @echo "Please be sure to re-compile Apache..."
72 @echo "cd ${APACHE_DIR}"
74 @echo "./configure --with-mod_jk"
78 #################### Dynamic .so file ####################
79 # APXS will compile every file, this is derived from apxs
81 mod_jk.la: mod_jk.lo $(APACHE_OBJECTS)
82 $(LIBTOOL) --mode=link ${COMPILE} $(APXSLDFLAGS) -o $@ -module -rpath ${libexecdir} -avoid-version mod_jk.lo $(APACHE_OBJECTS)
85 ../scripts/build/instdso.sh SH_LIBTOOL='$(LIBTOOL)' mod_jk.la `pwd`
89 @echo "Installing files to Apache Modules Directory..."
92 @echo "Please be sure to arrange ${APACHE_DIR}/conf/httpd.conf..."
96 rm -f *.o *.lo *.a *.la *.so *.so.* *.slo
99 maintainer-clean: clean