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