1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
|
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Defines for example NSAPI programs running under Linux
# gcc
# If you get relocation errors, try:
# 1. compiling with Sun's cc
# 2. statically linking with libgcc
# 3. Adjusting LD_LIBRARY_PATH to grab libgcc_s
CC=gcc
# For 64 Bit builds, add "-m64" to EXTRA_CFLAGS
EXTRA_CFLAGS=-fPIC -pthread
LDFLAGS=-shared
CC_CMD=$(CC) $(CFLAGS) $(EXTRA_CFLAGS) \
-DNET_SSL -DSOLARIS -D_REENTRANT -DXP_UNIX -DMCC_HTTPD -DSPAPI20 -DJK_NSAPI
LD_SHAREDCMD=$(CC) $(LDFLAGS) $(CFLAGS) $(EXTRA_CFLAGS)
OS_TYPE=linux
INCLUDEDIR=$(IPLANET_HOME)/include
JK_DIR=../common
VPATH=.:$(JK_DIR)
JK_SRCS = $(shell \ls $(JK_DIR)/*.c)
JK_OBJECTS = $(patsubst $(JK_DIR)/%.c,%.o,$(JK_SRCS))
PLUGIN_OBJ = jk_nsapi_plugin.o
INCLUDE_FLAGS= -I$(JK_DIR) -I$(INCLUDEDIR) -I$(INCLUDEDIR)/base \
-I$(INCLUDEDIR)/frame
all: nsapi_redirector.so
nsapi_redirector.so: $(JK_OBJECTS) $(PLUGIN_OBJ)
$(LD_SHAREDCMD) $(JK_OBJECTS) $(PLUGIN_OBJ) -o nsapi_redirector.so $(EXTRA_LDDEFINES)
clean:
rm -f *.o nsapi_redirector.so $(JK_OBJECTS)
%.o : %.c
$(CC_CMD) $(INCLUDE_FLAGS) -c $<
|