ec392383662c3be0869c705e45ee03655234a57d
[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 # Begin - Following is required to build NetWare specific extensions Perl2UCS & CGI2Perl
310
311 PERL2UCS                = $(EXTDIR)\Perl2UCS\Perl2UCS
312 CGI2PERL                = CGI2Perl\CGI2Perl
313
314 PERL2UCS_NLP = $(AUTODIR)\Perl2UCS\Perl2UCS.nlp
315 CGI2PERL_NLP = \CGI2Perl\CGI2Perl.nlp
316
317 NETWARE_EXTNS = \
318                 $(PERL2UCS_NLP) \
319                 $(CGI2PERL_NLP)
320
321 # End
322
323 ECHO_SRC                        = TestNLM\echo\echo.c
324 TYPE_SRC                        = TestNLM\type\type.c
325 ECHO_SRC_OBJ                    = $(ECHO_SRC:.c=.obj)
326 TYPE_SRC_OBJ                    = $(TYPE_SRC:.c=.obj)
327 ECHO_NLM        = TestNLM\echo\echo.nlm
328 TYPE_NLM        = TestNLM\type\type.nlm
329
330 TEST_NLMS       =       \
331                         $(ECHO_NLM)     \
332                         $(TYPE_NLM)     \
333
334
335 !ifndef SCREEN
336 SCREEN          = 'none'
337 !endif
338
339 !ifndef NLM_DESCRIPTION
340 NLM_DESCRIPTION = $(NLM_NAME8) for Netware
341 !endif
342
343 !ifndef NLM_VERSION
344 NLM_VERSION    = 5.72.0
345 !endif
346
347 !ifndef NLM_EXT
348 NLM_EXT        = NLM
349 !endif
350
351 !ifndef BUILT
352 BUILT     = $(BLDDIR)\$(NLM_NAME8).$(NLM_EXT)
353 !endif
354
355 !ifndef BASE_IMPORT_FILES
356 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
357 !endif
358
359 !ifdef USE_MPK
360 BASE_IMPORT_FILES = $(BASE_IMPORT_FILES), @$(MPKBASE)\import\mpkorg.imp
361 !endif
362
363 !ifndef BASE_IMPORT_FNS
364 BASE_IMPORT_FNS = Import ImportSymbol, GetSystemConsoleScreen, LoadModule
365 !endif
366
367 !ifdef WATCOM
368 NWLIBPATH  = $(WATCOM)\lib386\netware
369 LIBPATH386 = $(WATCOM)\lib386
370 LIBPATH = $(NWLIBPATH);$(LIBPATH386)
371 !else                                                                                                                           #!ifdef WATCOM
372 !ifdef CODEWARRIOR
373 NWLIBPATH  = 
374 LIBPATH386 =
375 LIBPATH = 
376 !else                                                                                                                           #!ifdef CODEWARRIOR
377 !error Please define the tools base directory before proceeding
378 !endif                                                                                                                          #!ifdef CODEWARRIOR
379 !endif                                                                                                                          #!ifdef WATCOM
380
381 !ifndef BASE_LIBRARIES
382 !ifdef WATCOM
383 BASE_LIBRARIES = Library plib3s.lib,math3s.lib,clib3s.lib
384 !else
385 !ifdef CODEWARRIOR
386 BASE_LIBRARIES = 
387 !endif                                                                                                                          #!ifdef CODEWARRIOR
388 !endif                                                                                                                          #!ifdef WATCOM  
389 !endif                                                                                                                          #!ifndef BASE_LIBRARIES
390
391 COPYRIGHT = Copyright 2001 by Novell, Inc. All rights reserved.
392
393 EXPORTS = Export @perl.imp
394
395 #
396 # Set these to wherever you want "nmake install" to put your
397 # newly built perl.
398 #
399 INST_DRV        = c:
400 INST_TOP        = $(INST_DRV)\perl
401
402 INST_NW_DRV = i:
403 INST_NW_VOL = sys:
404 INST_NW_TOP1 = $(INST_NW_VOL)\perl
405 INST_NW_TOP2 = $(INST_NW_DRV)\perl
406 #INST_NW_VER = \5.6.1
407
408 #
409 # Comment this out if you DON'T want your perl installation to be versioned.
410 # This means that the new installation will overwrite any files from the
411 # old installation at the same INST_TOP location.  Leaving it enabled is
412 # the safest route, as perl adds the extra version directory to all the
413 # locations it installs files to.  If you disable it, an alternative
414 # versioned installation can be obtained by setting INST_TOP above to a
415 # path that includes an arbitrary version string.
416 #
417 INST_VER        = \5.7.2
418
419 #
420 # Comment this out if you DON'T want your perl installation to have
421 # architecture specific components.  This means that architecture-
422 # specific files will be installed along with the architecture-neutral
423 # files.  Leaving it enabled is safer and more flexible, in case you
424 # want to build multiple flavors of perl and install them together in
425 # the same location.  Commenting it out gives you a simpler
426 # installation that is easier to understand for beginners.
427 #
428 INST_ARCH       = \$(ARCHNAME)
429
430 #
431 # uncomment to enable multiple interpreters.  This is need for fork()
432 # emulation.
433 #
434 USE_MULTI       = define
435
436 #
437 # Beginnings of interpreter cloning/threads; still very incomplete.
438 # This should be enabled to get the fork() emulation.  This needs
439 # USE_MULTI as well.
440 #
441 USE_ITHREADS    = define
442
443 #
444 # uncomment to enable the implicit "host" layer for all system calls
445 # made by perl.  This needs USE_MULTI above.  This is also needed to
446 # get fork().
447 #
448 USE_IMP_SYS     = define
449
450 # uncomment this to enable the experimental PerlIO I/O subsystem
451 # else USE_STDIO will be defined.
452 #USE_PERLIO     = define
453 #USE_STDIO = define
454
455 #
456 # WARNING! This option is deprecated and will eventually go away (enable
457 # USE_ITHREADS instead).
458 #
459 # uncomment to enable threads-capabilities.  This is incompatible with
460 # USE_ITHREADS, and is only here for people who may have come to rely
461 # on the experimental Thread support that was in 5.005.
462 #
463 #USE_5005THREADS= define
464
465 # For now let this be here
466 #
467 #CRYPT_SRC      = fcrypt.c
468
469 # For now let this be here
470 #
471 #CRYPT_LIB      = fcrypt.lib
472
473 #
474 # set this if you wish to use perl's malloc
475 # WARNING: Turning this on/off WILL break binary compatibility with extensions
476 # you may have compiled with/without it.  Be prepared to recompile all
477 # extensions if you change the default.  Currently, this cannot be enabled
478 # if you ask for USE_IMP_SYS above.
479 #
480 #PERL_MALLOC    = define
481
482 #
483 # set this to your email address (perl will guess a value from
484 # from your loginname and your hostname, which may not be right)
485 #
486 #EMAIL          =
487
488 ##
489 ## Build configuration ends.
490 ##
491
492 ##################### CHANGE THESE ONLY IF YOU MUST #####################
493
494 !IF "$(CRYPT_SRC)$(CRYPT_LIB)" == ""
495 D_CRYPT         = undef
496 !ELSE
497 D_CRYPT         = define
498 CRYPT_FLAG      = -DHAVE_DES_FCRYPT
499 !ENDIF
500
501 !IF "$(PERL_MALLOC)" == ""
502 PERL_MALLOC     = undef
503 !ENDIF
504
505 !IF "$(USE_5005THREADS)" == ""
506 USE_5005THREADS = undef
507 !ENDIF
508
509 !IF "$(USE_5005THREADS)" == "define"
510 USE_ITHREADS    = undef
511 !ENDIF
512
513 !IF "$(USE_IMP_SYS)" == "define"
514 PERL_MALLOC     = undef
515 !ENDIF
516
517 !IF "$(USE_MULTI)" == ""
518 USE_MULTI       = undef
519 !ENDIF
520
521 !IF "$(USE_ITHREADS)" == ""
522 USE_ITHREADS    = undef
523 !ENDIF
524
525 !IF "$(USE_IMP_SYS)" == ""
526 USE_IMP_SYS     = undef
527 !ENDIF
528
529 !IF "$(USE_PERLCRT)" == ""
530 USE_PERLCRT     = undef
531 !ENDIF
532
533 !IF "$(USE_IMP_SYS)$(USE_MULTI)$(USE_5005THREADS)" == "defineundefundef"
534 USE_MULTI       = define
535 !ENDIF
536
537 !IF "$(USE_ITHREADS)$(USE_MULTI)" == "defineundef"
538 USE_MULTI       = define
539 USE_5005THREADS = undef
540 !ENDIF
541
542 !IF "$(USE_MULTI)$(USE_5005THREADS)" != "undefundef"
543 BUILDOPT        = $(BUILDOPT) -DPERL_IMPLICIT_CONTEXT
544 !ENDIF
545
546 !IF "$(USE_IMP_SYS)" != "undef"
547 BUILDOPT        = $(BUILDOPT) -DPERL_IMPLICIT_SYS
548 !ENDIF
549
550 !IF "$(PROCESSOR_ARCHITECTURE)" == ""
551 PROCESSOR_ARCHITECTURE  = x86
552 !ENDIF
553
554 !IF "$(USE_5005THREADS)" == "define"
555 ARCHNAME        = NetWare-$(PROCESSOR_ARCHITECTURE)-thread
556 !ELSE
557 !IF "$(USE_MULTI)" == "define"
558 ARCHNAME        = NetWare-$(PROCESSOR_ARCHITECTURE)-multi
559 !ELSE
560 ARCHNAME        = NetWare-$(PROCESSOR_ARCHITECTURE)
561 !ENDIF
562 !ENDIF
563
564 !IF "$(USE_MULTI)$(USE_5005THREADS)" != "undefundef"
565 ADD_BUILDOPT    = $(ADD_BUILDOPT) -DPERL_IMPLICIT_CONTEXT
566 !ENDIF
567
568 !IF "$(USE_IMP_SYS)" != "undef"
569 ADD_BUILDOPT    = $(ADD_BUILDOPT) -DPERL_IMPLICIT_SYS
570 !ENDIF
571
572 !IF "$(USE_ITHREADS)" == "define"
573 ARCHNAME        = $(ARCHNAME)-thread
574 !ENDIF
575
576 !IF "$(USE_PERLIO)" == "define"
577 USE_STDIO               = undef
578 ADD_BUILDOPT    = $(ADD_BUILDOPT) -DUSE_PERLIO
579 ARCHNAME                = $(ARCHNAME)-perlio
580 !ELSE
581 #USE_STDIO      = define
582 #ADD_BUILDOPT   = $(ADD_BUILDOPT) -DUSE_STDIO
583 !ENDIF
584
585 ARCHDIR         = ..\lib\$(ARCHNAME)
586 COREDIR         = ..\lib\CORE
587 AUTODIR         = ..\lib\auto
588 LIBDIR          = ..\lib
589 EXTDIR          = ..\ext
590 PODDIR          = ..\pod
591 EXTUTILSDIR     = $(LIBDIR)\ExtUtils
592
593 #
594 INST_SCRIPT     = $(INST_TOP)$(INST_VER)\bin
595 INST_BIN        = $(INST_SCRIPT)$(INST_ARCH)
596 INST_LIB        = $(INST_TOP)$(INST_VER)\lib
597 INST_ARCHLIB    = $(INST_LIB)$(INST_ARCH)
598 INST_COREDIR    = $(INST_ARCHLIB)\CORE
599 INST_POD        = $(INST_LIB)\pod
600 INST_HTML       = $(INST_POD)\html
601
602 #
603 # Options
604 #
605
606 OBJOUT_FLAG     = -Fo
607 EXEOUT_FLAG     = -Fe
608
609
610 #################### do not edit below this line #######################
611 ############# NO USER-SERVICEABLE PARTS BEYOND THIS POINT ##############
612
613 o = .obj
614
615 #
616 # Rules
617
618
619 .SUFFIXES : .c $(o) .nlm .lib .nlp
620
621
622 #
623 # various targets
624 PERLIMPLIB      = ..\perl.lib
625
626 MINIPERL        = ..\miniperl.exe
627 CONFIGPM        = ..\lib\Config.pm
628 MINIMOD         = ..\lib\ExtUtils\Miniperl.pm
629 X2P                     = ..\x2p\a2p.nlm
630
631 PL2BAT          = ..\win32\bin\pl2bat.pl
632
633 UTILS           =                       \
634                 ..\utils\h2ph           \
635                 ..\utils\splain         \
636                 ..\utils\dprofpp        \
637                 ..\utils\perlbug        \
638                 ..\utils\pl2pm          \
639                 ..\utils\c2ph           \
640                 ..\utils\h2xs           \
641                 ..\utils\perldoc        \
642                 ..\utils\perlcc         \
643                 ..\pod\checkpods        \
644                 ..\pod\pod2html         \
645                 ..\pod\pod2latex        \
646                 ..\pod\pod2man          \
647                 ..\pod\pod2text         \
648                 ..\pod\pod2usage        \
649                 ..\pod\podchecker       \
650                 ..\pod\podselect        \
651                 ..\x2p\find2perl        \
652                 ..\x2p\s2p              
653
654 MAKE            = nmake -nologo
655
656 XCOPY           = xcopy /f /r /i /d
657 RCOPY           = xcopy /f /r /i /e /d
658 NOOP            = @echo
659 NULL            =
660
661 #
662 # filenames given to xsubpp must have forward slashes (since it puts
663 # full pathnames in #line strings)
664 XSUBPP          = ..\$(MINIPERL) -I..\..\lib ..\$(EXTUTILSDIR)\xsubpp \
665                 -C++ -prototypes
666
667 MICROCORE_SRC   =               \
668                 ..\av.c         \
669                 ..\deb.c        \
670                 ..\doio.c       \
671                 ..\doop.c       \
672                 ..\dump.c       \
673                 ..\globals.c    \
674                 ..\gv.c         \
675                 ..\hv.c         \
676                 ..\locale.c     \
677                 ..\mg.c         \
678                 ..\numeric.c    \
679                 ..\op.c         \
680                 ..\perl.c       \
681                 ..\perlapi.c    \
682                 ..\perly.c      \
683                 ..\pp.c         \
684                 ..\pp_ctl.c     \
685                 ..\pp_hot.c     \
686                 ..\pp_pack.c    \
687                 ..\pp_sort.c    \
688                 ..\pp_sys.c     \
689                 ..\regcomp.c    \
690                 ..\regexec.c    \
691                 ..\run.c        \
692                 ..\scope.c      \
693                 ..\sharedsv.c   \
694                 ..\sv.c         \
695                 ..\taint.c      \
696                 ..\toke.c       \
697                 ..\universal.c  \
698                 ..\utf8.c       \
699                 ..\util.c       \
700                 ..\xsutils.c
701
702 #EXTRACORE_SRC  = $(EXTRACORE_SRC) perllib.c
703
704 !IF "$(PERL_MALLOC)" == "define"
705 EXTRACORE_SRC   = $(EXTRACORE_SRC) ..\malloc.c
706 !ENDIF
707
708 #EXTRACORE_SRC  = $(EXTRACORE_SRC) ..\perlio.c
709
710 !IF "$(CRYPT_SRC)" != ""
711 NW_SRC  = $(NW_SRC) .\$(CRYPT_SRC)
712 !ENDIF
713
714 DLL_SRC         = $(DYNALOADER).c
715
716 X2P_SRC         =               \
717                 ..\x2p\a2p.c    \
718                 ..\x2p\hash.c   \
719                 ..\x2p\str.c    \
720                 ..\x2p\util.c   \
721                 ..\x2p\walk.c
722
723 CORE_NOCFG_H    =               \
724                 ..\av.h         \
725                 ..\cop.h        \
726                 ..\cv.h         \
727                 ..\dosish.h     \
728                 ..\embed.h      \
729                 ..\form.h       \
730                 ..\gv.h         \
731                 ..\handy.h      \
732                 ..\hv.h         \
733                 ..\iperlsys.h   \
734                 ..\mg.h         \
735                 ..\nostdio.h    \
736                 ..\op.h         \
737                 ..\opcode.h     \
738                 ..\perl.h       \
739                 ..\perlapi.h    \
740                 ..\perlsdio.h   \
741                 ..\perlsfio.h   \
742                 ..\perly.h      \
743                 ..\pp.h         \
744                 ..\proto.h      \
745                 ..\regexp.h     \
746                 ..\scope.h      \
747                 ..\sharedsv.h   \
748                 ..\sv.h         \
749                 ..\thread.h     \
750                 ..\unixish.h    \
751                 ..\utf8.h       \
752                 ..\util.h       \
753                 ..\warnings.h   \
754                 ..\XSUB.h       \
755                 ..\EXTERN.h     \
756                 ..\perlvars.h   \
757                 ..\intrpvar.h   \
758                 ..\thrdvar.h
759
760 CORE_H          = $(CORE_NOCFG_H) .\config.h
761
762 DLL_OBJ         = $(DLL_SRC:.c=.obj)
763 X2P_OBJ         = $(X2P_SRC:.c=.obj)
764
765 DYNAMIC_EXT     = Socket IO Fcntl Opcode SDBM_File POSIX attrs Thread B re \
766                 Data/Dumper Devel/Peek ByteLoader Devel/DProf File/Glob \
767                 Storable/Storable List/Util MIME/Base64/Base64 \
768                 XS/Typemap/Typemap Unicode/Normalize/Normalize Sys/Hostnamees
769
770
771 STATIC_EXT      = DynaLoader
772 NONXS_EXT       = Errno
773
774 DYNALOADER              = $(EXTDIR)\DynaLoader\DynaLoader
775 SOCKET                  = $(EXTDIR)\Socket\Socket
776 FCNTL                   = $(EXTDIR)\Fcntl\Fcntl
777 OPCODE                  = $(EXTDIR)\Opcode\Opcode
778 SDBM_FILE               = $(EXTDIR)\SDBM_File\SDBM_File
779 IO                      = $(EXTDIR)\IO\IO
780 POSIX                   = $(EXTDIR)\POSIX\POSIX
781 ATTRS                   = $(EXTDIR)\attrs\attrs
782 THREAD                  = $(EXTDIR)\Thread\Thread
783 B                       = $(EXTDIR)\B\B
784 RE                      = $(EXTDIR)\re\re
785 DUMPER                  = $(EXTDIR)\Data\Dumper\Dumper
786 ERRNO                   = $(EXTDIR)\Errno\Errno
787 PEEK                    = $(EXTDIR)\Devel\Peek\Peek
788 BYTELOADER              = $(EXTDIR)\ByteLoader\ByteLoader
789 DPROF                   = $(EXTDIR)\Devel\DProf\DProf
790 GLOB                    = $(EXTDIR)\File\Glob\Glob
791 HOSTNAME                = $(EXTDIR)\Sys\Hostname\Hostname
792 CWD                     = $(EXTDIR)\Cwd\Cwd
793 STORABLE                = $(EXTDIR)\Storable\Storable
794 LISTUTIL                = $(EXTDIR)\List\Util
795 MIMEBASE64              = $(EXTDIR)\MIME\Base64\Base64
796 XSTYPEMAP               = $(EXTDIR)\XS\Typemap\Typemap
797 UNICODENORMALIZE        = $(EXTDIR)\Unicode\Normalize\Normalize
798
799 ERRNO_PM_NW     = $(LIBDIR)\Errno.pm
800
801 EXTENSION_C     =               \
802                 $(SOCKET).c     \
803                 $(FCNTL).c      \
804                 $(OPCODE).c     \
805                 $(SDBM_FILE).c  \
806                 $(IO).c         \
807                 $(POSIX).c      \
808                 $(ATTRS).c      \
809                 $(THREAD).c     \
810                 $(RE).c         \
811                 $(DUMPER).c     \
812                 $(PEEK).c       \
813                 $(B).c          \
814                 $(BYTELOADER).c \
815                 $(DPROF).c      \
816                 $(GLOB).c       \
817                 $(HOSTNAME).c \
818                 $(CWD).c        \
819                 $(STORABLE).c   \
820                 $(LISTUTIL).c   \
821                 $(MIMEBASE64).c \
822                 $(XSTYPEMAP).c  \
823                 $(UNICODENORMALIZE).c   \
824
825 EXTENSION_NPM = \
826                 $(ERRNO_PM_NW)  \
827
828 POD2HTML        = $(PODDIR)\pod2html
829 POD2MAN         = $(PODDIR)\pod2man
830 POD2LATEX       = $(PODDIR)\pod2latex
831 POD2TEXT        = $(PODDIR)\pod2text
832
833 #
834 # Top targets
835 #
836
837 all : .cleanoldfiles .\nwconfig.h $(CONFIGPM) $(NLM_NAME) $(EXTENSION_NLP) $(EXTENSION_NPM) $(TEST_NLMS) $(NETWARE_EXTNS)
838
839 #------------------------------------------------------------
840
841 ..\config.sh : config.nw5 $(MINIPERL) config_sh.PL
842         $(MINIPERL) -I..\lib config_sh.PL $(NW_CFG_VARS) config.nw5 > ..\config.sh
843
844 # this target is for when changes to the main config.sh happen
845 # edit config.{b,v,g,w}c and make this target once for each supported
846 # compiler (e.g. `dmake CCTYPE=BORLAND regen_config_h`)
847 regen_config_h:
848         perl config_sh.PL $(NW_CFG_VARS) $(NW_CFGSH_TMPL) > ..\config.sh
849         cd ..
850         -del /f /q perl.exe
851         perl configpm
852         cd netware
853         -del /f /q $(NW_CFGH_TMPL)
854         -mkdir $(COREDIR)
855         -perl -I..\lib config_h.PL "INST_VER=$(INST_VER)"
856         rename config.h $(NW_CFGH_TMPL)
857
858 $(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl
859         cd .. && miniperl configpm
860         if exist lib\* $(RCOPY) lib\*.* ..\lib\$(NULL)
861         $(XCOPY) ..\*.h $(COREDIR)\*.*
862         $(XCOPY) *.h $(COREDIR)\*.*
863         $(XCOPY) ..\ext\re\re.pm $(LIBDIR)\*.*
864         if exist include\* $(RCOPY) include $(COREDIR)\*.*
865         $(MINIPERL) -I..\lib config_h.PL "INST_VER=$(INST_VER)" \
866             || $(MAKE) /$(MAKEFLAGS) $(CONFIGPM)
867
868 $(MINIPERL) : 
869         $(error)Please build $(MINIPERL) before continuing
870
871 $(MINIMOD) : $(MINIPERL) ..\minimod.pl
872         cd .. && miniperl minimod.pl > lib\ExtUtils\Miniperl.pm
873
874 ..\x2p\a2p$(o) : ..\x2p\a2p.c
875         @echo $(MPKMESSAGE)...$(BLDMESG)...$@
876         @$(C_COMPILER) -I..\x2p $(NLM_INCLUDES) $(COMPLER_FLAGS) $(ADD_LOCDEFS) $(OBJOUT_FLAG)$@ $(ERROR_FLAG)$*.err ..\x2p\a2p.c
877
878 ..\x2p\hash$(o) : ..\x2p\hash.c
879         @echo $(MPKMESSAGE)...$(BLDMESG)...$@
880         @$(C_COMPILER) -I..\x2p  $(NLM_INCLUDES) $(COMPLER_FLAGS) $(ADD_LOCDEFS)  $(OBJOUT_FLAG)$@ $(ERROR_FLAG)$*.err ..\x2p\hash.c
881
882 ..\x2p\str$(o) : ..\x2p\str.c
883         @echo $(MPKMESSAGE)...$(BLDMESG)...$@
884         @$(C_COMPILER) -I..\x2p  $(NLM_INCLUDES) $(COMPLER_FLAGS) $(ADD_LOCDEFS) $(OBJOUT_FLAG)$@ $(ERROR_FLAG)$*.err ..\x2p\str.c
885
886 ..\x2p\util$(o) : ..\x2p\util.c
887         @echo $(MPKMESSAGE)...$(BLDMESG)...$@
888         @$(C_COMPILER) -I..\x2p  $(NLM_INCLUDES) $(COMPLER_FLAGS) $(ADD_LOCDEFS) $(OBJOUT_FLAG)$@ $(ERROR_FLAG)$*.err ..\x2p\util.c
889
890 ..\x2p\walk$(o) : ..\x2p\walk.c
891         @echo $(MPKMESSAGE)...$(BLDMESG)...$@
892         @$(C_COMPILER) -I..\x2p  $(NLM_INCLUDES) $(COMPLER_FLAGS) $(ADD_LOCDEFS) $(OBJOUT_FLAG)$@ $(ERROR_FLAG)$*.err ..\x2p\walk.c
893
894 $(X2P) : $(MINIPERL) $(X2P_OBJ)
895         $(MINIPERL) ..\x2p\find2perl.PL
896         $(MINIPERL) ..\x2p\s2p.PL
897 !ifdef USE_XDC
898         $(MPKTOOL) $(XDCFLAGS) $*.xdc
899 !endif
900 !ifdef WATCOM
901         @$(NLM_LINK) @<<$*.link
902  Form   Novell NLM 'Awk to Perl converter'
903  Name   $(X2P)
904   Option Quiet
905  Option Version = $(NLM_VERSION)
906  Option Copyright '$(COPYRIGHT)'
907  Option Caseexact
908  Option Map=$*.map, Verbose, screenname 'System Console'
909  Option Stack=32k
910  Option SYMFILE=$*.sym
911 !ifdef USE_XDC
912  OPTION XDCDATA=$*.xdc
913 !endif
914  Option NoDefaultLibs
915  $(EXTRA_LINK_OPTION)
916 !if "$(MAKE_TYPE)"=="Debug"
917    Debug novell
918    Debug codeview
919 !endif
920 LibPath $(LIBPATH)
921  $(BASE_LIBRARIES)
922  Module clib
923  $(BASE_IMPORT_FNS)
924  $(BASE_IMPORT_FILES)
925  $(ADD_IMPORT_FNS)
926 Import @perl.imp
927  $(EXPORTS)
928  File   $(X2P_OBJ:.obj=,) .\$(BLDDIR)\clibstuf.obj
929 <<KEEP
930 !else
931 !ifdef CODEWARRIOR      
932 # Linker definitions and lining come here for CODEWARRIOR
933 !endif
934 !endif
935
936 $(EXTDIR)\DynaLoader\dl_netware.xs: dl_netware.xs
937         copy dl_netware.xs $(EXTDIR)\DynaLoader\dl_netware.xs
938
939 HEADERS :
940         @echo . . . . making stdio.h and string.h
941         @copy << stdio.h >\nul
942
943 /*
944  * Copyright Â© 2001 Novell, Inc. All Rights Reserved.
945  *
946  * You may distribute under the terms of either the GNU General Public
947  * License or the Artistic License, as specified in the README file.
948  *
949  */
950
951 /*
952  * FILENAME             :       stdio.h
953  * DESCRIPTION  :       Generated header file, do not edit. See makefile.
954  *                  This header file causes the includer to use clibstuf.h
955  *                  The purpose of clibstuf is to make sure that Perl, cgi2perl and
956  *                  all the perl extension nlm's (*.NLP) use the Novell Netware CLIB versions
957  *                  of standard functions. This code loads up a whole bunch of function pointers
958  *                  to point at the standard CLIB functions.
959  * Author               :       HYAK
960  * Date                 :       January 2001.
961  *
962  */
963
964
965 #ifndef __Stdio_H__
966 #define __Stdio_H__
967
968
969 #include "$(NLMSDKBASE)\INCLUDE\NLM\stdio.h"
970 #include "clibsdio.h"
971
972
973 #endif  // __Stdio_H__
974
975 <<
976         @copy stdio.h $(COREDIR)
977          
978         @copy << string.h >\nul
979
980 /*
981  * Copyright Â© 2001 Novell, Inc. All Rights Reserved.
982  *
983  * You may distribute under the terms of either the GNU General Public
984  * License or the Artistic License, as specified in the README file.
985  *
986  */
987
988 /*
989  * FILENAME             :       string.h
990  * DESCRIPTION  :       Generated header file, do not edit. See makefile.
991  *                  This header file causes the includer to use clibstuf.h
992  *                  The purpose of clibstuf is to make sure that Perl, cgi2perl and
993  *                  all the perl extension nlm's (*.NLP) use the Novell Netware CLIB versions
994  *                  of standard functions. This code loads up a whole bunch of function pointers
995  *                  to point at the standard CLIB functions.
996  * Author               :       HYAK
997  * Date                 :       January 2001.
998  *
999  */
1000
1001
1002 #ifndef __String_H__
1003 #define __String_H__
1004
1005
1006 #include "$(NLMSDKBASE)\INCLUDE\NLM\string.h"
1007 #include "clibstr.h"
1008
1009
1010 #endif  // __String_H__
1011
1012 <<
1013         @copy string.h $(COREDIR)
1014
1015
1016 $(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)
1017         @echo======= Linking $@ at $(MAKEDIR)\$(BLDDIR) =======
1018 !ifdef WATCOM
1019         @$(NLM_LINK) @<<$(BLDDIR)\$*.link
1020  Form   Novell NLM '$(NLM_DESCRIPTION)'
1021  Name   $(BUILT)
1022  Option Quiet
1023  Option Version = $(NLM_VERSION)
1024  Option Copyright '$(COPYRIGHT)'
1025  Option Caseexact
1026  Option Map=$(BLDDIR)\$(NLM_NAME8).map, Verbose, screenname $(SCREEN)
1027  Option Stack=1000
1028 !ifdef NLM_NAME8
1029  Option SYMFILE=$(BLDDIR)\$(NLM_NAME8).sym
1030 !ifdef USE_XDC
1031  OPTION XDCDATA=$(BLDDIR)\$(NLM_NAME8).xdc
1032 !endif
1033 !else
1034  Option SYMFILE=$(BLDDIR)\$(NLM_NAME).sym
1035 !ifdef USE_XDC
1036  OPTION XDCDATA=$(BLDDIR)\$(NLM_NAME).xdc
1037 !endif
1038 !endif
1039  Option NoDefaultLibs
1040  $(EXTRA_LINK_OPTION)
1041 !if "$(MAKE_TYPE)"=="Debug"
1042    # Debug all
1043    Debug novell
1044    Debug codeview
1045 !endif
1046 LibPath $(LIBPATH)
1047  $(BASE_LIBRARIES)
1048  Module clib
1049  Module netdb
1050  $(BASE_IMPORT_FNS)
1051  $(BASE_IMPORT_FILES)
1052  $(ADD_IMPORT_FNS)
1053 Import @perl.imp
1054  $(EXPORTS)
1055  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,)
1056 <<KEEP
1057 !else
1058 !ifdef CODEWARRIOR      
1059 # Linker definitions and lining come here for CODEWARRIOR
1060 !endif
1061 !endif
1062         copy ..\win32\splittree.pl .. 
1063         $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
1064
1065
1066 !if "$(MAKE_TYPE)"=="Debug"
1067 !ifdef NLM_NAME8
1068         .\bat\cvpack $(BLDDIR)\$(NLM_NAME8).sym
1069 !else
1070         .\bat\cvpack $(BLDDIR)\$(NLM_NAME).sym
1071 !endif
1072 !endif
1073
1074         @echo======= Finished building $(BUILT).
1075  
1076 # Create the debug\release directory if not existing
1077 $(BLDDIR)\nul:
1078         @echo . . . . mkdir $(BLDDIR)
1079         @mkdir $(BLDDIR)
1080
1081 MESSAGE: 
1082         @echo======= $(MAKE_ACTION)ing $(NLM_NAME) at $(MAKEDIR)\$(BLDDIR) ======= 
1083
1084 .XDC:
1085 !ifdef USE_XDC
1086         @echo======= Creating XDC file
1087 !ifdef NLM_NAME8
1088         $(MPKTOOL) $(XDCFLAGS) $(BLDDIR)\$(NLM_NAME8).xdc
1089 !else
1090         $(MPKTOOL) $(XDCFLAGS) $(BLDDIR)\$(NLM_NAME).xdc
1091 !endif
1092 !endif
1093
1094 $(PERLIMPLIB): perllib.def
1095         $(NLM_LIB) -def:perllib.def -out:$(PERLIMPLIB)
1096         $(XCOPY) $(PERLIMPLIB) $(COREDIR)
1097
1098 perllib.def : $(MINIPERL) $(CONFIGPM) ..\global.sym ..\pp.sym ..\makedef.pl
1099         $(MINIPERL) -w ..\makedef.pl PLATFORM=netware FILETYPE=def $(BS_CFLAGS) $(DEFINES) $(ADD_BUILDOPT) \
1100             CCTYPE=$(CCTYPE) > perllib.def
1101         $(MINIPERL) -w ..\makedef.pl PLATFORM=netware FILETYPE=imp $(BS_CFLAGS) $(DEFINES) $(ADD_BUILDOPT) \
1102             CCTYPE=$(CCTYPE) > perl.imp
1103
1104 $(DLL_OBJ) : $(DYNALOADER).c $(CORE_H) $(EXTDIR)\DynaLoader\dlutils.c
1105         @echo $(MPKMESSAGE)...$(BLDMESG)...$@
1106         @$(C_COMPILER) @<<$(BLDDIR)\$(*F).options 
1107         $(NLM_INCLUDES) -I$(EXTDIR)\DynaLoader\ $(COMPLER_FLAGS) $(ADD_LOCDEFS) $(OBJOUT_FLAG)$@ $(ERROR_FLAG)$(BLDDIR)\$(*F).err $(EXTDIR)\DynaLoader\$(*F).c
1108 <<KEEP
1109
1110 $(DYNALOADER).c : $(MINIPERL) $(EXTDIR)\DynaLoader\dl_netware.xs $(CONFIGPM)
1111         if not exist $(AUTODIR) mkdir $(AUTODIR)
1112         cd $(EXTDIR)\$(*B)
1113         ..\$(MINIPERL) -I..\..\lib $(*B)_pm.PL
1114         ..\$(MINIPERL) -I..\..\lib XSLoader_pm.PL
1115         cd ..\..\netware
1116         $(XCOPY) $(EXTDIR)\$(*B)\$(*B).pm $(LIBDIR)\$(NULL)
1117         $(XCOPY) $(EXTDIR)\$(*B)\XSLoader.pm $(LIBDIR)\$(NULL)
1118         cd $(EXTDIR)\$(*B)
1119         $(XSUBPP) dl_netware.xs > $(*B).c
1120         cd ..\..\netware
1121
1122 $(PERL_LIB_OBJ_DEP) : $(NW_HOST_H_FILES) $(*F).c
1123         @echo $(MPKMESSAGE)...$(BLDMESG)...$@
1124         @$(CPP_COMPILER) @<<$(BLDDIR)\$(*F).options 
1125         -I.. $(NLM_INCLUDES) $(COMPLER_FLAGS) $(ADD_LOCDEFS) $(OBJOUT_FLAG)$@ $(ERROR_FLAG)$*.err $(*F).c
1126 <<KEEP
1127
1128 $(PERL_IO_OBJ_DEP) : ..\$(*F).c
1129         @echo $(MPKMESSAGE) $(BLDMESG) $@
1130         @$(C_COMPILER) @<<$(BLDDIR)\$(*F).options 
1131         $(NLM_INCLUDES) $(COMPLER_FLAGS) $(ADD_LOCDEFS) $(OBJOUT_FLAG)$@ $(ERROR_FLAG)$*.err ..\$(*F).c
1132 <<KEEP
1133
1134 $(NLM_OBJ)      : ..\$(*F).c
1135         @echo $(MPKMESSAGE) $(BLDMESG) $@
1136         @$(C_COMPILER) @<<$(BLDDIR)\$(*F).options 
1137         $(NLM_INCLUDES) $(COMPLER_FLAGS) $(ADD_LOCDEFS) $(OBJOUT_FLAG)$@ $(ERROR_FLAG)$*.err ..\$(*F).c
1138 <<KEEP
1139
1140 $(NEWTARE_OBJ_DEP) : $(NW_H_FILES) $(NW_HOST_H_FILES) $(*F).c
1141         @echo $(MPKMESSAGE) $(BLDMESG) $@
1142         @$(C_COMPILER) @<<$(BLDDIR)\$(*F).options 
1143         $(NLM_INCLUDES) $(COMPLER_FLAGS) $(ADD_LOCDEFS) $(OBJOUT_FLAG)$@ $(ERROR_FLAG)$*.err $(*F).c
1144 <<KEEP
1145
1146 $(EXT_MAIN_OBJ) : $(CLIB_H_FILES)
1147         @echo $(MPKMESSAGE) $(BLDMESG) $@
1148         @$(C_COMPILER) @<<$(BLDDIR)\$(*F).options
1149         $(NLM_INCLUDES) $(COMPLER_FLAGS) $(ADD_LOCDEFS) $(OBJOUT_FLAG)$@ $(ERROR_FLAG)$*.err $(*F).c
1150 <<KEEP
1151         $(NLM_LIB) $@ $(NLMIMPORTS)\prelude.obj -out:$*.lib
1152         @copy $*.lib $(COREDIR)
1153
1154 # Delete any files that might have got created during building miniperl.exe
1155 # config.sh will definitely be created
1156 # COREDIR might have got created
1157 .cleanoldfiles :
1158         -del /f /q $(PERLIMPLIB)
1159         -del /f /q ..\lib\config.pm
1160         -del /f /q ..\config.sh
1161         -del /f /q .\Main.obj
1162         -del /f /q .\Main.lib
1163         -rmdir /s /q $(AUTODIR)
1164         -rmdir /s /q $(COREDIR)
1165         -del /f /q ..\lib\core
1166
1167 .\nwconfig.h : $(NW_CFGH_TMPL)
1168         -del /f /q config.h
1169         copy $(NW_CFGH_TMPL) config.h
1170
1171 # REQUIRED WHEN WE INCLUDE CONFIGPM OR REGEN_CONFIG - sgp
1172 #..\nwconfig.sh : config.nw5 $(MINIPERL) config_sh.PL
1173 #       $(MINIPERL) -I..\lib config_sh.PL $(NW_CFG_VARS) config.nw5 > ..\config.sh
1174 #       @pause
1175 #       cd ..
1176 #       del config.sh
1177 #       rename nwconfig.sh config.sh
1178 #       cd netware
1179
1180 config.nw5 : $(NW_CFGSH_TMPL)
1181         copy $(NW_CFGSH_TMPL) config.nw5
1182
1183 $(SOCKET_NLP): $(NLM_NAME) $(SOCKET).xs
1184         cd $(EXTDIR)\$(*B)
1185         ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1186         $(MAKE)
1187         cd ..\..\netware
1188
1189 $(HOSTNAME_NLP): $(NLM_NAME) $(HOSTNAME).xs
1190         cd $(EXTDIR)\Sys\$(*B)
1191         ..\..\..\miniperl -I..\..\..\lib Makefile.PL INSTALLDIRS=perl
1192         $(MAKE)
1193         cd ..\..\..\netware
1194
1195 $(FCNTL_NLP):
1196         cd $(EXTDIR)\$(*B)
1197         ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1198         $(MAKE)
1199         cd ..\..\netware
1200
1201 $(IO_NLP):
1202         cd $(EXTDIR)\$(*B)
1203         ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1204         $(MAKE)
1205         cd ..\..\netware
1206
1207 $(OPCODE_NLP):
1208         cd $(EXTDIR)\$(*B)
1209         ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1210         $(MAKE)
1211         cd ..\..\netware
1212
1213 $(B_NLP):
1214         cd $(EXTDIR)\$(*B)
1215         ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1216         $(MAKE)
1217         cd ..\..\netware
1218
1219 $(DUMPER_NLP):
1220         cd $(EXTDIR)\Data\$(*B)
1221         ..\..\..\miniperl -I..\..\..\lib Makefile.PL INSTALLDIRS=perl
1222         $(MAKE)
1223         cd ..\..\..\netware
1224
1225 $(PEEK_NLP):
1226         cd $(EXTDIR)\Devel\$(*B)
1227         ..\..\..\miniperl -I..\..\..\lib Makefile.PL INSTALLDIRS=perl
1228         $(MAKE)
1229         cd ..\..\..\netware
1230
1231 $(RE_NLP):
1232         cd $(EXTDIR)\$(*B)
1233         ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1234         $(MAKE)
1235         cd ..\..\netware
1236
1237 $(BYTELOADER_NLP):
1238         cd $(EXTDIR)\$(*B)
1239         ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1240         $(MAKE)
1241         cd ..\..\netware
1242
1243 $(DPROF_NLP):
1244         cd $(EXTDIR)\Devel\$(*B)
1245         ..\..\..\miniperl -I..\..\..\lib Makefile.PL INSTALLDIRS=perl
1246         $(MAKE)
1247         cd ..\..\..\netware
1248
1249 $(GLOB_NLP):
1250         cd $(EXTDIR)\File\$(*B)
1251         ..\..\..\miniperl -I..\..\..\lib Makefile.PL INSTALLDIRS=perl
1252         $(MAKE)
1253         cd ..\..\..\netware
1254
1255 $(POSIX_NLP):
1256         cd $(EXTDIR)\$(*B)
1257         ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1258         $(MAKE)
1259         cd ..\..\netware
1260
1261 $(THREAD_NLP):
1262         cd $(EXTDIR)\$(*B)
1263         ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1264         $(MAKE)
1265         cd ..\..\netware
1266
1267 $(ATTRS_NLP):
1268         cd $(EXTDIR)\$(*B)
1269         ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1270         $(MAKE)
1271         cd ..\..\netware
1272
1273 $(SDBM_FILE_NLP):
1274         cd $(EXTDIR)\$(*B)
1275         ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1276         $(MAKE)
1277         cd ..\..\netware
1278
1279 $(CWD_NLP):
1280         cd $(EXTDIR)\$(*B)
1281         ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1282         $(MAKE)
1283         cd ..\..\netware
1284
1285 $(STORABLE_NLP):
1286         cd $(EXTDIR)\$(*B)
1287         ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1288         $(MAKE)
1289         cd ..\..\netware
1290
1291 $(LISTUTIL_NLP):
1292         cd $(EXTDIR)\List\$(*B)
1293         ..\..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1294         $(MAKE)
1295         cd ..\..\..\netware
1296
1297 $(MIMEBASE64_NLP):
1298         cd $(EXTDIR)\Mime\$(*B)
1299         ..\..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1300         $(MAKE)
1301         cd ..\..\..\netware
1302
1303 $(XSTYPEMAP_NLP):
1304         cd $(EXTDIR)\XS\$(*B)
1305         ..\..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1306         $(MAKE)
1307         cd ..\..\..\netware
1308
1309 $(UNICODENORMALIZE_NLP):
1310         cd $(EXTDIR)\Unicode\$(*B)
1311         ..\..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1312         $(MAKE)
1313         cd ..\..\..\netware
1314
1315 $(ERRNO_PM_NW):
1316         cd $(EXTDIR)\$(*B)
1317         ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1318         $(MAKE)
1319         cd ..\..\netware
1320
1321 $(ECHO_SRC_OBJ): $*.c
1322         @echo $(MPKMESSAGE) $(BLDMESG) $@
1323         @$(C_COMPILER) @<<$*.options 
1324         $(NLM_INCLUDES) $(COMPLER_FLAGS) $(ADD_LOCDEFS) $(OBJOUT_FLAG)$@ $(ERROR_FLAG)$*.err $*.c
1325 <<KEEP
1326
1327 $(ECHO_NLM): $(ECHO_SRC_OBJ)
1328         @echo======= Linking $@ =======
1329 !ifdef USE_XDC
1330         $(MPKTOOL) $(XDCFLAGS) $*.xdc
1331 !endif
1332 !ifdef WATCOM
1333         @$(NLM_LINK) @<<$*.link
1334  Form   Novell NLM 'DOS echo emulation for Perl Testing' Name $@ 
1335  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
1336 !ifdef USE_XDC
1337  OPTION XDCDATA=$*.xdc
1338 !endif
1339  $(EXTRA_LINK_OPTION)
1340 !if "$(MAKE_TYPE)"=="Debug"
1341    Debug novell
1342    Debug codeview
1343 !endif
1344 LibPath $(LIBPATH)
1345  $(BASE_LIBRARIES) Module clib $(BASE_IMPORT_FNS) $(BASE_IMPORT_FILES) $(ADD_IMPORT_FNS)
1346 Import @perl.imp
1347  $(EXPORTS)
1348  File   $(ECHO_SRC_OBJ:.obj=.obj,) .\$(BLDDIR)\clibstuf.obj
1349 <<KEEP
1350 !else
1351 !ifdef CODEWARRIOR      
1352 # Linker definitions and lining come here for CODEWARRIOR
1353 !endif
1354 !endif
1355         @echo======= Linking Complete =======
1356
1357 $(TYPE_SRC_OBJ): $*.c
1358         @echo $(MPKMESSAGE) $(BLDMESG) $@
1359         @$(C_COMPILER) @<<$*.options 
1360         $(NLM_INCLUDES) $(COMPLER_FLAGS) $(ADD_LOCDEFS) $(OBJOUT_FLAG)$@ $(ERROR_FLAG)$*.err $*.c
1361 <<KEEP
1362
1363 $(TYPE_NLM): $(TYPE_SRC_OBJ)
1364         @echo======= Linking $@ =======
1365 !ifdef USE_XDC
1366         $(MPKTOOL) $(XDCFLAGS) $*.xdc
1367 !endif
1368 !ifdef WATCOM
1369         @$(NLM_LINK) @<<$*.link
1370  Form   Novell NLM 'DOS type emulation for Perl Testing' Name $@ 
1371  Option Quiet Option Version = $(NLM_VERSION) Option Copyright '$(COPYRIGHT)' Option Caseexact Option Map=$*.map, Verbose, screenname 'System Console' Option Stack=1000 Option SYMFILE=$*.sym
1372 !ifdef USE_XDC
1373  OPTION XDCDATA=$*.xdc
1374 !endif
1375  Option NoDefaultLibs
1376  $(EXTRA_LINK_OPTION)
1377 !if "$(MAKE_TYPE)"=="Debug"
1378    Debug novell
1379    Debug codeview
1380 !endif
1381 LibPath $(LIBPATH)
1382  $(BASE_LIBRARIES) Module clib $(BASE_IMPORT_FNS) $(BASE_IMPORT_FILES) $(ADD_IMPORT_FNS)
1383 Import @perl.imp
1384  $(EXPORTS)
1385  File   $(TYPE_SRC_OBJ:.obj=.obj,) .\$(BLDDIR)\clibstuf.obj
1386 <<KEEP
1387 !else
1388 !ifdef CODEWARRIOR      
1389 # Linker definitions and lining come here for CODEWARRIOR
1390 !endif
1391 !endif
1392         @echo======= Linking Complete =======
1393
1394 # Build NetWare specific extensions
1395 $(CGI2PERL_NLP):
1396 !if "$(NW_EXTNS)"=="yes"
1397         cd $(*B)
1398         ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1399         $(MAKE)
1400         cd ..\..\netware
1401 !endif
1402
1403 $(PERL2UCS_NLP):
1404 !if "$(NW_EXTNS)"=="yes"
1405         cd $(EXTDIR)\$(*B)
1406         ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1407         $(MAKE)
1408         cd ..\..\netware
1409 !endif
1410
1411 nwclean:
1412         -rmdir /s /q $(REL_DIR)
1413         -rmdir /s /q $(DEB_DIR)
1414         @if exist .\stdio.h del /f /q .\stdio.h
1415         @if exist .\string.h del /f /q .\string.h
1416         @if exist .\Main.obj del /f /q  .\Main.obj
1417         @if exist .\Main.lib del /f /q .\Main.lib
1418         @if exist .\config.nw5 del /f /q .\config.nw5
1419         @if exist .\perl.imp del /f /q .\perl.imp
1420         cd testnlm\echo
1421         -del /f /q *.obj *.map *.link *.options *.nlm *.sym *.xdc *.err
1422         cd ..\type
1423         -del /f /q *.obj *.map *.link *.options *.nlm *.sym *.xdc *.err
1424         cd ..\..\
1425
1426 utils: $(BLDDIR)\$(NLM_NAME8).$(NLM_EXT) $(X2P)
1427         cd ..\utils
1428         $(MAKE) PERL=$(MINIPERL)
1429         cd ..\pod
1430         copy ..\README.amiga .\perlamiga.pod
1431         copy ..\README.cygwin .\perlcygwin.pod
1432         copy ..\README.dos .\perldos.pod
1433         copy ..\README.hpux .\perlhpux.pod
1434 #       copy ..\README.machten .\perlmachten.pod
1435         copy ..\README.os2 .\perlos2.pod
1436         copy ..\vms\perlvms.pod .\perlvms.pod
1437         copy ..\README.win32 .\perlwin32.pod
1438         copy ..\README.netware .\perlnw5.pod
1439         $(MAKE) -f ..\win32\pod.mak converters
1440         cd ..\netware
1441         $(MINIPERL) $(PL2BAT) $(UTILS)
1442
1443 distclean: clean nwclean
1444         -del /f /q $(PERLIMPLIB) ..\miniperl.lib $(MINIMOD)
1445         -del /f /q *.def *.map
1446         -del /f /q $(EXTENSION_NPM)
1447         -del /f /q $(EXTENSION_C) $(DYNALOADER).c $(ERRNO).pm
1448         -del /f /q $(EXTDIR)\DynaLoader\dl_netware.xs
1449         -del /f /q $(LIBDIR)\.exists $(LIBDIR)\attrs.pm $(LIBDIR)\DynaLoader.pm
1450         -del /f /q $(LIBDIR)\XSLoader.pm
1451         -del /f /q $(LIBDIR)\Fcntl.pm $(LIBDIR)\IO.pm $(LIBDIR)\Opcode.pm
1452         -del /f /q $(LIBDIR)\ops.pm $(LIBDIR)\Safe.pm
1453         -del /f /q $(LIBDIR)\SDBM_File.pm $(LIBDIR)\Socket.pm $(LIBDIR)\POSIX.pm
1454         -del /f /q $(LIBDIR)\B.pm $(LIBDIR)\O.pm $(LIBDIR)\re.pm
1455         -del /f /q $(LIBDIR)\Data\Dumper.pm $(LIBDIR)\ByteLoader.pm
1456         -del /f /q $(LIBDIR)\Devel\Peek.pm $(LIBDIR)\Devel\DProf.pm
1457         -del /f /q $(LIBDIR)\File\Glob.pm
1458         -del /f /q $(LIBDIR)\Unicode\Normalize.pm
1459         -rmdir /s /q $(LIBDIR)\IO
1460         -rmdir /s /q $(LIBDIR)\Thread
1461         -rmdir /s /q $(LIBDIR)\B
1462         -rmdir /s /q $(LIBDIR)\Data
1463         -del /f /q $(PODDIR)\*.html
1464         -del /f /q $(PODDIR)\*.bat
1465         cd ..\utils
1466         -del /f /q h2ph splain perlbug pl2pm c2ph h2xs perldoc dprofpp
1467         -del /f /q *.bat
1468         cd ..\netware
1469         cd ..\x2p
1470         -del /f /q find2perl s2p
1471         -del /f /q *.bat
1472         -del /f /q *.obj *.map *.link *.xdc *.err
1473         cd ..\netware
1474         -del /f /q ..\config.sh ..\splittree.pl dlutils.c config.h.new
1475         -del /f /q $(CONFIGPM)
1476         -del /f /q bin\*.bat
1477         cd $(EXTDIR)
1478         -del /s /q *.lib *.def *.map *.pdb *.bs Makefile *$(o) pm_to_blib *.xdc *.err
1479         cd ..\netware
1480 !if "$(NW_EXTNS)"=="yes"
1481         cd cgi2perl
1482         -del /f /q *.obj *.bs Makefile *$(o) *.c pm_to_blib *.xdc *.err *.sym *.map
1483         cd ..
1484         cd $(EXTDIR)\Perl2UCS
1485         -del /f /q *.obj *.bs Makefile *$(o) *.c pm_to_blib *.xdc *.err *.sym *.map *.c
1486         cd ..\..\netware
1487 !endif
1488         -rmdir /s /q $(AUTODIR)
1489         -rmdir /s /q $(COREDIR)
1490         -del /f /q ..\config.sh
1491
1492 installwin:
1493         $(MINIPERL) -I..\lib ..\installperl
1494
1495 install : utils installwin
1496
1497 installnw:
1498         $(MINIPERL) -I..\lib ..\installperl -netware
1499
1500 install_tests :
1501         cd ..\t
1502         xcopy /f /r /i /s /d *.* $(INST_NW_TOP2)\scripts\t
1503         cd ..\lib
1504         xcopy /f /r /i /s /d *.t $(INST_NW_TOP2)\scripts\t\lib
1505         cd ..\ext
1506         xcopy /f /r /i /s /d *.t $(INST_NW_TOP2)\scripts\t\ext
1507         cd ..\netware\t
1508         xcopy /f /r /i /s /d *.pl $(INST_NW_TOP2)\scripts\t
1509         cd ..
1510
1511 nwinstall: utils installnw install_tests
1512
1513 inst_lib : $(CONFIGPM)
1514         copy ..\win32\splittree.pl .. 
1515         $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
1516         $(RCOPY) ..\lib $(INST_LIB)\*.*
1517
1518 clean : 
1519         -@erase miniperlmain$(o)
1520         -@erase /f config.h
1521         -@erase $(DLL_OBJ)
1522         -@erase ..\*$(o) ..\*.lib ..\*.exp *$(o) *.lib *.exp *.res
1523         -@erase ..\t\*.exe ..\t\*.dll ..\t\*.bat
1524         -@erase ..\x2p\*.nlm ..\x2p\*.bat
1525