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.
17 ## configure should make the Makefile out of this file.
20 top_srcdir=@top_srcdir@
26 APACHE_DIR=@APACHE_DIR@
36 libexecdir=${APACHE_DIR}/libexec
38 BUILD_DIR = ${JK_DIR}/../build/jk/apache13
40 APACHE_FILES = Makefile.tmpl Makefile.libdir libjk.module
43 JK_INCL=-DUSE_APACHE_MD5 -I ${top_srcdir}/common
44 JAVA_INCL=-I ${JAVA_HOME}/include -I ${JAVA_HOME}/include/${OS}
45 JAVA_LIB=-L ${JAVA_HOME}/jre/lib/${ARCH} -L ${JAVA_HOME}/lib/${ARCH}/native_threads
46 APACHE_CFLAGS=@apache_include@ @APXSCFLAGS@ @APXSCPPFLAGS@ -I${top_srcdir}/common
49 JK_CFLAGS = $(JK_INCL) $(JAVA_INCL) $(APACHE_CFLAGS)
51 SH_COMPILE = $(LIBTOOL) --mode=compile $(COMPILE) $(JK_CFLAGS)
52 MOD_LINK = $(LIBTOOL) --mode=link $(CC) @APXSLDFLAGS@
54 include ../common/list.mk
61 install: @INSTALL_TYPE@
63 install_static: mod_jk.a
65 @echo "Copying files to Apache Modules Directory..."
66 -${MKDIR} ${APACHE_DIR}/src/modules/jk
67 ${LIBTOOL} --mode=install ${CP} $< ${APACHE_DIR}/src/modules/jk/mod_jk.a
68 -${CP} Makefile.tmpl ${APACHE_DIR}/src/modules/jk
69 -${CP} Makefile.libdir ${APACHE_DIR}/src/modules/jk
70 -${CP} mod_jk.c ${APACHE_DIR}/src/modules/jk
71 -${MKDIR} ${APACHE_DIR}/src/modules/jk/include
72 -${CP} ../common/*.h ${APACHE_DIR}/src/modules/jk/include
74 @echo "Please be sure to re-compile Apache..."
76 @echo "cd ${APACHE_DIR}"
77 @echo "./config.status --activate-module=src/modules/jk/libjk.a \\"
78 @echo " --enable-module=dir \\"
79 @echo " --disable-shared=dir"
82 install_dynamic: mod_jk.la
84 @echo "Copying files to Apache libexec Directory..."
85 ${LIBTOOL} --mode=install ${CP} $< ${libexecdir}/mod_jk.so
91 rm -f *.o *.lo *.a *.la *.so *.so.* *.slo
94 maintainer-clean: clean
99 mod_jk.la: mod_jk.lo $(APACHE_OBJECTS)
100 ${MOD_LINK} -o $@ -module -rpath ${libexecdir} $^
101 mod_jk.a: mod_jk.lo $(APACHE_OBJECTS)
105 ../scripts/build/instdso.sh SH_LIBTOOL='$(LIBTOOL)' mod_jk.la `pwd`
111 ${SH_COMPILE} -c mod_jk.c -o $@
114 ${SH_COMPILE} -c $< -o $@