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