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