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.
16 # Defines for example NSAPI programs running under SOLARIS
18 # Choose between the settings for gcc or Sun Studio compiler
21 # If you get relocation errors, try:
22 # 1. compiling with Sun's cc
23 # 2. statically linking with libgcc
24 # 3. Adjusting LD_LIBRARY_PATH to grab libgcc_s
26 # For 64 Bit builds, add "-m64" to EXTRA_CFLAGS
27 EXTRA_CFLAGS=-fPIC -pthread
30 # Sun Studio cc compiler
32 # For 64 Bit builds, add "-xtarget=generic64" to EXTRA_CFLAGS
33 #EXTRA_CFLAGS=-xcode=pic32 -mt
36 # Change this according to location where on installed the server.
37 # Don't forget to do the ./configure --enable-netscape=/opt/SUNWwbsvr/plugins
38 # before doing gmake -f Makefile.solaris
40 CC_CMD=$(CC) $(CFLAGS) $(EXTRA_CFLAGS) \
41 -DNET_SSL -DSOLARIS -D_REENTRANT -DXP_UNIX -DMCC_HTTPD -DSPAPI20 -DJK_NSAPI
43 LD_SHAREDCMD=$(CC) $(LDFLAGS) $(CFLAGS) $(EXTRA_CFLAGS)
50 INCLUDEDIR=$(IPLANET_HOME)/include
51 JAVA_INCLUDE=$(JAVA_HOME)/include
55 JK_OBJS = ap_snprintf.o jk_md5.o \
56 jk_ajp12_worker.o jk_msg_buff.o \
57 jk_ajp13.o jk_nwmain.o \
58 jk_ajp13_worker.o jk_pool.o \
60 jk_ajp14_worker.o jk_sockbuf.o \
61 jk_ajp_common.o jk_status.o \
62 jk_connect.o jk_uri_worker_map.o \
63 jk_context.o jk_url.o \
64 jk_jni_worker.o jk_util.o \
65 jk_lb_worker.o jk_worker.o \
69 PLUGIN_OBJ = jk_nsapi_plugin.o
71 INCLUDE_FLAGS= -I$(JK_DIR) -I$(INCLUDEDIR) -I$(INCLUDEDIR)/base \
72 -I$(INCLUDEDIR)/frame -I$(JAVA_INCLUDE) -I$(JAVA_INCLUDE)/$(OS_TYPE)
74 all: nsapi_redirector.so
77 nsapi_redirector.so: $(JK_OBJS) $(PLUGIN_OBJ)
78 $(LD_SHAREDCMD) $(JK_OBJS) $(PLUGIN_OBJ) -o nsapi_redirector.so $(EXTRA_LDDEFINES)
81 rm -f *.o nsapi_redirector.so $(JK_OBJS)
85 $(CC_CMD) $(INCLUDE_FLAGS) -c $<