bottleneck testcase based on rubbos
[bottlenecks.git] / rubbos / app / tomcat-connectors-1.2.32-src / native / netscape / Makefile.netware
1 #
2 # Licensed to the Apache Software Foundation (ASF) under one or more
3 # contributor license agreements.  See the NOTICE file distributed with
4 # this work for additional information regarding copyright ownership.
5 # The ASF licenses this file to You under the Apache License, Version 2.0
6 # (the "License"); you may not use this file except in compliance with
7 # the License.  You may obtain a copy of the License at
8 #
9 #     http://www.apache.org/licenses/LICENSE-2.0
10 #
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16 #
17
18 #
19 # Makefile for jk_nsapi_plugin (NetWare version - gnu make)
20 # created by Guenter Knauf <fuankg@apache.org>
21 #
22
23 # Edit the path below to point to the base of your Netscape includes.
24 ifndef NS_HOME
25 NS_HOME = c:/projects/sdks/netscape
26 endif
27 # Edit the path below to point to the base of your NetWare Java SDK.
28 ifndef NW_JDK
29 NW_JDK  = c:/projects/sdks/java-nw
30 endif
31 # Edit the path below to point to the base of your Novell NDK.
32 ifndef NDKBASE
33 NDKBASE = c:/novell
34 endif
35
36 ifndef INSTDIR
37 INSTDIR = s:/sys/novonyx/modules
38 endif
39
40 # Edit the vars below to change NLM target settings.
41 TARGET  = nsapi_rd
42 VERSION = $(JK_VERSION)
43 COPYR   = Licensed under the Apache License, Version 2.0
44 DESCR   = Netscape plugin for Tomcat $(JK_VERSION_STR)
45 MTSAFE  = NO
46 STACK   = 65536
47 #SCREEN = System Console
48 MODULES = nshttpd
49 EXPORTS = jk_init jk_service
50 IMPORTS = __nsapi30_table
51
52 # Edit the var below to point to your lib architecture.
53 ifndef LIBARCH
54 LIBARCH = CLIB
55 # LIBARCH = LIBC
56 endif
57
58 # must be equal to DEBUG or NDEBUG
59 DB      = NDEBUG
60 # DB    = DEBUG
61 # Optimization: -O<n> or debugging: -g
62 ifeq ($(DB),NDEBUG)
63         OPT     = -O2
64         OBJDIR  = release
65 else
66         OPT     = -g
67         OBJDIR  = debug
68 endif
69
70 # Include the version info retrieved from jk_version.h
71 -include $(OBJDIR)/version.inc
72
73 # The following line defines your compiler.
74 ifdef METROWERKS
75         CC = mwccnlm
76 else
77         CC = gcc
78 endif
79 # RM    = rm -f
80 # CP    = cp -fv
81 # if you want to mark the target as MTSAFE you will need a tool for
82 # generating the xdc data for the linker; here's a minimal tool:
83 # http://www.gknw.net/development/prgtools/mkxdc.zip
84 MPKXDC  = mkxdc
85 AWK     = awk
86
87 # Global flags for all compilers
88 CFLAGS  = $(OPT) -D$(DB) -DNETWARE -DXP_NETWARE -nostdinc -DJK_NSAPI
89
90 ifeq ($(CC),mwccnlm)
91 LD      = mwldnlm
92 LDFLAGS = -nostdlib $(OBJS) $(PRELUDE) $(LDLIBS) -o $@ -commandfile
93 CFLAGS  += -gccinc -inline off -opt nointrinsics
94 #CFLAGS += -w on
95 ifeq ($(LIBARCH),LIBC)
96         PRELUDE = $(SDK_LIBC)/imports/libcpre.o
97         CFLAGS += -align 4 -inst mmx -proc 686
98 #       CFLAGS += -D__ANSIC__
99 else
100         PRELUDE = "$(METROWERKS)/Novell Support/libraries/runtime/prelude.obj"
101         LDLIBS = "$(METROWERKS)/Novell Support/libraries/runtime/mwcrtl.lib"
102 #       CFLAGS += -include "$(METROWERKS)/Novell Support/headers/nlm_prefix.h"
103         CFLAGS += -align 1 -proc 586
104 endif
105 else
106 LD      = nlmconv
107 LDFLAGS = -T
108 CFLAGS  += -fno-builtin -fpack-struct -fpcc-struct-return
109 CFLAGS  += -Wall -Wno-main # -pedantic
110 ifeq ($(LIBARCH),LIBC)
111         PRELUDE = $(SDK_LIBC)/imports/libcpre.gcc.o
112 #       CFLAGS += -D__ANSIC__
113 else
114         PRELUDE = $(SDK_CLIB)/imports/clibpre.gcc.o
115         CFLAGS += -include $(NDKBASE)/nlmconv/genlm.h
116 endif
117 endif
118
119 NDK_ROOT = $(NDKBASE)/ndk
120 SDK_CLIB = $(NDK_ROOT)/nwsdk
121 SDK_LIBC = $(NDK_ROOT)/libc
122 JKCOMMON = ../common
123
124 INCLUDES = -I$(NS_HOME)/include -I$(NS_HOME)/include/base
125 INCLUDES += -I$(JKCOMMON) -I$(NW_JDK)/include -I$(NW_JDK)/include/netware 
126
127 ifeq ($(LIBARCH),LIBC)
128         INCLUDES += -I$(SDK_LIBC)/include
129         INCLUDES += -I$(SDK_LIBC)/include/winsock
130 else
131         INCLUDES += -I$(SDK_CLIB)/include/nlm
132         # INCLUDES += -I$(NDKBASE)/ws295sdk/include
133         CFLAGS += -DNETDB_USE_INTERNET
134         CFLAGS += -DNO_GETTIMEOFDAY
135         CFLAGS += -DJK_PREFORK
136 endif
137 CFLAGS  += $(INCLUDES)
138
139 ifeq ($(MTSAFE),YES)
140         XDCDATA = $(OBJDIR)/$(TARGET).xdc
141 endif
142
143 ifeq ($(findstring linux,$(OSTYPE)),linux)
144 DL      = '
145 #-include $(NDKBASE)/nlmconv/ncpfs.inc
146 endif
147
148 OBJS    = \
149         $(OBJDIR)/jk_nsapi_plugin.o \
150         $(OBJDIR)/jk_nwmain.o \
151         $(OBJDIR)/jk_ajp12_worker.o \
152         $(OBJDIR)/jk_ajp13.o \
153         $(OBJDIR)/jk_ajp13_worker.o \
154         $(OBJDIR)/jk_ajp14.o \
155         $(OBJDIR)/jk_ajp14_worker.o \
156         $(OBJDIR)/jk_ajp_common.o \
157         $(OBJDIR)/jk_connect.o \
158         $(OBJDIR)/jk_context.o \
159         $(OBJDIR)/jk_jni_worker.o \
160         $(OBJDIR)/jk_lb_worker.o \
161         $(OBJDIR)/jk_map.o \
162         $(OBJDIR)/jk_md5.o \
163         $(OBJDIR)/jk_msg_buff.o \
164         $(OBJDIR)/jk_pool.o \
165         $(OBJDIR)/jk_shm.o \
166         $(OBJDIR)/jk_sockbuf.o \
167         $(OBJDIR)/jk_status.o \
168         $(OBJDIR)/jk_uri_worker_map.o \
169         $(OBJDIR)/jk_url.o \
170         $(OBJDIR)/jk_util.o \
171         $(OBJDIR)/jk_worker.o \
172         $(OBJDIR)/ap_snprintf.o
173
174 vpath %.c . $(JKCOMMON)
175
176
177 all: $(OBJDIR) $(OBJDIR)/version.inc $(OBJDIR)/$(TARGET).nlm 
178
179 $(OBJDIR)/%.o: %.c
180         @echo Compiling $<
181         @$(CC) $(CFLAGS) -c $< -o $@
182
183 $(OBJDIR)/version.inc: $(JKCOMMON)/jk_version.h $(OBJDIR)
184         @echo Creating $@
185         @$(AWK) -f ../../support/get_ver.awk $< > $@
186
187 dist: all
188         -$(RM) $(OBJDIR)/*.o $(OBJDIR)/$(TARGET).map $(OBJDIR)/$(TARGET).ncv
189         -$(RM) $(OBJDIR)/$(TARGET).def $(OBJDIR)/version.inc $(XDCDATA)
190 #       -$(CP) ../changes.txt $(OBJDIR)/
191
192 install: all
193         @[ -d $(INSTDIR) ] || mkdir $(INSTDIR)
194         @$(CP) $(TARGET).nlm $(INSTDIR)
195
196 clean:
197         -$(RM) -r $(OBJDIR)
198
199 $(OBJDIR):
200         @mkdir $(OBJDIR)
201
202 $(OBJDIR)/$(TARGET).nlm: $(OBJS) $(OBJDIR)/$(TARGET).def $(XDCDATA)
203         @echo Linking $@
204         @-$(RM) $@
205         @$(LD) $(LDFLAGS) $(OBJDIR)/$(TARGET).def
206
207 $(OBJDIR)/%.xdc: Makefile.netware
208         @echo Creating $@
209         @$(MPKXDC) $(XDCOPT) $@
210
211 $(OBJDIR)/%.def: Makefile.netware
212         @echo $(DL)# DEF file for linking with $(LD)$(DL) > $@
213         @echo $(DL)# Do not edit this file - it is created by make!$(DL) >> $@
214         @echo $(DL)# All your changes will be lost!!$(DL) >> $@
215         @echo $(DL)#$(DL) >> $@
216         @echo $(DL)copyright "$(COPYR)"$(DL) >> $@
217         @echo $(DL)description "$(DESCR)"$(DL) >> $@
218         @echo $(DL)version $(VERSION)$(DL) >> $@
219 ifdef NLMTYPE
220         @echo $(DL)type $(NLMTYPE)$(DL) >> $@
221 endif
222 ifdef STACK
223         @echo $(DL)stack $(STACK)$(DL) >> $@
224 endif
225 ifdef SCREEN
226         @echo $(DL)screenname "$(SCREEN)"$(DL) >> $@
227 else
228         @echo $(DL)screenname "DEFAULT"$(DL) >> $@
229 endif
230 ifeq ($(DB),DEBUG)
231         @echo $(DL)debug$(DL) >> $@
232 endif
233         @echo $(DL)threadname "$(TARGET)"$(DL) >> $@
234 ifdef XDCDATA
235         @echo $(DL)xdcdata $(XDCDATA)$(DL) >> $@
236 endif
237 ifeq ($(LIBARCH),CLIB)
238         @echo $(DL)start _Prelude$(DL) >> $@
239         @echo $(DL)exit _Stop$(DL) >> $@
240         @echo $(DL)import @$(NDK_ROOT)/nwsdk/imports/clib.imp$(DL) >> $@
241         @echo $(DL)import @$(NDK_ROOT)/nwsdk/imports/threads.imp$(DL) >> $@
242         @echo $(DL)import @$(NDK_ROOT)/nwsdk/imports/nlmlib.imp$(DL) >> $@
243         @echo $(DL)import @$(NDK_ROOT)/nwsdk/imports/socklib.imp$(DL) >> $@
244         @echo $(DL)module clib$(DL) >> $@
245 else
246 ifeq ($(LD),nlmconv)
247         @echo $(DL)flag_on 64$(DL) >> $@
248 else
249         @echo $(DL)autounload$(DL) >> $@
250 endif
251         @echo $(DL)pseudopreemption$(DL) >> $@
252         @echo $(DL)start _LibCPrelude$(DL) >> $@
253         @echo $(DL)exit _LibCPostlude$(DL) >> $@
254         @echo $(DL)check _LibCCheckUnload$(DL) >> $@
255         @echo $(DL)import @$(NDK_ROOT)/libc/imports/libc.imp$(DL) >> $@
256         @echo $(DL)import @$(NDK_ROOT)/libc/imports/netware.imp$(DL) >> $@
257         @echo $(DL)module libc$(DL) >> $@
258 endif
259 ifdef MODULES
260         @echo $(DL)module $(MODULES)$(DL) >> $@
261 endif
262 ifdef EXPORTS
263         @echo $(DL)export $(EXPORTS)$(DL) >> $@
264 endif
265 ifdef IMPORTS
266         @echo $(DL)import $(IMPORTS)$(DL) >> $@
267 endif
268 ifeq ($(LD),nlmconv)
269         @echo $(DL)input $(OBJS)$(DL) >> $@
270         @echo $(DL)input $(PRELUDE)$(DL) >> $@
271 ifdef LDLIBS
272         @echo $(DL)input $(LDLIBS)$(DL) >> $@
273 endif
274         @echo $(DL)output $*.nlm$(DL) >> $@
275 endif
276
277