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