bottleneck testcase based on rubbos
[bottlenecks.git] / rubbos / app / tomcat-connectors-1.2.32-src / native / netscape / Makefile.linux
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 Linux
17
18 # gcc
19 # If you get relocation errors, try:
20 #   1. compiling with Sun's cc
21 #   2. statically linking with libgcc
22 #   3. Adjusting LD_LIBRARY_PATH to grab libgcc_s
23 CC=gcc
24 # For 64 Bit builds, add "-m64" to EXTRA_CFLAGS
25 EXTRA_CFLAGS=-fPIC -pthread
26 LDFLAGS=-shared
27
28 CC_CMD=$(CC) $(CFLAGS) $(EXTRA_CFLAGS) \
29         -DNET_SSL -DSOLARIS -D_REENTRANT -DXP_UNIX -DMCC_HTTPD -DSPAPI20 -DJK_NSAPI
30
31 LD_SHAREDCMD=$(CC) $(LDFLAGS) $(CFLAGS) $(EXTRA_CFLAGS)
32
33 OS_TYPE=linux
34 INCLUDEDIR=$(IPLANET_HOME)/include
35 JAVA_INCLUDE=$(JAVA_HOME)/include
36 JK_DIR=../common
37 VPATH=.:$(JK_DIR)
38
39 JK_SRCS = $(shell \ls $(JK_DIR)/*.c)
40 JK_OBJECTS = $(patsubst $(JK_DIR)/%.c,%.o,$(JK_SRCS))
41 JK_JNI_OBJECTS = jk_jni_worker.o jk_nwmain.o
42 JK_OBJS = $(filter-out $(JK_JNI_OBJECTS),$(JK_OBJECTS))
43
44 PLUGIN_OBJ = jk_nsapi_plugin.o
45
46 INCLUDE_FLAGS=  -I$(JK_DIR) -I$(INCLUDEDIR) -I$(INCLUDEDIR)/base \
47                 -I$(INCLUDEDIR)/frame -I$(JAVA_INCLUDE) -I$(JAVA_INCLUDE)/$(OS_TYPE)
48
49 all: nsapi_redirector.so
50
51
52 nsapi_redirector.so: $(JK_OBJS) $(PLUGIN_OBJ)
53         $(LD_SHAREDCMD) $(JK_OBJS) $(PLUGIN_OBJ) -o nsapi_redirector.so $(EXTRA_LDDEFINES)
54
55 clean:
56         rm -f *.o nsapi_redirector.so $(JK_OBJS)
57
58 %.o : %.c
59         $(CC_CMD) $(INCLUDE_FLAGS) -c $<