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