bottleneck testcase based on rubbos
[bottlenecks.git] / rubbos / app / tomcat-connectors-1.2.32-src / native / netscape / Makefile.solaris
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
7 #
8 #     http://www.apache.org/licenses/LICENSE-2.0
9 #
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.
15
16 # Defines for example NSAPI programs running under SOLARIS
17
18 # Choose between the settings for gcc or Sun Studio compiler
19
20 # gcc
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
25 CC=gcc
26 # For 64 Bit builds, add "-m64" to EXTRA_CFLAGS
27 EXTRA_CFLAGS=-fPIC -pthread
28 LDFLAGS=-shared
29
30 # Sun Studio cc compiler
31 #CC=cc
32 # For 64 Bit builds, add "-xtarget=generic64" to EXTRA_CFLAGS
33 #EXTRA_CFLAGS=-xcode=pic32 -mt
34 #LDFLAGS=-G
35
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
39
40 CC_CMD=$(CC) $(CFLAGS) $(EXTRA_CFLAGS) \
41         -DNET_SSL -DSOLARIS -D_REENTRANT -DXP_UNIX -DMCC_HTTPD -DSPAPI20 -DJK_NSAPI
42
43 LD_SHAREDCMD=$(CC) $(LDFLAGS) $(CFLAGS) $(EXTRA_CFLAGS)
44
45 all:
46
47 prepare:
48
49 OS_TYPE=solaris
50 INCLUDEDIR=$(IPLANET_HOME)/include
51 JAVA_INCLUDE=$(JAVA_HOME)/include
52 JK_DIR=../common
53 VPATH=.:$(JK_DIR)
54
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 \
59 jk_ajp14.o           jk_shm.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 \
66 jk_map.o
67
68
69 PLUGIN_OBJ = jk_nsapi_plugin.o
70
71 INCLUDE_FLAGS=  -I$(JK_DIR) -I$(INCLUDEDIR) -I$(INCLUDEDIR)/base \
72                 -I$(INCLUDEDIR)/frame -I$(JAVA_INCLUDE) -I$(JAVA_INCLUDE)/$(OS_TYPE)
73
74 all: nsapi_redirector.so
75
76
77 nsapi_redirector.so: $(JK_OBJS) $(PLUGIN_OBJ)
78         $(LD_SHAREDCMD) $(JK_OBJS) $(PLUGIN_OBJ) -o nsapi_redirector.so $(EXTRA_LDDEFINES)
79
80 clean:
81         rm -f *.o nsapi_redirector.so $(JK_OBJS)
82         rm -f $(JK_DIR)/*.o
83
84 %.o : %.c
85         $(CC_CMD) $(INCLUDE_FLAGS) -c $<