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