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