~ubuntu-branches/ubuntu/oneiric/libapache-mod-jk/oneiric

« back to all changes in this revision

Viewing changes to native/jni/Makefile.netware

  • Committer: Bazaar Package Importer
  • Author(s): Steve Kowalik
  • Date: 2006-08-05 16:30:53 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060805163053-myf66gm6j1a21ps6
Tags: 1:1.2.18-1ubuntu1
Merge from Debian unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
# Makefile for jk_nsapi_plugin (NetWare version - gnu make)
 
3
# created by Guenter Knauf <eflash@gmx.net>
 
4
#
 
5
 
 
6
# Edit the path below to point to the base of your Netscape includes.
 
7
ifndef NS_HOME
 
8
NS_HOME = c:/projects/sdks/netscape
 
9
endif
 
10
# Edit the path below to point to the base of your NetWare Java SDK.
 
11
ifndef NW_JDK
 
12
NW_JDK  = c:/projects/sdks/java-nw
 
13
endif
 
14
# Edit the path below to point to the base of your Novell NDK.
 
15
ifndef NDKBASE
 
16
NDKBASE = c:/novell
 
17
endif
 
18
INSTDIR = /mnt/sys/novonyx/modules
 
19
 
 
20
# Edit the vars below to change NLM target settings.
 
21
TARGET  = jni_conn
 
22
VERSION = $(JK_VERSION)
 
23
COPYR   = Copyright (c) 2000-2004 The Apache Software Foundation. All rights reserved.
 
24
DESCR   = JNI natives for Tomcat $(JK_VERSION_STR)
 
25
MTSAFE  = NO
 
26
STACK   = 64000
 
27
#SCREEN = System Console
 
28
MODULES = nsapi
 
29
EXPORTS = \
 
30
        Java_org_apache_tomcat_modules_server_JNIConnectionHandler_write \
 
31
        Java_org_apache_tomcat_modules_server_JNIConnectionHandler_startReasponse \
 
32
        Java_org_apache_tomcat_modules_server_JNIConnectionHandler_readHeaders \
 
33
        Java_org_apache_tomcat_modules_server_JNIConnectionHandler_readEnvironment \
 
34
        Java_org_apache_tomcat_modules_server_JNIConnectionHandler_read \
 
35
        Java_org_apache_tomcat_modules_server_JNIConnectionHandler_getNumberOfHeaders
 
36
 
 
37
#IMPORTS        = __nsapi30_table
 
38
 
 
39
# Edit the var below to point to your lib architecture.
 
40
ifndef LIBARCH
 
41
LIBARCH = CLIB
 
42
# LIBARCH = LIBC
 
43
endif
 
44
 
 
45
# must be equal to DEBUG or NDEBUG
 
46
DB      = NDEBUG
 
47
# DB    = DEBUG
 
48
# Optimization: -O<n> or debugging: -g
 
49
ifeq ($(DB),NDEBUG)
 
50
        OPT     = -O2
 
51
        OBJDIR  = release
 
52
else
 
53
        OPT     = -g
 
54
        OBJDIR  = debug
 
55
endif
 
56
 
 
57
# Include the version info retrieved from jk_version.h
 
58
-include $(OBJDIR)/version.inc
 
59
 
 
60
# The following line defines your compiler.
 
61
ifdef METROWERKS
 
62
        CC = mwccnlm
 
63
else
 
64
        CC = gcc
 
65
endif
 
66
# RM    = rm -f
 
67
# CP    = cp -fv
 
68
# if you want to mark the target as MTSAFE you will need a tool for
 
69
# generating the xdc data for the linker; here's a minimal tool:
 
70
# http://www.gknw.com/development/prgtools/mkxdc.zip
 
71
MPKXDC  = mkxdc
 
72
 
 
73
# Global flags for all compilers
 
74
CFLAGS  = $(OPT) -D$(DB) -DNETWARE -DXP_NETWARE -nostdinc
 
75
 
 
76
ifeq ($(CC),mwccnlm)
 
77
LD      = mwldnlm
 
78
LDFLAGS = -nostdlib $(PRELUDE) $(OBJDIR)/*.o -o $(OBJDIR)/$(TARGET).nlm -commandfile
 
79
CFLAGS  += -gccinc -inline off -opt nointrinsics
 
80
#CFLAGS += -w on
 
81
ifeq ($(LIBARCH),LIBC)
 
82
        PRELUDE = $(SDK_LIBC)/imports/libcpre.o
 
83
        CFLAGS += -align 4 -inst mmx -proc 686
 
84
#       CFLAGS += -D__ANSIC__
 
85
else
 
86
        PRELUDE = "$(METROWERKS)/Novell Support/libraries/runtime/prelude.obj"
 
87
#       CFLAGS += -include "$(METROWERKS)/Novell Support/headers/nlm_prefix.h"
 
88
        CFLAGS += -align 1 -proc 586
 
89
endif
 
90
else
 
91
LD      = nlmconv
 
92
LDFLAGS = -T
 
93
CFLAGS  += -fno-builtin -fpack-struct -fpcc-struct-return
 
94
CFLAGS  += -Wall -Wno-main # -pedantic
 
95
ifeq ($(LIBARCH),LIBC)
 
96
        PRELUDE = $(SDK_LIBC)/imports/libcpre.gcc.o
 
97
#       CFLAGS += -D__ANSIC__
 
98
else
 
99
        PRELUDE = $(SDK_CLIB)/imports/clibpre.gcc.o
 
100
        CFLAGS += -include $(NDKBASE)/nlmconv/genlm.h
 
101
endif
 
102
endif
 
103
 
 
104
LDLIBS  =
 
105
 
 
106
NDK_ROOT = $(NDKBASE)/ndk
 
107
SDK_CLIB = $(NDK_ROOT)/nwsdk
 
108
SDK_LIBC = $(NDK_ROOT)/libc
 
109
JKCOMMON = ../common
 
110
 
 
111
INCLUDES = -I$(NS_HOME)/include -I$(NS_HOME)/include/base
 
112
INCLUDES += -I$(JKCOMMON) -I$(NW_JDK)/include -I$(NW_JDK)/include/netware 
 
113
 
 
114
ifeq ($(LIBARCH),LIBC)
 
115
        INCLUDES += -I$(SDK_LIBC)/include -I$(SDK_LIBC)/include/nks
 
116
        INCLUDES += -I$(SDK_LIBC)/include/winsock
 
117
else
 
118
        INCLUDES += -I$(SDK_CLIB)/include/nlm -I$(SDK_CLIB)/include
 
119
        INCLUDES += -I$(SDK_CLIB)/include/nlm/obsolete
 
120
        CFLAGS += -DNETDB_USE_INTERNET
 
121
endif
 
122
CFLAGS  += $(INCLUDES)
 
123
 
 
124
ifeq ($(MTSAFE),YES)
 
125
        XDCDATA = $(OBJDIR)/$(TARGET).xdc
 
126
endif
 
127
 
 
128
ifeq ($(findstring linux,$(OSTYPE)),linux)
 
129
DL      = '
 
130
#-include $(NDKBASE)/nlmconv/ncpfs.inc
 
131
endif
 
132
 
 
133
OBJS    = \
 
134
        $(OBJDIR)/jk_nwmain.o \
 
135
        $(OBJDIR)/jk_map.o \
 
136
        $(OBJDIR)/jk_pool.o \
 
137
        $(OBJDIR)/jk_util.o \
 
138
        $(OBJDIR)/jk_jnicb.o
 
139
 
 
140
 
 
141
all: $(OBJDIR) $(OBJDIR)/version.inc $(OBJDIR)/$(TARGET).nlm 
 
142
 
 
143
$(OBJDIR)/%.o: %.c
 
144
        @echo Compiling $<
 
145
        @$(CC) $(CFLAGS) -c $< -o $@
 
146
 
 
147
$(OBJDIR)/%.o: $(JKCOMMON)/%.c
 
148
        @echo Compiling $<
 
149
        @$(CC) $(CFLAGS) -c $< -o $@
 
150
 
 
151
$(OBJDIR)/version.inc: $(JKCOMMON)/jk_version.h $(OBJDIR)
 
152
        @echo Creating $@
 
153
        @awk -f ../../support/get_ver.awk $< > $@
 
154
 
 
155
dist: all
 
156
        -$(RM) $(OBJDIR)/*.o $(OBJDIR)/$(TARGET).map $(OBJDIR)/$(TARGET).ncv
 
157
        -$(RM) $(OBJDIR)/$(TARGET).def $(OBJDIR)/version.inc $(XDCDATA)
 
158
#       -$(CP) ../changes.txt $(OBJDIR)/
 
159
 
 
160
install: all
 
161
        @[ -d $(INSTDIR) ] || mkdir $(INSTDIR)
 
162
        @$(CP) $(TARGET).nlm $(INSTDIR)
 
163
 
 
164
clean:
 
165
        -$(RM) -r $(OBJDIR)
 
166
 
 
167
$(OBJDIR):
 
168
        @mkdir $(OBJDIR)
 
169
 
 
170
$(OBJDIR)/$(TARGET).nlm: $(OBJS) $(OBJDIR)/$(TARGET).def $(XDCDATA)
 
171
        @echo Linking $@
 
172
        @-$(RM) $@
 
173
        @$(LD) $(LDFLAGS) $(OBJDIR)/$(TARGET).def
 
174
 
 
175
$(OBJDIR)/%.xdc: Makefile.netware
 
176
        @echo Creating $@
 
177
        @$(MPKXDC) $(XDCOPT) $@
 
178
 
 
179
$(OBJDIR)/%.def: Makefile.netware
 
180
        @echo $(DL)# DEF file for linking with $(LD)$(DL) > $@
 
181
        @echo $(DL)# Do not edit this file - it is created by make!$(DL) >> $@
 
182
        @echo $(DL)# All your changes will be lost!!$(DL) >> $@
 
183
        @echo $(DL)#$(DL) >> $@
 
184
        @echo $(DL)copyright "$(COPYR)"$(DL) >> $@
 
185
        @echo $(DL)description "$(DESCR)"$(DL) >> $@
 
186
        @echo $(DL)version $(VERSION)$(DL) >> $@
 
187
ifdef NLMTYPE
 
188
        @echo $(DL)type $(NLMTYPE)$(DL) >> $@
 
189
endif
 
190
ifdef STACK
 
191
        @echo $(DL)stack $(STACK)$(DL) >> $@
 
192
endif
 
193
ifdef SCREEN
 
194
        @echo $(DL)screenname "$(SCREEN)"$(DL) >> $@
 
195
else
 
196
        @echo $(DL)screenname "DEFAULT"$(DL) >> $@
 
197
endif
 
198
ifeq ($(DB),DEBUG)
 
199
        @echo $(DL)debug$(DL) >> $@
 
200
endif
 
201
        @echo $(DL)threadname "$(TARGET)"$(DL) >> $@
 
202
ifdef XDCDATA
 
203
        @echo $(DL)xdcdata $(XDCDATA)$(DL) >> $@
 
204
endif
 
205
ifeq ($(LIBARCH),CLIB)
 
206
        @echo $(DL)start _Prelude$(DL) >> $@
 
207
        @echo $(DL)exit _Stop$(DL) >> $@
 
208
        @echo $(DL)import @$(NDK_ROOT)/nwsdk/imports/clib.imp$(DL) >> $@
 
209
        @echo $(DL)import @$(NDK_ROOT)/nwsdk/imports/threads.imp$(DL) >> $@
 
210
        @echo $(DL)import @$(NDK_ROOT)/nwsdk/imports/nlmlib.imp$(DL) >> $@
 
211
        @echo $(DL)import @$(NDK_ROOT)/nwsdk/imports/socklib.imp$(DL) >> $@
 
212
        @echo $(DL)module clib$(DL) >> $@
 
213
else
 
214
ifeq ($(LD),nlmconv)
 
215
        @echo $(DL)flag_on 64$(DL) >> $@
 
216
else
 
217
        @echo $(DL)autounload$(DL) >> $@
 
218
endif
 
219
        @echo $(DL)pseudopreemption$(DL) >> $@
 
220
        @echo $(DL)start _LibCPrelude$(DL) >> $@
 
221
        @echo $(DL)exit _LibCPostlude$(DL) >> $@
 
222
        @echo $(DL)check _LibCCheckUnload$(DL) >> $@
 
223
        @echo $(DL)import @$(NDK_ROOT)/libc/imports/libc.imp$(DL) >> $@
 
224
        @echo $(DL)import @$(NDK_ROOT)/libc/imports/netware.imp$(DL) >> $@
 
225
        @echo $(DL)module libc$(DL) >> $@
 
226
endif
 
227
ifdef MODULES
 
228
        @echo $(DL)module $(MODULES)$(DL) >> $@
 
229
endif
 
230
ifdef EXPORTS
 
231
        @echo $(DL)export $(EXPORTS)$(DL) >> $@
 
232
endif
 
233
ifdef IMPORTS
 
234
        @echo $(DL)import $(IMPORTS)$(DL) >> $@
 
235
endif
 
236
ifeq ($(LD),nlmconv)
 
237
        @echo $(DL)input $(OBJS)$(DL) >> $@
 
238
        @echo $(DL)input $(PRELUDE)$(DL) >> $@
 
239
        @echo $(DL)output $(TARGET).nlm$(DL) >> $@
 
240
endif
 
241