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