Extra guidance for JAPH debuggers.
[p5sagit/p5-mst-13.2.git] / NetWare / Makefile
CommitLineData
2986a63f 1##
011f1a1a 2## Makefile to build Perl on NetWare using Microsoft NMAKE and CodeWarrior tools
2986a63f 3##
011f1a1a 4## This will build perl.nlm, perl.lib and extensions called NLMs
2986a63f 5##
6
7##
8## Please read README.netware before starting
9##
10
11##
12## Build configuration. Edit the values below to suit your needs.
13##
14
15## This file is created by using the makefile that creates Windows Perl as the reference
011f1a1a 16## Author:
17## Date Created: 25th March 2002
18## Date Modified:
2986a63f 19# Name of the NLM
011f1a1a 20
21
2986a63f 22NLM_NAME = perl.nlm
23NLM_NAME8 = Perl
24
25MAKE_ACTION = Build
26
27# Flags
28DBG_FLAG = -DDEBUGON
29
30NW_FLAGS = -DNETWARE -DNLM_PLATFORM -DNETDB_USE_INTERNET
31
32REL_DIR = Release
33DEB_DIR = Debug
34
011f1a1a 35
2986a63f 36!ifndef MAKE_TYPE
37#MAKE_TYPE = Release
38!message "Run bat\buildtype.bat to set the build type before continuing.\n"
39!error
40!endif #!ifndef MAKE_TYPE
41
42!ifdef USE_MPK
43MPKFLAGS = -DMPK_ON -DIAPX386
44MPKMESSAGE = MPK Build...
45XDCTOOL = mpkxdc
46!ifndef MPKBASE
47#MPKBASE = p:\mpk
48!message "Run bat\setnwbld.bat to set the NetWare MPK SDK before continuing.\n"
2986a63f 49!endif #ifndef MPKBASE
011f1a1a 50NLM_INCLUDE_MP = -I$(MPKBASE)\include
2986a63f 51MPKTOOL = $(MPKBASE)\$(XDCTOOL)
52!else
53MPKMESSAGE = Non MPK Build...
54NLM_INCLUDE_MP =
55MPKTOOL =
011f1a1a 56!endif #ifdef USE_MPK
57
58!ifndef NLM_VERSION
59NLM_VERSION = 3,20,0
60!endif
2986a63f 61
62!ifndef NLMSDKBASE
63#NLMSDKBASE = P:\ndk\nwsdk
64!message "Run bat\setnwbld.bat to set the NetWare SDK before continuing.\n"
65!error
011f1a1a 66!endif #ifndef NLMSDKBASE
67UCSINC = p:\apps\script\sw\ucs-inc
2986a63f 68NLMIMPORTS = $(NLMSDKBASE)\imports
69
011f1a1a 70!ifndef SECURITYBASE
71SECURITYBASE = P:\apps\script\sw\nwsec
72!message "Run bat\SetSecSdk.bat to set the Security paths before continuing.\n"
73#!error
74!endif #!ifndef MAKE_TYPE
75SECURITY_IMPORTS = $(SECURITYBASE)\imports
76
77 # Here comes the CW tools - TO BE FILLED TO BUILD WITH CW -
78MODULE_DESC = "Perl 5.7.3 for NetWare"
79CCTYPE = CodeWarrior
80C_COMPILER = mwccnlm -c
81CPP_COMPILER = mwccnlm
82LINK = mwldnlm
83LD = mwldnlm
84NLM_LIB = mwldnlm -type library
2986a63f 85TOOL_HEADERS =
86TOOL_PATH =
011f1a1a 87CWCPPFLAGS = -cpp_exceptions on -wchar_t off -bool on -w on -ansi off
88CCFLAGS = -maxerrors 25 -processor Pentium -align packed \
89 -w nounusedarg -msext on -sym on -sym codeview4 -sym internal \
90 -DN_PLAT_NLM -DNLM=1 -D__NO_MATH_OPS -msgstyle gcc
91COMPILER_FLAG = -d NETWARE
92ERROR_FLAG = -sym on -sym codeview4 -sym internal
93LDFLAGS = -type generic -stacksize 16384 -zerobss \
94 -nofail -msgstyle gcc -nostderr -w on \
95 -nlmversion $(NLM_VERSION) \
96 -copy "Copyright (C) 2000-01\, 2002 Novell\, Inc. All Rights Reserved." \
97 -sym on -sym codeview4 -sym internal -osym perl.sym
98
2986a63f 99# Debug flags comes here - Not mandatory - required only for debug build
100!if "$(MAKE_TYPE)"=="Debug"
101BLDDIR = $(DEB_DIR)
011f1a1a 102BLDMESG = Debug version,
2986a63f 103!ifdef USE_D2
011f1a1a 104BS_CFLAGS = -opt off -inline off -sym on -sym codeview4 -sym internal -DDEBUGGING -DDKFBPON
2986a63f 105BLDMESG = $(BLDMESG) Using /d2 option
011f1a1a 106##LDFLAGS = $(LDFLAGS) -sym on -sym codeview4 -sym internal -osym $(BLDDIR)\$*.sym
107LDFLAGS = $(LDFLAGS) -sym on -sym codeview4 -sym internal
108## -osym $(BLDDIR)\$(NLM_NAME8).sym
2986a63f 109!else
011f1a1a 110BS_CFLAGS = -opt off -inline off -sym on -sym codeview4 -sym internal -DDEBUGGING -DDKFBPON
2986a63f 111BLDMESG = $(BLDMESG) Using /d1 option
011f1a1a 112##LDFLAGS = $(LDFLAGS) -sym on -sym codeview4 -sym internal -osym $(BLDDIR)\$*.sym
113LDFLAGS = $(LDFLAGS) -sym on -sym codeview4 -sym internal
114## -osym $(BLDDIR)\$(NLM_NAME8).sym
115!endif #!ifdef USE_D2
116!else
2986a63f 117BLDDIR = $(REL_DIR)
118BLDMESG = Release version
011f1a1a 119##BS_CFLAGS = -opt speed -inline smart -inline auto -sym off
2986a63f 120BS_CFLAGS =
011f1a1a 121!endif #if "$(MAKE_TYPE)"=="Debug" #!ifdef CODEWARRIOR
2986a63f 122
123ADD_LOCDEFS = -DPERL_CORE
124
125NLM_INCLUDE = -I$(NLMSDKBASE)\include
126NLM_INCLUDE_NLM = -I$(NLMSDKBASE)\include\nlm
127NLM_INCLUDE_NLM_SYS = -I$(NLMSDKBASE)\include\nlm\sys
011f1a1a 128NLM_INCLUDE_OBSLETE = -I$(NLMSDKBASE)\include\nlm\obsolete
129# SECURITY_INCLUDE = -I$(SECURITYBASE)\include
130NLM_INCLUDE_UCS = -I$(UCSINC)
131!if "$(NW_EXTNS)"=="yes"
2986a63f 132INCLUDE_NW = -I.\include
011f1a1a 133!endif
2986a63f 134INC_PREV = -I..
011f1a1a 135INC_THIS = -I.
2986a63f 136
011f1a1a 137NLM_INCLUDE_PATH = $(NLM_INCLUDE) $(NLM_INCLUDE_NLM) $(NLM_INCLUDE_NLM_SYS) $(NLM_INCLUDE_OBSLETE) \
138 $(NLM_INCLUDE_MP) $(NLM_INCLUDE_UCS) $(TOOL_HEADERS)
139INCLUDE = $(INC_THIS) $(INC_PREV) -I- $(NLM_INCLUDE_PATH)
2986a63f 140
141PATH = $(PATH);$(TOOL_PATH)
142
011f1a1a 143NLM_INCLUDES = -I$(COREDIR) $(INCLUDE_NW)
144
145CCFLAGS = $(CCFLAGS) $(INCLUDE)
2986a63f 146
011f1a1a 147COMPLER_FLAGS = $(BS_CFLAGS) $(ADD_BUILDOPT) $(NW_FLAGS) $(COMPILER_FLAG) $(MPKFLAGS) $(CCFLAGS)
148
2986a63f 149
150# Source file list
151NW_H_FILES = \
152 .\iperlhost.h \
153 .\interface.h \
154 .\netware.h \
155 .\nw5iop.h \
156 .\nw5sck.h \
157 .\nwpipe.h \
158 .\nwplglob.h \
159 .\nwtinfo.h \
160 .\nwutil.h \
011f1a1a 161 .\nwhashcls.h \
2986a63f 162
163NW_HOST_H_FILES = \
164 .\iperlhost.h \
165 .\interface.h \
166 .\netware.h \
167 .\nw5sck.h \
011f1a1a 168 .\nwperlhost.h \
169
2986a63f 170
171CLIB_H_FILES = \
172 .\clibsdio.h \
173 .\clibstr.h \
174 .\clibstuf.h \
175 .\stdio.h \
176 .\string.h \
177
178NW_SRC = \
179 .\CLIBstuf.c \
180 .\nw5.c \
181 .\nw5sck.c \
182 .\nw5thread.c \
183 .\nwmain.c \
184 .\nwpipe.c \
185 .\nwplglob.c \
186 .\nwtinfo.c \
187 .\nwutil.c \
188
011f1a1a 189NW_CPP_SRC = \
190 .\nwhashcls.cpp \
191 .\interface.cpp \
192 .\perllib.cpp \
193
2986a63f 194EXT_MAIN_SRC = \
195 .\Main.c \
196
197PERL_IO_SRC = \
198 ..\perlio.c
199
011f1a1a 200CLIBSTUF_OBJ = \
201 .\CLIBstuf.obj
2986a63f 202
011f1a1a 203#PERL_TMP_OBJ = $(PERL_TEMP_SRC:.c=.obj)
2986a63f 204NW_SRC_OBJ = $(NW_SRC:.c=.obj)
011f1a1a 205NW_CPP_SRC_OBJ = $(NW_CPP_SRC:.cpp=.obj)
2986a63f 206NLM_MICROCORE_OBJ = $(MICROCORE_SRC:.c=.obj)
207PERL_LIB_OBJ = $(PERL_LIB_SRC:.c=.obj)
208PERL_IO_OBJ = $(PERL_IO_SRC:.c=.obj)
209NLM_CORE_OBJ = $(NLM_MICROCORE_OBJ)
210EXT_MAIN_OBJ = $(EXT_MAIN_SRC:.c=.obj)
211
212# For dependency checking
213# $(BLDDIR) in place of Release or Debug is not working, should look into this - sgp
011f1a1a 214!if "$(BLDDIR)"=="Release"
2986a63f 215NLM_OBJ = $(NLM_CORE_OBJ:..\=.\Release\)
216NEWTARE_OBJ_DEP = $(NW_SRC_OBJ:.\=.\Release\)
011f1a1a 217NEWTARE_CPP_OBJ_DEP = $(NW_CPP_SRC_OBJ:.\=.\Release\)
2986a63f 218PERL_LIB_OBJ_DEP = $(PERL_LIB_OBJ:.\=.\Release\)
219PERL_IO_OBJ_DEP = $(PERL_IO_OBJ:..\=.\Release\)
220!else
221NLM_OBJ = $(NLM_CORE_OBJ:..\=.\Debug\)
222NEWTARE_OBJ_DEP = $(NW_SRC_OBJ:.\=.\Debug\)
011f1a1a 223NEWTARE_CPP_OBJ_DEP = $(NW_CPP_SRC_OBJ:.\=.\Debug\)
2986a63f 224PERL_LIB_OBJ_DEP = $(PERL_LIB_OBJ:.\=.\Debug\)
225PERL_IO_OBJ_DEP = $(PERL_IO_OBJ:..\=.\Debug\)
226!endif
227
228# Symbol base_import & version added for NETWARE
229NW_CFG_VARS = \
230 "INST_DRV=$(INST_DRV)" \
231 "INST_TOP=$(INST_TOP)" \
232 "INST_VER=$(INST_VER)" \
233 "INST_ARCH=$(INST_ARCH)" \
234 "INST_NW_TOP1=$(INST_NW_TOP1)" \
235 "INST_NW_TOP2=$(INST_NW_TOP2)" \
236 "INST_NW_VER=$(INST_NW_VER)" \
237 "archname=$(ARCHNAME)" \
238 "cc=$(C_COMPILER)" \
011f1a1a 239 "ar=$(LINK)" \
2986a63f 240 "ccflags=$(COMPLER_FLAGS)" \
241 "cf_email=$(EMAIL)" \
242 "d_crypt=$(D_CRYPT)" \
243 "d_mymalloc=$(PERL_MALLOC)" \
244# "libs=$(LIBFILES)" \
245 "incpath=$(NLM_INCLUDE_PATH)" \
246 "libperl=$(PERLIMPLIB:..\=)" \
247 "libpth=$(LIBPATH)" \
248# "libc=$(LIBC)" \
249 "make=nmake" \
250 "static_ext=$(STATIC_EXT)" \
251 "dynamic_ext=$(DYNAMIC_EXT)" \
252 "nonxs_ext=$(NONXS_EXT)" \
253 "use5005threads=$(USE_5005THREADS)" \
254 "useithreads=$(USE_ITHREADS)" \
255 "usethreads=$(USE_5005THREADS)" \
256 "usemultiplicity=$(USE_MULTI)" \
011f1a1a 257 "ld=$(LINK)" \
2986a63f 258 "base_import=$(BASE_IMPORT_FILES)" \
259 "LINK_FLAGS=$(LINK_FLAGS:"=\")" \
260 "optimize=" \
2986a63f 261 "d_stdio_cnt_lval=undef" \
262 "d_stdio_ptr_lval=undef" \
263 "d_stdiobase=undef" \
264 "d_stdstdio=undef" \
011f1a1a 265 "d_times=undef" \
2986a63f 266 "direntrytype=DIR" \
267 "nlm_version=$(NLM_VERSION)" \
268 "d_archname=NetWare" \
269 "mpktool=$(MPKTOOL) $(XDCFLAGS)" \
270 "toolpath=$(TOOL_PATH)"
271
272
273NW_CFGSH_TMPL = config.wc
274NW_CFGH_TMPL = config_H.wc
275
011f1a1a 276SOCKET_NLM = $(AUTODIR)\Socket\Socket.NLM
277FCNTL_NLM = $(AUTODIR)\Fcntl\Fcntl.NLM
278IO_NLM = $(AUTODIR)\IO\IO.NLM
279OPCODE_NLM = $(AUTODIR)\Opcode\Opcode.NLM
280SDBM_FILE_NLM = $(AUTODIR)\SDBM_File\SDBM_File.NLM
281POSIX_NLM = $(AUTODIR)\POSIX\POSIX.NLM
282ATTRS_NLM = $(AUTODIR)\attrs\attrs.NLM
283THREAD_NLM = $(AUTODIR)\Thread\Thread.NLM
284B_NLM = $(AUTODIR)\B\B.NLM
285DUMPER_NLM = $(AUTODIR)\Data\Dumper\Dumper.NLM
286PEEK_NLM = $(AUTODIR)\Devel\Peek\Peek.NLM
287RE_NLM = $(AUTODIR)\re\re.NLM
288BYTELOADER_NLM = $(AUTODIR)\ByteLoader\ByteLoader.NLM
289DPROF_NLM = $(AUTODIR)\Devel\DProf\DProf.NLM
290GLOB_NLM = $(AUTODIR)\File\Glob\Glob.NLM
291HOSTNAME_NLM = $(AUTODIR)\Sys\Hostname\Hostname.NLM
292CWD_NLM = $(EXTDIR)\Cwd\Cwd.NLM
293STORABLE_NLM = $(EXTDIR)\Storable\Storable.NLM
294LISTUTIL_NLM = $(EXTDIR)\List\Util.NLM
295MIMEBASE64_NLM = $(EXTDIR)\MIME\Base64\Base64.NLM
296XSTYPEMAP_NLM = $(EXTDIR)\XS\Typemap\Typemap.NLM
297UNICODENORMALIZE_NLM = $(EXTDIR)\Unicode\Normalize\Normalize.NLM
298
299EXTENSION_NLM = \
300 $(SDBM_FILE_NLM) \
301 $(POSIX_NLM) \
302 $(THREAD_NLM) \
303 $(DUMPER_NLM) \
304 $(GLOB_NLM) \
305 $(PEEK_NLM) \
306 $(RE_NLM) \
307 $(DPROF_NLM) \
308 $(HOSTNAME_NLM) \
309 $(CWD_NLM) \
310 $(STORABLE_NLM) \
311 $(LISTUTIL_NLM) \
312 $(MIMEBASE64_NLM) \
313 $(XSTYPEMAP_NLM) \
314 $(FCNTL_NLM) \
315 $(SOCKET_NLM) \
316 $(OPCODE_NLM) \
317 $(B_NLM) \
318 $(ATTRS_NLM) \
319 $(BYTELOADER_NLM) \
320 $(IO_NLM) \
321 $(UNICODENORMALIZE_NLM)
322
323# Begin - Following is required to build NetWare specific extensions CGI2Perl, Perl2UCS and UCSExt
324
325CGI2PERL = CGI2Perl\CGI2Perl
326PERL2UCS = $(EXTDIR)\Perl2UCS\Perl2UCS
327UCSExt = $(EXTDIR)\Perl2UCS\UCSExt
328
329CGI2PERL_NLM = \CGI2Perl\CGI2Perl.NLM
330PERL2UCS_NLM = $(AUTODIR)\Perl2UCS\Perl2UCS.NLM
331UCSExt_NLM = $(AUTODIR)\UCSExt\UCSExt.NLM
2986a63f 332
333NETWARE_EXTNS = \
011f1a1a 334 $(CGI2PERL_NLM) \
335 $(UCSExt_NLM) \
336 $(PERL2UCS_NLM) \
2986a63f 337
2986a63f 338
011f1a1a 339# End
4d76e4b4 340
2986a63f 341ECHO_SRC = TestNLM\echo\echo.c
342TYPE_SRC = TestNLM\type\type.c
343ECHO_SRC_OBJ = $(ECHO_SRC:.c=.obj)
344TYPE_SRC_OBJ = $(TYPE_SRC:.c=.obj)
345ECHO_NLM = TestNLM\echo\echo.nlm
346TYPE_NLM = TestNLM\type\type.nlm
347
348TEST_NLMS = \
349 $(ECHO_NLM) \
350 $(TYPE_NLM) \
351
2986a63f 352
353!ifndef SCREEN
354SCREEN = 'none'
355!endif
356
357!ifndef NLM_DESCRIPTION
011f1a1a 358NLM_DESCRIPTION = $(NLM_NAME8) for NetWare
2986a63f 359!endif
360
361!ifndef NLM_VERSION
011f1a1a 362NLM_VERSION = 3.1.0
2986a63f 363!endif
364
365!ifndef NLM_EXT
011f1a1a 366NLM_EXT = NLM
2986a63f 367!endif
368
369!ifndef BUILT
370BUILT = $(BLDDIR)\$(NLM_NAME8).$(NLM_EXT)
371!endif
372
373!ifndef BASE_IMPORT_FILES
011f1a1a 374BASE_IMPORT_FILES = Import @$(NLMIMPORTS)\clib.imp, @$(NLMIMPORTS)\nlmlib.imp, @$(NLMIMPORTS)\threads.imp, @$(NLMIMPORTS)\nit.imp, @$(NLMIMPORTS)\socklib.imp, \
375@$(NLMIMPORTS)\fpsm.imp, @$(NLMIMPORTS)\lib0.imp, @$(SECURITY_IMPORTS)\nwsec.imp
2986a63f 376!endif
377
378!ifdef USE_MPK
379BASE_IMPORT_FILES = $(BASE_IMPORT_FILES), @$(MPKBASE)\import\mpkorg.imp
380!endif
381
382!ifndef BASE_IMPORT_FNS
383BASE_IMPORT_FNS = Import ImportSymbol, GetSystemConsoleScreen, LoadModule
384!endif
011f1a1a 385
386
2986a63f 387!ifndef BASE_LIBRARIES
011f1a1a 388#!ifdef WATCOM
389#BASE_LIBRARIES = Library plib3s.lib,math3s.lib,clib3s.lib
390#!else
391!ifdef CODEWAR
2986a63f 392BASE_LIBRARIES =
393!endif #!ifdef CODEWARRIOR
011f1a1a 394!endif
395
396COPYRIGHT = (C) Copyright 2002 Novell Inc. All Rights Reserved.
2986a63f 397
398EXPORTS = Export @perl.imp
399
400#
401# Set these to wherever you want "nmake install" to put your
402# newly built perl.
403#
011f1a1a 404INST_DRV = C:
2986a63f 405INST_TOP = $(INST_DRV)\perl
406
407INST_NW_DRV = i:
408INST_NW_VOL = sys:
409INST_NW_TOP1 = $(INST_NW_VOL)\perl
410INST_NW_TOP2 = $(INST_NW_DRV)\perl
411#INST_NW_VER = \5.6.1
412
413#
414# Comment this out if you DON'T want your perl installation to be versioned.
415# This means that the new installation will overwrite any files from the
416# old installation at the same INST_TOP location. Leaving it enabled is
417# the safest route, as perl adds the extra version directory to all the
418# locations it installs files to. If you disable it, an alternative
419# versioned installation can be obtained by setting INST_TOP above to a
420# path that includes an arbitrary version string.
421#
011f1a1a 422INST_VER = \5.7.2
2986a63f 423
424#
425# Comment this out if you DON'T want your perl installation to have
426# architecture specific components. This means that architecture-
427# specific files will be installed along with the architecture-neutral
428# files. Leaving it enabled is safer and more flexible, in case you
429# want to build multiple flavors of perl and install them together in
430# the same location. Commenting it out gives you a simpler
431# installation that is easier to understand for beginners.
432#
433INST_ARCH = \$(ARCHNAME)
434
435#
436# uncomment to enable multiple interpreters. This is need for fork()
437# emulation.
438#
011f1a1a 439
2986a63f 440USE_MULTI = define
441
442#
443# Beginnings of interpreter cloning/threads; still very incomplete.
444# This should be enabled to get the fork() emulation. This needs
445# USE_MULTI as well.
446#
447USE_ITHREADS = define
448
449#
450# uncomment to enable the implicit "host" layer for all system calls
451# made by perl. This needs USE_MULTI above. This is also needed to
452# get fork().
453#
454USE_IMP_SYS = define
455
456# uncomment this to enable the experimental PerlIO I/O subsystem
457# else USE_STDIO will be defined.
458#USE_PERLIO = define
459#USE_STDIO = define
2986a63f 460#
461# WARNING! This option is deprecated and will eventually go away (enable
462# USE_ITHREADS instead).
463#
464# uncomment to enable threads-capabilities. This is incompatible with
465# USE_ITHREADS, and is only here for people who may have come to rely
466# on the experimental Thread support that was in 5.005.
467#
468#USE_5005THREADS= define
469
2986a63f 470# For now let this be here
471#
472#CRYPT_SRC = fcrypt.c
473
474# For now let this be here
475#
476#CRYPT_LIB = fcrypt.lib
477
478#
479# set this if you wish to use perl's malloc
480# WARNING: Turning this on/off WILL break binary compatibility with extensions
481# you may have compiled with/without it. Be prepared to recompile all
482# extensions if you change the default. Currently, this cannot be enabled
483# if you ask for USE_IMP_SYS above.
484#
485#PERL_MALLOC = define
486
487#
488# set this to your email address (perl will guess a value from
489# from your loginname and your hostname, which may not be right)
490#
491#EMAIL =
492
493##
494## Build configuration ends.
495##
496
497##################### CHANGE THESE ONLY IF YOU MUST #####################
498
499!IF "$(CRYPT_SRC)$(CRYPT_LIB)" == ""
500D_CRYPT = undef
501!ELSE
502D_CRYPT = define
503CRYPT_FLAG = -DHAVE_DES_FCRYPT
504!ENDIF
505
2986a63f 506!IF "$(PERL_MALLOC)" == ""
507PERL_MALLOC = undef
508!ENDIF
509
510!IF "$(USE_5005THREADS)" == ""
511USE_5005THREADS = undef
512!ENDIF
513
514!IF "$(USE_5005THREADS)" == "define"
515USE_ITHREADS = undef
516!ENDIF
517
518!IF "$(USE_IMP_SYS)" == "define"
519PERL_MALLOC = undef
520!ENDIF
521
522!IF "$(USE_MULTI)" == ""
523USE_MULTI = undef
524!ENDIF
525
2986a63f 526!IF "$(USE_ITHREADS)" == ""
527USE_ITHREADS = undef
528!ENDIF
529
530!IF "$(USE_IMP_SYS)" == ""
531USE_IMP_SYS = undef
532!ENDIF
533
534!IF "$(USE_PERLCRT)" == ""
535USE_PERLCRT = undef
536!ENDIF
537
acfe0abc 538!IF "$(USE_IMP_SYS)$(USE_MULTI)$(USE_5005THREADS)" == "defineundefundef"
2986a63f 539USE_MULTI = define
540!ENDIF
541
acfe0abc 542!IF "$(USE_ITHREADS)$(USE_MULTI)" == "defineundef"
2986a63f 543USE_MULTI = define
544USE_5005THREADS = undef
545!ENDIF
546
acfe0abc 547!IF "$(USE_MULTI)$(USE_5005THREADS)" != "undefundef"
2986a63f 548BUILDOPT = $(BUILDOPT) -DPERL_IMPLICIT_CONTEXT
549!ENDIF
550
551!IF "$(USE_IMP_SYS)" != "undef"
552BUILDOPT = $(BUILDOPT) -DPERL_IMPLICIT_SYS
553!ENDIF
554
555!IF "$(PROCESSOR_ARCHITECTURE)" == ""
556PROCESSOR_ARCHITECTURE = x86
557!ENDIF
558
2986a63f 559!IF "$(USE_5005THREADS)" == "define"
560ARCHNAME = NetWare-$(PROCESSOR_ARCHITECTURE)-thread
561!ELSE
562!IF "$(USE_MULTI)" == "define"
563ARCHNAME = NetWare-$(PROCESSOR_ARCHITECTURE)-multi
564!ELSE
565ARCHNAME = NetWare-$(PROCESSOR_ARCHITECTURE)
566!ENDIF
567!ENDIF
2986a63f 568
acfe0abc 569!IF "$(USE_MULTI)$(USE_5005THREADS)" != "undefundef"
2986a63f 570ADD_BUILDOPT = $(ADD_BUILDOPT) -DPERL_IMPLICIT_CONTEXT
571!ENDIF
572
573!IF "$(USE_IMP_SYS)" != "undef"
574ADD_BUILDOPT = $(ADD_BUILDOPT) -DPERL_IMPLICIT_SYS
575!ENDIF
576
577!IF "$(USE_ITHREADS)" == "define"
578ARCHNAME = $(ARCHNAME)-thread
579!ENDIF
580
581!IF "$(USE_PERLIO)" == "define"
582USE_STDIO = undef
583ADD_BUILDOPT = $(ADD_BUILDOPT) -DUSE_PERLIO
584ARCHNAME = $(ARCHNAME)-perlio
585!ELSE
586#USE_STDIO = define
587#ADD_BUILDOPT = $(ADD_BUILDOPT) -DUSE_STDIO
588!ENDIF
589
011f1a1a 590
2986a63f 591ARCHDIR = ..\lib\$(ARCHNAME)
592COREDIR = ..\lib\CORE
593AUTODIR = ..\lib\auto
594LIBDIR = ..\lib
595EXTDIR = ..\ext
596PODDIR = ..\pod
597EXTUTILSDIR = $(LIBDIR)\ExtUtils
598
599#
600INST_SCRIPT = $(INST_TOP)$(INST_VER)\bin
601INST_BIN = $(INST_SCRIPT)$(INST_ARCH)
602INST_LIB = $(INST_TOP)$(INST_VER)\lib
603INST_ARCHLIB = $(INST_LIB)$(INST_ARCH)
604INST_COREDIR = $(INST_ARCHLIB)\CORE
605INST_POD = $(INST_LIB)\pod
606INST_HTML = $(INST_POD)\html
607
608#
609# Options
610#
611
2986a63f 612OBJOUT_FLAG = -Fo
613EXEOUT_FLAG = -Fe
614
615
616#################### do not edit below this line #######################
617############# NO USER-SERVICEABLE PARTS BEYOND THIS POINT ##############
618
619o = .obj
620
621#
622# Rules
623#
624
011f1a1a 625.SUFFIXES : .c $(o) .nlm .lib .NLM
2986a63f 626
627
628#
629# various targets
630PERLIMPLIB = ..\perl.lib
631
632MINIPERL = ..\miniperl.exe
633CONFIGPM = ..\lib\Config.pm
634MINIMOD = ..\lib\ExtUtils\Miniperl.pm
635X2P = ..\x2p\a2p.nlm
636
637PL2BAT = ..\win32\bin\pl2bat.pl
638
639UTILS = \
640 ..\utils\h2ph \
641 ..\utils\splain \
642 ..\utils\dprofpp \
643 ..\utils\perlbug \
644 ..\utils\pl2pm \
645 ..\utils\c2ph \
646 ..\utils\h2xs \
647 ..\utils\perldoc \
648 ..\utils\perlcc \
649 ..\pod\checkpods \
650 ..\pod\pod2html \
651 ..\pod\pod2latex \
652 ..\pod\pod2man \
653 ..\pod\pod2text \
654 ..\pod\pod2usage \
655 ..\pod\podchecker \
656 ..\pod\podselect \
657 ..\x2p\find2perl \
658 ..\x2p\s2p
659
660MAKE = nmake -nologo
011f1a1a 661#NMAKE = $(C_COMPILER) $(INCLUDE) $(NLM_INCLUDES) $(COMPLER_FLAGS) $(ADD_LOCDEFS) $(ERROR_FLAG) $(*F).c -o $@
2986a63f 662
663XCOPY = xcopy /f /r /i /d
664RCOPY = xcopy /f /r /i /e /d
665NOOP = @echo
666NULL =
667
668#
669# filenames given to xsubpp must have forward slashes (since it puts
670# full pathnames in #line strings)
671XSUBPP = ..\$(MINIPERL) -I..\..\lib ..\$(EXTUTILSDIR)\xsubpp \
672 -C++ -prototypes
673
674MICROCORE_SRC = \
225a5dca 675 ..\av.c \
676 ..\deb.c \
677 ..\doio.c \
678 ..\doop.c \
679 ..\dump.c \
2986a63f 680 ..\globals.c \
225a5dca 681 ..\gv.c \
682 ..\hv.c \
683 ..\locale.c \
684 ..\mg.c \
625b117d 685 ..\numeric.c \
225a5dca 686 ..\op.c \
687 ..\perl.c \
2986a63f 688 ..\perlapi.c \
225a5dca 689 ..\perly.c \
690 ..\pp.c \
691 ..\pp_ctl.c \
692 ..\pp_hot.c \
625b117d 693 ..\pp_pack.c \
84d4ea48 694 ..\pp_sort.c \
225a5dca 695 ..\pp_sys.c \
10bc17b6 696 ..\reentr.c \
2986a63f 697 ..\regcomp.c \
698 ..\regexec.c \
225a5dca 699 ..\run.c \
700 ..\scope.c \
701 ..\sv.c \
702 ..\taint.c \
703 ..\toke.c \
2986a63f 704 ..\universal.c \
225a5dca 705 ..\utf8.c \
706 ..\util.c \
2986a63f 707 ..\xsutils.c
708
709#EXTRACORE_SRC = $(EXTRACORE_SRC) perllib.c
710
711!IF "$(PERL_MALLOC)" == "define"
712EXTRACORE_SRC = $(EXTRACORE_SRC) ..\malloc.c
713!ENDIF
714
2986a63f 715#EXTRACORE_SRC = $(EXTRACORE_SRC) ..\perlio.c
2986a63f 716
717!IF "$(CRYPT_SRC)" != ""
718NW_SRC = $(NW_SRC) .\$(CRYPT_SRC)
719!ENDIF
720
721DLL_SRC = $(DYNALOADER).c
722
723X2P_SRC = \
724 ..\x2p\a2p.c \
725 ..\x2p\hash.c \
726 ..\x2p\str.c \
727 ..\x2p\util.c \
728 ..\x2p\walk.c
729
730CORE_NOCFG_H = \
731 ..\av.h \
732 ..\cop.h \
733 ..\cv.h \
734 ..\dosish.h \
735 ..\embed.h \
736 ..\form.h \
737 ..\gv.h \
738 ..\handy.h \
739 ..\hv.h \
740 ..\iperlsys.h \
741 ..\mg.h \
742 ..\nostdio.h \
743 ..\op.h \
744 ..\opcode.h \
745 ..\perl.h \
746 ..\perlapi.h \
747 ..\perlsdio.h \
748 ..\perlsfio.h \
749 ..\perly.h \
750 ..\pp.h \
751 ..\proto.h \
752 ..\regexp.h \
753 ..\scope.h \
754 ..\sv.h \
755 ..\thread.h \
756 ..\unixish.h \
757 ..\utf8.h \
758 ..\util.h \
759 ..\warnings.h \
760 ..\XSUB.h \
761 ..\EXTERN.h \
762 ..\perlvars.h \
763 ..\intrpvar.h \
011f1a1a 764 ..\thrdvar.h
765
2986a63f 766CORE_H = $(CORE_NOCFG_H) .\config.h
767
768DLL_OBJ = $(DLL_SRC:.c=.obj)
769X2P_OBJ = $(X2P_SRC:.c=.obj)
770
771DYNAMIC_EXT = Socket IO Fcntl Opcode SDBM_File POSIX attrs Thread B re \
8dbfbba0 772 Data/Dumper Devel/Peek ByteLoader Devel/DProf File/Glob \
ac5ea531 773 Storable/Storable List/Util MIME/Base64/Base64 \
4d76e4b4 774 XS/Typemap/Typemap Unicode/Normalize/Normalize Sys/Hostname
57e69e5f 775
2986a63f 776STATIC_EXT = DynaLoader
777NONXS_EXT = Errno
778
011f1a1a 779DYNALOADER = $(EXTDIR)\DynaLoader\DynaLoader
780SOCKET = $(EXTDIR)\Socket\Socket
781FCNTL = $(EXTDIR)\Fcntl\Fcntl
782OPCODE = $(EXTDIR)\Opcode\Opcode
783SDBM_FILE = $(EXTDIR)\SDBM_File\SDBM_File
2986a63f 784IO = $(EXTDIR)\IO\IO
011f1a1a 785POSIX = $(EXTDIR)\POSIX\POSIX
786ATTRS = $(EXTDIR)\attrs\attrs
787THREAD = $(EXTDIR)\Thread\Thread
2986a63f 788B = $(EXTDIR)\B\B
789RE = $(EXTDIR)\re\re
011f1a1a 790DUMPER = $(EXTDIR)\Data\Dumper\Dumper
791ERRNO = $(EXTDIR)\Errno\Errno
792PEEK = $(EXTDIR)\Devel\Peek\Peek
793BYTELOADER = $(EXTDIR)\ByteLoader\ByteLoader
794DPROF = $(EXTDIR)\Devel\DProf\DProf
795GLOB = $(EXTDIR)\File\Glob\Glob
796HOSTNAME = $(EXTDIR)\Sys\Hostname\Hostname
225a5dca 797CWD = $(EXTDIR)\Cwd\Cwd
ac5ea531 798STORABLE = $(EXTDIR)\Storable\Storable
799LISTUTIL = $(EXTDIR)\List\Util
800MIMEBASE64 = $(EXTDIR)\MIME\Base64\Base64
801XSTYPEMAP = $(EXTDIR)\XS\Typemap\Typemap
802UNICODENORMALIZE = $(EXTDIR)\Unicode\Normalize\Normalize
2986a63f 803
57e69e5f 804ERRNO_PM_NW = $(LIBDIR)\Errno.pm
805
011f1a1a 806EXTENSION_C = \
2986a63f 807 $(SOCKET).c \
808 $(FCNTL).c \
809 $(OPCODE).c \
810 $(SDBM_FILE).c \
811 $(IO).c \
812 $(POSIX).c \
813 $(ATTRS).c \
814 $(THREAD).c \
815 $(RE).c \
816 $(DUMPER).c \
817 $(PEEK).c \
818 $(B).c \
819 $(BYTELOADER).c \
820 $(DPROF).c \
225a5dca 821 $(GLOB).c \
57e69e5f 822 $(HOSTNAME).c \
225a5dca 823 $(CWD).c \
824 $(STORABLE).c \
825 $(LISTUTIL).c \
826 $(MIMEBASE64).c \
827 $(XSTYPEMAP).c \
ac5ea531 828 $(UNICODENORMALIZE).c \
2986a63f 829
57e69e5f 830EXTENSION_NPM = \
831 $(ERRNO_PM_NW) \
832
2986a63f 833POD2HTML = $(PODDIR)\pod2html
834POD2MAN = $(PODDIR)\pod2man
835POD2LATEX = $(PODDIR)\pod2latex
836POD2TEXT = $(PODDIR)\pod2text
837
838#
839# Top targets
840#
841
011f1a1a 842all : .cleanoldfiles .\nwconfig.h $(CONFIGPM) $(NLM_NAME) $(EXTENSION_NPM) $(NETWARE_EXTNS) $(TEST_NLMS) $(EXTENSION_NLM)
2986a63f 843
844#------------------------------------------------------------
845
846..\config.sh : config.nw5 $(MINIPERL) config_sh.PL
847 $(MINIPERL) -I..\lib config_sh.PL $(NW_CFG_VARS) config.nw5 > ..\config.sh
848
849# this target is for when changes to the main config.sh happen
850# edit config.{b,v,g,w}c and make this target once for each supported
851# compiler (e.g. `dmake CCTYPE=BORLAND regen_config_h`)
852regen_config_h:
853 perl config_sh.PL $(NW_CFG_VARS) $(NW_CFGSH_TMPL) > ..\config.sh
854 cd ..
41504350 855 -del /f /q perl.exe
2986a63f 856 perl configpm
857 cd netware
41504350 858 -del /f /q $(NW_CFGH_TMPL)
2986a63f 859 -mkdir $(COREDIR)
860 -perl -I..\lib config_h.PL "INST_VER=$(INST_VER)"
861 rename config.h $(NW_CFGH_TMPL)
862
863$(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl
864 cd .. && miniperl configpm
865 if exist lib\* $(RCOPY) lib\*.* ..\lib\$(NULL)
866 $(XCOPY) ..\*.h $(COREDIR)\*.*
867 $(XCOPY) *.h $(COREDIR)\*.*
868 $(XCOPY) ..\ext\re\re.pm $(LIBDIR)\*.*
869 if exist include\* $(RCOPY) include $(COREDIR)\*.*
870 $(MINIPERL) -I..\lib config_h.PL "INST_VER=$(INST_VER)" \
871 || $(MAKE) /$(MAKEFLAGS) $(CONFIGPM)
872
873$(MINIPERL) :
874 $(error)Please build $(MINIPERL) before continuing
875
876$(MINIMOD) : $(MINIPERL) ..\minimod.pl
877 cd .. && miniperl minimod.pl > lib\ExtUtils\Miniperl.pm
878
879..\x2p\a2p$(o) : ..\x2p\a2p.c
880 @echo $(MPKMESSAGE)...$(BLDMESG)...$@
011f1a1a 881 $(C_COMPILER) $(COMPLER_FLAGS) $(NLM_INCLUDES) -I..\x2p $(ADD_LOCDEFS) $(ERROR_FLAG) $*.c -o $@
882 @echo Built $(@)
883
2986a63f 884..\x2p\hash$(o) : ..\x2p\hash.c
885 @echo $(MPKMESSAGE)...$(BLDMESG)...$@
011f1a1a 886 $(C_COMPILER) $(COMPLER_FLAGS) $(NLM_INCLUDES) -I..\x2p $(ADD_LOCDEFS) $(ERROR_FLAG) $*.c -o $@
887 @echo Built $(@)
888
2986a63f 889..\x2p\str$(o) : ..\x2p\str.c
890 @echo $(MPKMESSAGE)...$(BLDMESG)...$@
011f1a1a 891 $(C_COMPILER) $(COMPLER_FLAGS) $(NLM_INCLUDES) -I..\x2p $(ADD_LOCDEFS) $(ERROR_FLAG) $*.c -o $@
892 @echo Built $(@)
2986a63f 893
894..\x2p\util$(o) : ..\x2p\util.c
895 @echo $(MPKMESSAGE)...$(BLDMESG)...$@
011f1a1a 896 $(C_COMPILER) $(COMPLER_FLAGS) $(NLM_INCLUDES) -I..\x2p $(ADD_LOCDEFS) $(ERROR_FLAG) $*.c -o $@
897 @echo Built $(@)
2986a63f 898
899..\x2p\walk$(o) : ..\x2p\walk.c
900 @echo $(MPKMESSAGE)...$(BLDMESG)...$@
011f1a1a 901 $(C_COMPILER) $(COMPLER_FLAGS) $(NLM_INCLUDES) -I..\x2p $(ADD_LOCDEFS) $(ERROR_FLAG) $*.c -o $@
902 @echo Built $(@)
903
2986a63f 904$(X2P) : $(MINIPERL) $(X2P_OBJ)
011f1a1a 905 @echo Building $@..........
2986a63f 906 $(MINIPERL) ..\x2p\find2perl.PL
907 $(MINIPERL) ..\x2p\s2p.PL
011f1a1a 908# Linker definitions and lining come here for CODEWARRIOR
909 @echo $(BASE_IMPORT_FILES) > $*.def
910 @echo MODULE clib >> $*.def
911 @echo Import @perl.imp >> $*.def
2986a63f 912!ifdef USE_XDC
913 $(MPKTOOL) $(XDCFLAGS) $*.xdc
011f1a1a 914 @echo Import Mp.imp >> $*.def
915 @echo xdcdata $*.xdc >> $*.def
2986a63f 916!endif
011f1a1a 917## $(LINK) $(LDFLAGS) $(BS_CFLAGS) -desc "Awk to Perl Translator" $(X2P_OBJ) $(BLDDIR)\clibstuf.obj -commandfile $*.def -o $@
918 $(LINK) $(LDFLAGS) -desc "Awk to Perl Translator" $(X2P_OBJ) $(BLDDIR)\clibstuf.obj -commandfile $*.def -o $@
2986a63f 919
920$(EXTDIR)\DynaLoader\dl_netware.xs: dl_netware.xs
921 copy dl_netware.xs $(EXTDIR)\DynaLoader\dl_netware.xs
922
923HEADERS :
924 @echo . . . . making stdio.h and string.h
728c2768 925 @copy << stdio.h >\nwnul
2986a63f 926
927/*
011f1a1a 928 * (C) Copyright 2002 Novell Inc. All Rights Reserved.
2986a63f 929 *
930 * You may distribute under the terms of either the GNU General Public
931 * License or the Artistic License, as specified in the README file.
932 *
933 */
934
935/*
936 * FILENAME : stdio.h
937 * DESCRIPTION : Generated header file, do not edit. See makefile.
938 * This header file causes the includer to use clibstuf.h
939 * The purpose of clibstuf is to make sure that Perl, cgi2perl and
011f1a1a 940 * all the perl extension nlm's (*.NLM) use the Novell Netware CLIB versions
2986a63f 941 * of standard functions. This code loads up a whole bunch of function pointers
942 * to point at the standard CLIB functions.
943 * Author : HYAK
944 * Date : January 2001.
945 *
946 */
947
948
949#ifndef __Stdio_H__
950#define __Stdio_H__
951
952
953#include "$(NLMSDKBASE)\INCLUDE\NLM\stdio.h"
954#include "clibsdio.h"
955
956
957#endif // __Stdio_H__
958
959<<
960 @copy stdio.h $(COREDIR)
961
728c2768 962 @copy << string.h >\nwnul
2986a63f 963
964/*
011f1a1a 965 * (C) Copyright 2002 Novell Inc. All Rights Reserved.
2986a63f 966 *
967 * You may distribute under the terms of either the GNU General Public
968 * License or the Artistic License, as specified in the README file.
969 *
970 */
971
972/*
973 * FILENAME : string.h
974 * DESCRIPTION : Generated header file, do not edit. See makefile.
975 * This header file causes the includer to use clibstuf.h
976 * The purpose of clibstuf is to make sure that Perl, cgi2perl and
011f1a1a 977 * all the perl extension nlm's (*.NLM) use the Novell Netware CLIB versions
2986a63f 978 * of standard functions. This code loads up a whole bunch of function pointers
979 * to point at the standard CLIB functions.
980 * Author : HYAK
981 * Date : January 2001.
982 *
983 */
984
985
986#ifndef __String_H__
987#define __String_H__
988
989
990#include "$(NLMSDKBASE)\INCLUDE\NLM\string.h"
991#include "clibstr.h"
992
993
994#endif // __String_H__
995
996<<
997 @copy string.h $(COREDIR)
998
999
011f1a1a 1000$(NLM_NAME): MESSAGE HEADERS $(BLDDIR)\nul $(NLM_OBJ) $(NEWTARE_OBJ_DEP) $(NEWTARE_CPP_OBJ_DEP) $(PERL_IO_OBJ_DEP) $(DLL_OBJ) \
1001 $(PERLIMPLIB) $(EXT_MAIN_OBJ) $(PERL_TEMP_OBJ) #$(PERL_LIB_OBJ)
2986a63f 1002 @echo======= Linking $@ at $(MAKEDIR)\$(BLDDIR) =======
2986a63f 1003# Linker definitions and lining come here for CODEWARRIOR
011f1a1a 1004 @echo $(BASE_IMPORT_FILES) > $*.def
1005 @echo MODULE clib >> $*.def
1006 @echo MODULE netdb >> $*.def
1007# @echo MODULE nwsec >> $*.def
1008 @echo $(EXPORTS) >> $*.def
1009!ifdef USE_XDC
1010 @echo======= Creating XDC file
1011 @echo Import Mp.imp >> $*.def
2986a63f 1012!ifdef NLM_NAME8
011f1a1a 1013 $(MPKTOOL) $(XDCFLAGS) $(BLDDIR)\$(NLM_NAME8).xdc
1014 @echo xdcdata $(BLDDIR)\$(NLM_NAME8).xdc >> $*.def
2986a63f 1015!else
011f1a1a 1016 $(MPKTOOL) $(XDCFLAGS) $(BLDDIR)\$(NLM_NAME).xdc
1017 @echo xdcdata $(BLDDIR)\$(NLM_NAME).xdc >> $*.def
2986a63f 1018!endif
1019!endif
011f1a1a 1020## $(LINK) $(LDFLAGS) $(BS_CFLAGS) -desc "Perl 5.6.1 for NetWare" $(NEWTARE_OBJ_DEP:.obj=.obj) $(NLM_OBJ:.obj=.obj) $(PERL_IO_OBJ_DEP:.obj=.obj) $(DLL_OBJ:.obj=.obj) $(NEWTARE_CPP_OBJ_DEP:.obj=.obj) -commandfile $*.def -o .\$(BLDDIR)\$@
1021 $(LINK) $(LDFLAGS) -desc $(MODULE_DESC) $(NEWTARE_OBJ_DEP:.obj=.obj) $(NLM_OBJ:.obj=.obj) $(PERL_IO_OBJ_DEP:.obj=.obj) $(DLL_OBJ:.obj=.obj) $(NEWTARE_CPP_OBJ_DEP:.obj=.obj) -commandfile $*.def -o .\$(BLDDIR)\$@
1022 copy splittree.pl ..
1023 $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
1024 @echo ========Linked $@ ==========
1025##!if "$(MAKE_TYPE)"=="Debug"
1026##!ifdef NLM_NAME8
1027## .\bat\cvpack $(BLDDIR)\$(NLM_NAME8).sym
1028##!else
1029## .\bat\cvpack $(BLDDIR)\$(NLM_NAME).sym
1030##!endif
1031##!endif
2986a63f 1032 @echo======= Finished building $(BUILT).
011f1a1a 1033
1034# Create the debug or release directory if not existing
1035$(BLDDIR)\nul:
1036 @echo . . . . mkdir $(BLDDIR)
1037 @mkdir $(BLDDIR)
1038 @echo '$(BLDDIR)' directory created.
2986a63f 1039
1040MESSAGE:
1041 @echo======= $(MAKE_ACTION)ing $(NLM_NAME) at $(MAKEDIR)\$(BLDDIR) =======
011f1a1a 1042
1043$(PERLIMPLIB): perllib.imp
1044
1045perllib.imp : $(MINIPERL) $(CONFIGPM) ..\global.sym ..\pp.sym ..\makedef.pl
1046# $(MINIPERL) -w ..\makedef.pl PLATFORM=netware FILETYPE=def $(ADD_BUILDOPT) \
1047# CCTYPE=$(CCTYPE) > perllib.def
1048 @echo (Perl) > perl.imp
1049 $(MINIPERL) -w ..\makedef.pl PLATFORM=netware FILETYPE=imp $(BS_CFLAGS) $(DEFINES) $(ADD_BUILDOPT) \
1050 CCTYPE=$(CCTYPE) >> perl.imp
1051 copy perl.imp $(COREDIR)
1052
2986a63f 1053$(DLL_OBJ) : $(DYNALOADER).c $(CORE_H) $(EXTDIR)\DynaLoader\dlutils.c
011f1a1a 1054 @echo $(MPKMESSAGE)...$(BLDMESG)...$@
1055 @$(C_COMPILER) $(NLM_INCLUDES) $(COMPLER_FLAGS) $(NLM_INCLUDES) $(ADD_LOCDEFS) $(ERROR_FLAG) -I$(EXTDIR)\DynaLoader \
1056 $(EXTDIR)\DynaLoader\$(*F).c -o $@
1057 @echo $(@) Done.
2986a63f 1058
1059$(DYNALOADER).c : $(MINIPERL) $(EXTDIR)\DynaLoader\dl_netware.xs $(CONFIGPM)
1060 if not exist $(AUTODIR) mkdir $(AUTODIR)
1061 cd $(EXTDIR)\$(*B)
1062 ..\$(MINIPERL) -I..\..\lib $(*B)_pm.PL
1063 ..\$(MINIPERL) -I..\..\lib XSLoader_pm.PL
1064 cd ..\..\netware
1065 $(XCOPY) $(EXTDIR)\$(*B)\$(*B).pm $(LIBDIR)\$(NULL)
1066 $(XCOPY) $(EXTDIR)\$(*B)\XSLoader.pm $(LIBDIR)\$(NULL)
1067 cd $(EXTDIR)\$(*B)
1068 $(XSUBPP) dl_netware.xs > $(*B).c
1069 cd ..\..\netware
011f1a1a 1070 @echo Dynaloader Done
2986a63f 1071
2986a63f 1072
1073$(PERL_IO_OBJ_DEP) : ..\$(*F).c
1074 @echo $(MPKMESSAGE) $(BLDMESG) $@
011f1a1a 1075 $(C_COMPILER) $(COMPLER_FLAGS) $(NLM_INCLUDES) $(ADD_LOCDEFS) $(ERROR_FLAG) ..\$(*F).c -o $@
1076 @echo Built $(@)
2986a63f 1077
1078$(NLM_OBJ) : ..\$(*F).c
1079 @echo $(MPKMESSAGE) $(BLDMESG) $@
011f1a1a 1080 $(C_COMPILER) $(COMPLER_FLAGS) $(NLM_INCLUDES) $(ADD_LOCDEFS) $(ERROR_FLAG) ..\$(*F).c -o $@
1081 @echo Built $(@)
1082
1083
2986a63f 1084$(NEWTARE_OBJ_DEP) : $(NW_H_FILES) $(NW_HOST_H_FILES) $(*F).c
1085 @echo $(MPKMESSAGE) $(BLDMESG) $@
011f1a1a 1086 $(C_COMPILER) $(COMPLER_FLAGS) $(NLM_INCLUDES) $(ADD_LOCDEFS) $(ERROR_FLAG) $(*F).c -o $@
1087 @echo Built $(@)
2986a63f 1088
011f1a1a 1089$(NEWTARE_CPP_OBJ_DEP) : $(NW_H_FILES) $(NW_HOST_H_FILES) $(*F).cpp
2986a63f 1090 @echo $(MPKMESSAGE) $(BLDMESG) $@
011f1a1a 1091 $(C_COMPILER) $(CWCPPFLAGS) $(COMPLER_FLAGS) $(NLM_INCLUDES) $(ADD_LOCDEFS) $(ERROR_FLAG) $(*F).cpp -o $@
1092 @echo Built $(@)
1093
1094$(EXT_MAIN_OBJ) : $(CLIB_H_FILES)
1095 @echo $(MPKMESSAGE) $(BLDMESG) $@
1096 $(C_COMPILER) $(NLM_INCLUDES) $(COMPLER_FLAGS) $(ADD_LOCDEFS) $(ERROR_FLAG) $(*F).c -o $@
1097 $(LD) -type library $@ -o $*.lib
1098 @copy $*.lib $(COREDIR)
2986a63f 1099
1100# Delete any files that might have got created during building miniperl.exe
1101# config.sh will definitely be created
1102# COREDIR might have got created
1103.cleanoldfiles :
41504350 1104 -del /f /q $(PERLIMPLIB)
1105 -del /f /q ..\lib\config.pm
1106 -del /f /q ..\config.sh
1107 -del /f /q .\Main.obj
1108 -del /f /q .\Main.lib
2986a63f 1109 -rmdir /s /q $(AUTODIR)
1110 -rmdir /s /q $(COREDIR)
41504350 1111 -del /f /q ..\lib\core
2986a63f 1112
1113.\nwconfig.h : $(NW_CFGH_TMPL)
41504350 1114 -del /f /q config.h
2986a63f 1115 copy $(NW_CFGH_TMPL) config.h
1116
1117# REQUIRED WHEN WE INCLUDE CONFIGPM OR REGEN_CONFIG - sgp
1118#..\nwconfig.sh : config.nw5 $(MINIPERL) config_sh.PL
1119# $(MINIPERL) -I..\lib config_sh.PL $(NW_CFG_VARS) config.nw5 > ..\config.sh
1120# @pause
1121# cd ..
4d76e4b4 1122# del /f /q config.sh
2986a63f 1123# rename nwconfig.sh config.sh
1124# cd netware
1125
1126config.nw5 : $(NW_CFGSH_TMPL)
1127 copy $(NW_CFGSH_TMPL) config.nw5
1128
011f1a1a 1129$(SOCKET_NLM): $(NLM_NAME) $(SOCKET).xs
2986a63f 1130 cd $(EXTDIR)\$(*B)
c5635c9e 1131 ..\..\miniperl -I..\..\lib Makefile.PL PERL_CORE=1 INSTALLDIRS=perl
2986a63f 1132 $(MAKE)
1133 cd ..\..\netware
1134
011f1a1a 1135$(HOSTNAME_NLM): $(NLM_NAME) $(HOSTNAME).xs
57e69e5f 1136 cd $(EXTDIR)\Sys\$(*B)
c5635c9e 1137 ..\..\..\miniperl -I..\..\..\lib Makefile.PL PERL_CORE=1 INSTALLDIRS=perl
57e69e5f 1138 $(MAKE)
1139 cd ..\..\..\netware
1140
011f1a1a 1141$(FCNTL_NLM):
2986a63f 1142 cd $(EXTDIR)\$(*B)
c5635c9e 1143 ..\..\miniperl -I..\..\lib Makefile.PL PERL_CORE=1 INSTALLDIRS=perl
2986a63f 1144 $(MAKE)
1145 cd ..\..\netware
1146
011f1a1a 1147$(IO_NLM):
2986a63f 1148 cd $(EXTDIR)\$(*B)
c5635c9e 1149 ..\..\miniperl -I..\..\lib Makefile.PL PERL_CORE=1 INSTALLDIRS=perl
2986a63f 1150 $(MAKE)
1151 cd ..\..\netware
1152
011f1a1a 1153$(OPCODE_NLM):
2986a63f 1154 cd $(EXTDIR)\$(*B)
c5635c9e 1155 ..\..\miniperl -I..\..\lib Makefile.PL PERL_CORE=1 INSTALLDIRS=perl
2986a63f 1156 $(MAKE)
1157 cd ..\..\netware
1158
011f1a1a 1159$(B_NLM):
2986a63f 1160 cd $(EXTDIR)\$(*B)
c5635c9e 1161 ..\..\miniperl -I..\..\lib Makefile.PL PERL_CORE=1 INSTALLDIRS=perl
2986a63f 1162 $(MAKE)
1163 cd ..\..\netware
1164
011f1a1a 1165$(DUMPER_NLM):
2986a63f 1166 cd $(EXTDIR)\Data\$(*B)
c5635c9e 1167 ..\..\..\miniperl -I..\..\..\lib Makefile.PL PERL_CORE=1 INSTALLDIRS=perl
2986a63f 1168 $(MAKE)
1169 cd ..\..\..\netware
1170
011f1a1a 1171$(PEEK_NLM):
2986a63f 1172 cd $(EXTDIR)\Devel\$(*B)
c5635c9e 1173 ..\..\..\miniperl -I..\..\..\lib Makefile.PL PERL_CORE=1 INSTALLDIRS=perl
2986a63f 1174 $(MAKE)
1175 cd ..\..\..\netware
1176
011f1a1a 1177$(RE_NLM):
2986a63f 1178 cd $(EXTDIR)\$(*B)
c5635c9e 1179 ..\..\miniperl -I..\..\lib Makefile.PL PERL_CORE=1 INSTALLDIRS=perl
2986a63f 1180 $(MAKE)
1181 cd ..\..\netware
1182
011f1a1a 1183$(BYTELOADER_NLM):
2986a63f 1184 cd $(EXTDIR)\$(*B)
c5635c9e 1185 ..\..\miniperl -I..\..\lib Makefile.PL PERL_CORE=1 INSTALLDIRS=perl
2986a63f 1186 $(MAKE)
1187 cd ..\..\netware
1188
011f1a1a 1189$(DPROF_NLM):
2986a63f 1190 cd $(EXTDIR)\Devel\$(*B)
c5635c9e 1191 ..\..\..\miniperl -I..\..\..\lib Makefile.PL PERL_CORE=1 INSTALLDIRS=perl
2986a63f 1192 $(MAKE)
1193 cd ..\..\..\netware
1194
011f1a1a 1195$(GLOB_NLM):
2986a63f 1196 cd $(EXTDIR)\File\$(*B)
c5635c9e 1197 ..\..\..\miniperl -I..\..\..\lib Makefile.PL PERL_CORE=1 INSTALLDIRS=perl
2986a63f 1198 $(MAKE)
1199 cd ..\..\..\netware
1200
011f1a1a 1201$(POSIX_NLM):
2986a63f 1202 cd $(EXTDIR)\$(*B)
c5635c9e 1203 ..\..\miniperl -I..\..\lib Makefile.PL PERL_CORE=1 INSTALLDIRS=perl
2986a63f 1204 $(MAKE)
1205 cd ..\..\netware
1206
011f1a1a 1207$(THREAD_NLM):
2986a63f 1208 cd $(EXTDIR)\$(*B)
c5635c9e 1209 ..\..\miniperl -I..\..\lib Makefile.PL PERL_CORE=1 INSTALLDIRS=perl
2986a63f 1210 $(MAKE)
1211 cd ..\..\netware
1212
011f1a1a 1213$(ATTRS_NLM):
2986a63f 1214 cd $(EXTDIR)\$(*B)
c5635c9e 1215 ..\..\miniperl -I..\..\lib Makefile.PL PERL_CORE=1 INSTALLDIRS=perl
2986a63f 1216 $(MAKE)
1217 cd ..\..\netware
1218
011f1a1a 1219$(SDBM_FILE_NLM):
2986a63f 1220 cd $(EXTDIR)\$(*B)
c5635c9e 1221 ..\..\miniperl -I..\..\lib Makefile.PL PERL_CORE=1 INSTALLDIRS=perl
2986a63f 1222 $(MAKE)
1223 cd ..\..\netware
1224
011f1a1a 1225$(CWD_NLM):
225a5dca 1226 cd $(EXTDIR)\$(*B)
c5635c9e 1227 ..\..\miniperl -I..\..\lib Makefile.PL PERL_CORE=1 INSTALLDIRS=perl
225a5dca 1228 $(MAKE)
1229 cd ..\..\netware
1230
011f1a1a 1231$(STORABLE_NLM):
225a5dca 1232 cd $(EXTDIR)\$(*B)
c5635c9e 1233 ..\..\miniperl -I..\..\lib Makefile.PL PERL_CORE=1 INSTALLDIRS=perl
225a5dca 1234 $(MAKE)
1235 cd ..\..\netware
1236
011f1a1a 1237$(LISTUTIL_NLM):
225a5dca 1238 cd $(EXTDIR)\List\$(*B)
c5635c9e 1239 ..\..\..\miniperl -I..\..\lib Makefile.PL PERL_CORE=1 INSTALLDIRS=perl
225a5dca 1240 $(MAKE)
1241 cd ..\..\..\netware
1242
011f1a1a 1243$(MIMEBASE64_NLM):
225a5dca 1244 cd $(EXTDIR)\Mime\$(*B)
c5635c9e 1245 ..\..\..\miniperl -I..\..\lib Makefile.PL PERL_CORE=1 INSTALLDIRS=perl
225a5dca 1246 $(MAKE)
1247 cd ..\..\..\netware
1248
011f1a1a 1249$(XSTYPEMAP_NLM):
225a5dca 1250 cd $(EXTDIR)\XS\$(*B)
c5635c9e 1251 ..\..\..\miniperl -I..\..\lib Makefile.PL PERL_CORE=1 INSTALLDIRS=perl
225a5dca 1252 $(MAKE)
1253 cd ..\..\..\netware
1254
011f1a1a 1255$(UNICODENORMALIZE_NLM):
ac5ea531 1256 cd $(EXTDIR)\Unicode\$(*B)
c5635c9e 1257 ..\..\..\miniperl -I..\..\lib Makefile.PL PERL_CORE=1 INSTALLDIRS=perl
ac5ea531 1258 $(MAKE)
1259 cd ..\..\..\netware
1260
011f1a1a 1261
2986a63f 1262$(ERRNO_PM_NW):
011f1a1a 1263# @echo Building $@
2986a63f 1264 cd $(EXTDIR)\$(*B)
c5635c9e 1265 ..\..\miniperl -I..\..\lib Makefile.PL PERL_CORE=1 INSTALLDIRS=perl
2986a63f 1266 $(MAKE)
1267 cd ..\..\netware
1268
1269$(ECHO_SRC_OBJ): $*.c
1270 @echo $(MPKMESSAGE) $(BLDMESG) $@
011f1a1a 1271 $(C_COMPILER) $(NLM_INCLUDES) $(COMPLER_FLAGS) $(ADD_LOCDEFS) $(ERROR_FLAG) $*.c -o $@
1272 @echo Built $(@)
2986a63f 1273
1274$(ECHO_NLM): $(ECHO_SRC_OBJ)
1275 @echo======= Linking $@ =======
011f1a1a 1276# Linker definitions and lining come here for CODEWARRIOR
1277 @echo $(BASE_IMPORT_FILES) > $*.def
1278 @echo MODULE clib >> $*.def
1279 @echo Import @perl.imp >> $*.def
2986a63f 1280!ifdef USE_XDC
1281 $(MPKTOOL) $(XDCFLAGS) $*.xdc
011f1a1a 1282 @echo Import @MP.imp >> $*.def
1283 @echo xdcdata $*.xdc >> $*.def
2986a63f 1284!endif
011f1a1a 1285## $(LINK) $(LDFLAGS) $(BS_CFLAGS) -desc "DOS Echo emulation for Perl testing" $(ECHO_SRC_OBJ) $(BLDDIR)\clibstuf.obj -commandfile $*.def -o $@
1286 $(LINK) $(LDFLAGS) -desc "DOS Echo emulation for Perl testing" $(ECHO_SRC_OBJ) $(BLDDIR)\clibstuf.obj -commandfile $*.def -o $@
2986a63f 1287 @echo======= Linking Complete =======
1288
1289$(TYPE_SRC_OBJ): $*.c
1290 @echo $(MPKMESSAGE) $(BLDMESG) $@
011f1a1a 1291 $(C_COMPILER) $(NLM_INCLUDES) $(COMPLER_FLAGS) $(ADD_LOCDEFS) $(ERROR_FLAG) $*.c -o $@
1292 @echo Built $(@)
1293
2986a63f 1294$(TYPE_NLM): $(TYPE_SRC_OBJ)
1295 @echo======= Linking $@ =======
011f1a1a 1296# Linker definitions and lining come here for CODEWARRIOR
1297 @echo $(BASE_IMPORT_FILES) > $*.def
1298 @echo MODULE clib >> $*.def
1299 @echo Import @perl.imp >> $*.def
2986a63f 1300!ifdef USE_XDC
1301 $(MPKTOOL) $(XDCFLAGS) $*.xdc
011f1a1a 1302 @echo Import @MP.imp >> $*.def
1303 @echo xdcdata $*.xdc >> $*.def
2986a63f 1304!endif
011f1a1a 1305## $(LINK) $(LDFLAGS) $(BS_CFLAGS) -desc "DOS Type emulation for Perl testing" $(TYPE_SRC_OBJ) $(BLDDIR)\clibstuf.obj -commandfile $*.def -o $@
1306 $(LINK) $(LDFLAGS) -desc "DOS Type emulation for Perl testing" $(TYPE_SRC_OBJ) $(BLDDIR)\clibstuf.obj -commandfile $*.def -o $@
2986a63f 1307 @echo======= Linking Complete =======
1308
011f1a1a 1309
2986a63f 1310# Build NetWare specific extensions
011f1a1a 1311$(CGI2PERL_NLM):
2986a63f 1312!if "$(NW_EXTNS)"=="yes"
1313 cd $(*B)
011f1a1a 1314 ..\..\miniperl -I..\..\lib Makefile.PL "CCCDLFLAGS=-bool on -lang c++" PERL_CORE=1 INSTALLDIRS=perl
2986a63f 1315 $(MAKE)
1316 cd ..\..\netware
1317!endif
1318
011f1a1a 1319$(PERL2UCS_NLM):
2986a63f 1320!if "$(NW_EXTNS)"=="yes"
1321 cd $(EXTDIR)\$(*B)
011f1a1a 1322 ..\..\miniperl -I..\..\lib Makefile.PL "CCCDLFLAGS=-bool on -lang c++" PERL_CORE=1 INSTALLDIRS=perl
2986a63f 1323 $(MAKE)
1324 cd ..\..\netware
1325!endif
1326
011f1a1a 1327$(UCSExt_NLM):
4d76e4b4 1328!if "$(NW_EXTNS)"=="yes"
1329 cd $(EXTDIR)\$(*B)
011f1a1a 1330 ..\..\miniperl -I..\..\lib Makefile.PL "CCCDLFLAGS=-bool on -lang c++" PERL_CORE=1 INSTALLDIRS=perl
4d76e4b4 1331 $(MAKE)
1332 cd ..\..\netware
1333!endif
1334
2986a63f 1335nwclean:
41504350 1336 -rmdir /s /q $(REL_DIR)
1337 -rmdir /s /q $(DEB_DIR)
1338 @if exist .\stdio.h del /f /q .\stdio.h
1339 @if exist .\string.h del /f /q .\string.h
011f1a1a 1340 @if exist .\Main.obj del /f /q .\Main.obj
41504350 1341 @if exist .\Main.lib del /f /q .\Main.lib
1342 @if exist .\config.nw5 del /f /q .\config.nw5
1343 @if exist .\perl.imp del /f /q .\perl.imp
2986a63f 1344 cd testnlm\echo
41504350 1345 -del /f /q *.obj *.map *.link *.options *.nlm *.sym *.xdc *.err
2986a63f 1346 cd ..\type
41504350 1347 -del /f /q *.obj *.map *.link *.options *.nlm *.sym *.xdc *.err
2986a63f 1348 cd ..\..\
1349
1350utils: $(BLDDIR)\$(NLM_NAME8).$(NLM_EXT) $(X2P)
1351 cd ..\utils
1352 $(MAKE) PERL=$(MINIPERL)
1353 cd ..\pod
1354 copy ..\README.amiga .\perlamiga.pod
1355 copy ..\README.cygwin .\perlcygwin.pod
1356 copy ..\README.dos .\perldos.pod
1357 copy ..\README.hpux .\perlhpux.pod
1358# copy ..\README.machten .\perlmachten.pod
1359 copy ..\README.os2 .\perlos2.pod
1360 copy ..\vms\perlvms.pod .\perlvms.pod
1361 copy ..\README.win32 .\perlwin32.pod
1362 copy ..\README.netware .\perlnw5.pod
1363 $(MAKE) -f ..\win32\pod.mak converters
1364 cd ..\netware
1365 $(MINIPERL) $(PL2BAT) $(UTILS)
1366
1367distclean: clean nwclean
41504350 1368 -del /f /q $(PERLIMPLIB) ..\miniperl.lib $(MINIMOD)
1369 -del /f /q *.def *.map
1370 -del /f /q $(EXTENSION_NPM)
1371 -del /f /q $(EXTENSION_C) $(DYNALOADER).c $(ERRNO).pm
1372 -del /f /q $(EXTDIR)\DynaLoader\dl_netware.xs
1373 -del /f /q $(LIBDIR)\.exists $(LIBDIR)\attrs.pm $(LIBDIR)\DynaLoader.pm
1374 -del /f /q $(LIBDIR)\XSLoader.pm
1375 -del /f /q $(LIBDIR)\Fcntl.pm $(LIBDIR)\IO.pm $(LIBDIR)\Opcode.pm
1376 -del /f /q $(LIBDIR)\ops.pm $(LIBDIR)\Safe.pm
1377 -del /f /q $(LIBDIR)\SDBM_File.pm $(LIBDIR)\Socket.pm $(LIBDIR)\POSIX.pm
1378 -del /f /q $(LIBDIR)\B.pm $(LIBDIR)\O.pm $(LIBDIR)\re.pm
1379 -del /f /q $(LIBDIR)\Data\Dumper.pm $(LIBDIR)\ByteLoader.pm
1380 -del /f /q $(LIBDIR)\Devel\Peek.pm $(LIBDIR)\Devel\DProf.pm
1381 -del /f /q $(LIBDIR)\File\Glob.pm
1382 -del /f /q $(LIBDIR)\Unicode\Normalize.pm
1383 -rmdir /s /q $(LIBDIR)\IO
1384 -rmdir /s /q $(LIBDIR)\Thread
1385 -rmdir /s /q $(LIBDIR)\B
1386 -rmdir /s /q $(LIBDIR)\Data
1387 -del /f /q $(PODDIR)\*.html
1388 -del /f /q $(PODDIR)\*.bat
2986a63f 1389 cd ..\utils
41504350 1390 -del /f /q h2ph splain perlbug pl2pm c2ph h2xs perldoc dprofpp
1391 -del /f /q *.bat
2986a63f 1392 cd ..\netware
1393 cd ..\x2p
41504350 1394 -del /f /q find2perl s2p
1395 -del /f /q *.bat
1396 -del /f /q *.obj *.map *.link *.xdc *.err
2986a63f 1397 cd ..\netware
41504350 1398 -del /f /q ..\config.sh ..\splittree.pl dlutils.c config.h.new
1399 -del /f /q $(CONFIGPM)
1400 -del /f /q bin\*.bat
2986a63f 1401 cd $(EXTDIR)
4d76e4b4 1402 -del /s /f /q *.lib *.def *.map *.pdb *.bs Makefile *$(o) pm_to_blib *.xdc *.err
2986a63f 1403 cd ..\netware
1404!if "$(NW_EXTNS)"=="yes"
1405 cd cgi2perl
41504350 1406 -del /f /q *.obj *.bs Makefile *$(o) *.c pm_to_blib *.xdc *.err *.sym *.map
2986a63f 1407 cd ..
9219c8de 1408 cd $(EXTDIR)\Perl2UCS
41504350 1409 -del /f /q *.obj *.bs Makefile *$(o) *.c pm_to_blib *.xdc *.err *.sym *.map *.c
9219c8de 1410 cd ..\..\netware
4d76e4b4 1411 cd $(EXTDIR)\UCSExt
1412 -del /f /q *.obj *.bs Makefile *$(o) *.c pm_to_blib *.xdc *.err *.sym *.map *.c
1413 cd ..\..\netware
2986a63f 1414!endif
41504350 1415 -rmdir /s /q $(AUTODIR)
1416 -rmdir /s /q $(COREDIR)
1417 -del /f /q ..\config.sh
2986a63f 1418
1419installwin:
1420 $(MINIPERL) -I..\lib ..\installperl
1421
1422install : utils installwin
1423
1424installnw:
1425 $(MINIPERL) -I..\lib ..\installperl -netware
1426
225a5dca 1427install_tests :
1428 cd ..\t
1429 xcopy /f /r /i /s /d *.* $(INST_NW_TOP2)\scripts\t
1430 cd ..\lib
1431 xcopy /f /r /i /s /d *.t $(INST_NW_TOP2)\scripts\t\lib
1432 cd ..\ext
1433 xcopy /f /r /i /s /d *.t $(INST_NW_TOP2)\scripts\t\ext
32ce01bc 1434 cd ..\netware\t
1435 xcopy /f /r /i /s /d *.pl $(INST_NW_TOP2)\scripts\t
1436 cd ..
225a5dca 1437
1438nwinstall: utils installnw install_tests
2986a63f 1439
1440inst_lib : $(CONFIGPM)
1441 copy ..\win32\splittree.pl ..
1442 $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
1443 $(RCOPY) ..\lib $(INST_LIB)\*.*
1444
1445clean :
1446 -@erase miniperlmain$(o)
1447 -@erase /f config.h
1448 -@erase $(DLL_OBJ)
1449 -@erase ..\*$(o) ..\*.lib ..\*.exp *$(o) *.lib *.exp *.res
1450 -@erase ..\t\*.exe ..\t\*.dll ..\t\*.bat
1451 -@erase ..\x2p\*.nlm ..\x2p\*.bat