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