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