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