2 ## Makefile to build Perl on NetWare using Microsoft NMAKE and Watcom tools
4 ## This will build perl.nlm, perl.lib and extensions called NLPs
8 ## Please read README.netware before starting
12 ## Build configuration. Edit the values below to suit your needs.
15 ## This file is created by using the makefile that creates Windows Perl as the reference
17 ## Date Created: 13th July 2000
18 ## Date Modified: 03th April 2001
29 NW_FLAGS = -DNETWARE -DNLM_PLATFORM -DNETDB_USE_INTERNET
36 !message "Run bat\buildtype.bat to set the build type before continuing.\n"
38 !endif #!ifndef MAKE_TYPE
41 MPKFLAGS = -DMPK_ON -DIAPX386
42 MPKMESSAGE = MPK Build...
46 !message "Run bat\setnwbld.bat to set the NetWare MPK SDK before continuing.\n"
48 !endif #ifndef MPKBASE
49 NLM_INCLUDE_MP = $(MPKBASE)\include
50 MPKTOOL = $(MPKBASE)\$(XDCTOOL)
52 MPKMESSAGE = Non MPK Build...
58 #NLMSDKBASE = P:\ndk\nwsdk
59 !message "Run bat\setnwbld.bat to set the NetWare SDK before continuing.\n"
61 !endif #ifndef NLMSDKBASE
62 NLMIMPORTS = $(NLMSDKBASE)\imports
69 TOOL_HEADERS = $(WATCOM)\H;$(WATCOM)\H\NT
70 TOOL_PATH = $(WATCOM)\BINNT;$(WATCOM)\BINW
71 CCFLAGS = /zp1 /5s /w1 /zq /ms /otexanih /fpi
72 COMPILER_FLAG = -DWATCOM
74 !if "$(MAKE_TYPE)"=="Debug"
76 BLDMESG = Debug version,
78 BS_CFLAGS = /od /d2 /en /st /hc -DDEBUGGING -DUSE_D2 $(DBG_FLAG)
79 BLDMESG = $(BLDMESG) Using /d2 option
81 BS_CFLAGS = /od /d1 /en /st /hc -DDEBUGGING $(DBG_FLAG)
82 BLDMESG = $(BLDMESG) Using /d1 option
86 BLDMESG = Release version
88 !endif #if "$(MAKE_TYPE)"=="Debug"
91 # Here comes the CW tools - TO BE FILLED TO BUILD WITH CW -
101 # Debug flags comes here - Not mandatory - required only for debug build
102 !if "$(MAKE_TYPE)"=="Debug"
104 BLDMESG = Debug version,
107 BLDMESG = $(BLDMESG) Using /d2 option
110 BLDMESG = $(BLDMESG) Using /d1 option
111 !endif #!ifdef USE_D2
114 BLDMESG = Release version
116 !endif #if "$(MAKE_TYPE)"=="Debug"
117 !else #!ifdef CODEWARRIOR
118 !message "Tools base directory is not defined. Run bat\setnwbld.bat before proceeding"
121 !endif #!ifdef CODEWARRIOR
124 ADD_LOCDEFS = -DPERL_CORE
126 NLM_INCLUDE = -I$(NLMSDKBASE)\include
127 NLM_INCLUDE_NLM = -I$(NLMSDKBASE)\include\nlm
128 NLM_INCLUDE_NLM_SYS = -I$(NLMSDKBASE)\include\nlm\sys
129 INCLUDE_NW = -I.\include
133 NLM_INCLUDE_PATH = $(NLMSDKBASE)\include\nlm;$(NLMSDKBASE)\include;$(NLMSDKBASE)\include\nlm\sys;$(NLM_INCLUDE_MP);$(TOOL_HEADERS)
135 INCLUDE = $(NLM_INCLUDE_PATH)
137 PATH = $(PATH);$(TOOL_PATH)
139 NLM_INCLUDES = -I$(COREDIR) $(INCLUDE_NW) $(INC_THIS) $(INC_PREV)
141 COMPLER_FLAGS = $(CCFLAGS) $(BS_CFLAGS) $(ADD_BUILDOPT) $(NW_FLAGS) $(COMPILER_FLAG) $(MPKFLAGS)
192 NW_SRC_OBJ = $(NW_SRC:.c=.obj)
193 NLM_MICROCORE_OBJ = $(MICROCORE_SRC:.c=.obj)
194 PERL_LIB_OBJ = $(PERL_LIB_SRC:.c=.obj)
195 PERL_IO_OBJ = $(PERL_IO_SRC:.c=.obj)
196 NLM_CORE_OBJ = $(NLM_MICROCORE_OBJ)
197 EXT_MAIN_OBJ = $(EXT_MAIN_SRC:.c=.obj)
199 # For dependency checking
200 # $(BLDDIR) in place of Release or Debug is not working, should look into this - sgp
201 !if "$(BLDDIR)"=="Release"
202 NLM_OBJ = $(NLM_CORE_OBJ:..\=.\Release\)
203 NEWTARE_OBJ_DEP = $(NW_SRC_OBJ:.\=.\Release\)
204 PERL_LIB_OBJ_DEP = $(PERL_LIB_OBJ:.\=.\Release\)
205 PERL_IO_OBJ_DEP = $(PERL_IO_OBJ:..\=.\Release\)
207 NLM_OBJ = $(NLM_CORE_OBJ:..\=.\Debug\)
208 NEWTARE_OBJ_DEP = $(NW_SRC_OBJ:.\=.\Debug\)
209 PERL_LIB_OBJ_DEP = $(PERL_LIB_OBJ:.\=.\Debug\)
210 PERL_IO_OBJ_DEP = $(PERL_IO_OBJ:..\=.\Debug\)
213 # Symbol base_import & version added for NETWARE
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)" \
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)" \
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)" \
242 "base_import=$(BASE_IMPORT_FILES)" \
243 "LINK_FLAGS=$(LINK_FLAGS:"=\")" \
246 "d_stdio_cnt_lval=undef" \
247 "d_stdio_ptr_lval=undef" \
248 "d_stdiobase=undef" \
252 "nlm_version=$(NLM_VERSION)" \
253 "d_archname=NetWare" \
254 "mpktool=$(MPKTOOL) $(XDCFLAGS)" \
255 "toolpath=$(TOOL_PATH)"
258 NW_CFGSH_TMPL = config.wc
259 NW_CFGH_TMPL = config_H.wc
261 SOCKET_NLP = $(AUTODIR)\Socket\Socket.nlp
262 FCNTL_NLP = $(AUTODIR)\Fcntl\Fcntl.nlp
263 IO_NLP = $(AUTODIR)\IO\IO.nlp
264 OPCODE_NLP = $(AUTODIR)\Opcode\Opcode.nlp
265 SDBM_FILE_NLP = $(AUTODIR)\SDBM_File\SDBM_File.nlp
266 POSIX_NLP = $(AUTODIR)\POSIX\POSIX.nlp
267 ATTRS_NLP = $(AUTODIR)\attrs\attrs.nlp
268 THREAD_NLP = $(AUTODIR)\Thread\Thread.nlp
269 B_NLP = $(AUTODIR)\B\B.nlp
270 DUMPER_NLP = $(AUTODIR)\Data\Dumper\Dumper.nlp
271 PEEK_NLP = $(AUTODIR)\Devel\Peek\Peek.nlp
272 RE_NLP = $(AUTODIR)\re\re.nlp
273 BYTELOADER_NLP = $(AUTODIR)\ByteLoader\ByteLoader.nlp
274 DPROF_NLP = $(AUTODIR)\Devel\DProf\DProf.nlp
275 GLOB_NLP = $(AUTODIR)\File\Glob\Glob.nlp
294 # Begin - Following is required to build NetWare specific extensions Perl2UCS & CGI2Perl
296 PERL2UCS = $(EXTDIR)\Perl2UCS\Perl2UCS
297 CGI2PERL = CGI2Perl\CGI2Perl
299 PERL2UCS_NLP = $(AUTODIR)\Perl2UCS\Perl2UCS.nlp
300 CGI2PERL_NLP = \CGI2Perl\CGI2Perl.nlp
308 ECHO_SRC = TestNLM\echo\echo.c
309 TYPE_SRC = TestNLM\type\type.c
310 ECHO_SRC_OBJ = $(ECHO_SRC:.c=.obj)
311 TYPE_SRC_OBJ = $(TYPE_SRC:.c=.obj)
312 ECHO_NLM = TestNLM\echo\echo.nlm
313 TYPE_NLM = TestNLM\type\type.nlm
319 ERRNO_PM_NW = $(LIBDIR)\Errno.pm
329 !ifndef NLM_DESCRIPTION
330 NLM_DESCRIPTION = $(NLM_NAME8) for Netware
342 BUILT = $(BLDDIR)\$(NLM_NAME8).$(NLM_EXT)
345 !ifndef BASE_IMPORT_FILES
346 BASE_IMPORT_FILES = Import @$(NLMIMPORTS)\clib.imp, @$(NLMIMPORTS)\nlmlib.imp, @$(NLMIMPORTS)\threads.imp, @$(NLMIMPORTS)\nit.imp, @$(NLMIMPORTS)\socklib.imp, @$(NLMIMPORTS)\fpsm.imp, @$(NLMIMPORTS)\lib0.imp
350 BASE_IMPORT_FILES = $(BASE_IMPORT_FILES), @$(MPKBASE)\import\mpkorg.imp
353 !ifndef BASE_IMPORT_FNS
354 BASE_IMPORT_FNS = Import ImportSymbol, GetSystemConsoleScreen, LoadModule
358 NWLIBPATH = $(WATCOM)\lib386\netware
359 LIBPATH386 = $(WATCOM)\lib386
360 LIBPATH = $(NWLIBPATH);$(LIBPATH386)
366 !else #!ifdef CODEWARRIOR
367 !error Please define the tools base directory before proceeding
368 !endif #!ifdef CODEWARRIOR
369 !endif #!ifdef WATCOM
371 !ifndef BASE_LIBRARIES
373 BASE_LIBRARIES = Library plib3s.lib,math3s.lib,clib3s.lib
377 !endif #!ifdef CODEWARRIOR
378 !endif #!ifdef WATCOM
379 !endif #!ifndef BASE_LIBRARIES
381 COPYRIGHT = Copyright 2001 by Novell, Inc. All rights reserved.
383 EXPORTS = Export @perl.imp
386 # Set these to wherever you want "nmake install" to put your
390 INST_TOP = $(INST_DRV)\perl
394 INST_NW_TOP1 = $(INST_NW_VOL)\perl
395 INST_NW_TOP2 = $(INST_NW_DRV)\perl
396 #INST_NW_VER = \5.6.1
399 # Comment this out if you DON'T want your perl installation to be versioned.
400 # This means that the new installation will overwrite any files from the
401 # old installation at the same INST_TOP location. Leaving it enabled is
402 # the safest route, as perl adds the extra version directory to all the
403 # locations it installs files to. If you disable it, an alternative
404 # versioned installation can be obtained by setting INST_TOP above to a
405 # path that includes an arbitrary version string.
410 # Comment this out if you DON'T want your perl installation to have
411 # architecture specific components. This means that architecture-
412 # specific files will be installed along with the architecture-neutral
413 # files. Leaving it enabled is safer and more flexible, in case you
414 # want to build multiple flavors of perl and install them together in
415 # the same location. Commenting it out gives you a simpler
416 # installation that is easier to understand for beginners.
418 INST_ARCH = \$(ARCHNAME)
421 # uncomment to enable multiple interpreters. This is need for fork()
427 # Beginnings of interpreter cloning/threads; still very incomplete.
428 # This should be enabled to get the fork() emulation. This needs
431 USE_ITHREADS = define
434 # uncomment to enable the implicit "host" layer for all system calls
435 # made by perl. This needs USE_MULTI above. This is also needed to
440 # uncomment this to enable the experimental PerlIO I/O subsystem
441 # else USE_STDIO will be defined.
446 # WARNING! This option is deprecated and will eventually go away (enable
447 # USE_ITHREADS instead).
449 # uncomment to enable threads-capabilities. This is incompatible with
450 # USE_ITHREADS, and is only here for people who may have come to rely
451 # on the experimental Thread support that was in 5.005.
453 #USE_5005THREADS= define
456 # WARNING! This option is deprecated and will eventually go away (enable
457 # USE_MULTI instead).
459 # uncomment next line if you want to use the PERL_OBJECT build option.
460 # DO NOT ENABLE unless you have legacy code that relies on the C++
461 # CPerlObj class that was available in 5.005. This cannot be enabled
462 # if you ask for USE_5005THREADS above.
466 # For now let this be here
468 #CRYPT_SRC = fcrypt.c
470 # For now let this be here
472 #CRYPT_LIB = fcrypt.lib
475 # set this if you wish to use perl's malloc
476 # WARNING: Turning this on/off WILL break binary compatibility with extensions
477 # you may have compiled with/without it. Be prepared to recompile all
478 # extensions if you change the default. Currently, this cannot be enabled
479 # if you ask for USE_IMP_SYS above.
481 #PERL_MALLOC = define
484 # set this to your email address (perl will guess a value from
485 # from your loginname and your hostname, which may not be right)
490 ## Build configuration ends.
493 ##################### CHANGE THESE ONLY IF YOU MUST #####################
495 !IF "$(CRYPT_SRC)$(CRYPT_LIB)" == ""
499 CRYPT_FLAG = -DHAVE_DES_FCRYPT
502 !IF "$(USE_OBJECT)" == "define"
504 USE_5005THREADS = undef
509 !IF "$(PERL_MALLOC)" == ""
513 !IF "$(USE_5005THREADS)" == ""
514 USE_5005THREADS = undef
517 !IF "$(USE_5005THREADS)" == "define"
521 !IF "$(USE_IMP_SYS)" == "define"
525 !IF "$(USE_MULTI)" == ""
529 !IF "$(USE_OBJECT)" == ""
533 !IF "$(USE_ITHREADS)" == ""
537 !IF "$(USE_IMP_SYS)" == ""
541 !IF "$(USE_PERLCRT)" == ""
545 !IF "$(USE_IMP_SYS)$(USE_MULTI)$(USE_5005THREADS)$(USE_OBJECT)" == "defineundefundefundef"
549 !IF "$(USE_ITHREADS)$(USE_MULTI)$(USE_OBJECT)" == "defineundefundef"
551 USE_5005THREADS = undef
554 !IF "$(USE_MULTI)$(USE_5005THREADS)$(USE_OBJECT)" != "undefundefundef"
555 BUILDOPT = $(BUILDOPT) -DPERL_IMPLICIT_CONTEXT
558 !IF "$(USE_IMP_SYS)" != "undef"
559 BUILDOPT = $(BUILDOPT) -DPERL_IMPLICIT_SYS
562 !IF "$(PROCESSOR_ARCHITECTURE)" == ""
563 PROCESSOR_ARCHITECTURE = x86
566 !IF "$(USE_OBJECT)" == "define"
567 ARCHNAME = NetWare-$(PROCESSOR_ARCHITECTURE)-object
569 !IF "$(USE_5005THREADS)" == "define"
570 ARCHNAME = NetWare-$(PROCESSOR_ARCHITECTURE)-thread
572 !IF "$(USE_MULTI)" == "define"
573 ARCHNAME = NetWare-$(PROCESSOR_ARCHITECTURE)-multi
575 ARCHNAME = NetWare-$(PROCESSOR_ARCHITECTURE)
580 !IF "$(USE_MULTI)$(USE_5005THREADS)$(USE_OBJECT)" != "undefundefundef"
581 ADD_BUILDOPT = $(ADD_BUILDOPT) -DPERL_IMPLICIT_CONTEXT
584 !IF "$(USE_IMP_SYS)" != "undef"
585 ADD_BUILDOPT = $(ADD_BUILDOPT) -DPERL_IMPLICIT_SYS
588 !IF "$(USE_ITHREADS)" == "define"
589 ARCHNAME = $(ARCHNAME)-thread
592 !IF "$(USE_PERLIO)" == "define"
594 ADD_BUILDOPT = $(ADD_BUILDOPT) -DUSE_PERLIO
595 ARCHNAME = $(ARCHNAME)-perlio
598 #ADD_BUILDOPT = $(ADD_BUILDOPT) -DUSE_STDIO
601 ARCHDIR = ..\lib\$(ARCHNAME)
602 COREDIR = ..\lib\CORE
603 AUTODIR = ..\lib\auto
607 EXTUTILSDIR = $(LIBDIR)\ExtUtils
610 INST_SCRIPT = $(INST_TOP)$(INST_VER)\bin
611 INST_BIN = $(INST_SCRIPT)$(INST_ARCH)
612 INST_LIB = $(INST_TOP)$(INST_VER)\lib
613 INST_ARCHLIB = $(INST_LIB)$(INST_ARCH)
614 INST_COREDIR = $(INST_ARCHLIB)\CORE
615 INST_POD = $(INST_LIB)\pod
616 INST_HTML = $(INST_POD)\html
622 !IF "$(USE_OBJECT)" == "define"
623 OPTIMIZE = $(OPTIMIZE) $(CXX_FLAG)
624 BUILDOPT = $(BUILDOPT) -DPERL_OBJECT
631 #################### do not edit below this line #######################
632 ############# NO USER-SERVICEABLE PARTS BEYOND THIS POINT ##############
640 .SUFFIXES : .c $(o) .nlm .lib .nlp
645 PERLIMPLIB = ..\perl.lib
647 MINIPERL = ..\miniperl.exe
648 CONFIGPM = ..\lib\Config.pm
649 MINIMOD = ..\lib\ExtUtils\Miniperl.pm
652 PL2BAT = ..\win32\bin\pl2bat.pl
677 XCOPY = xcopy /f /r /i /d
678 RCOPY = xcopy /f /r /i /e /d
683 # filenames given to xsubpp must have forward slashes (since it puts
684 # full pathnames in #line strings)
685 XSUBPP = ..\$(MINIPERL) -I..\..\lib ..\$(EXTUTILSDIR)\xsubpp \
718 #EXTRACORE_SRC = $(EXTRACORE_SRC) perllib.c
720 !IF "$(PERL_MALLOC)" == "define"
721 EXTRACORE_SRC = $(EXTRACORE_SRC) ..\malloc.c
724 #!IF "$(USE_OBJECT)" != "define"
725 #EXTRACORE_SRC = $(EXTRACORE_SRC) ..\perlio.c
728 !IF "$(CRYPT_SRC)" != ""
729 NW_SRC = $(NW_SRC) .\$(CRYPT_SRC)
732 DLL_SRC = $(DYNALOADER).c
777 CORE_H = $(CORE_NOCFG_H) .\config.h
779 DLL_OBJ = $(DLL_SRC:.c=.obj)
780 X2P_OBJ = $(X2P_SRC:.c=.obj)
782 DYNAMIC_EXT = Socket IO Fcntl Opcode SDBM_File POSIX attrs Thread B re \
783 Data/Dumper Devel/Peek ByteLoader Devel/DProf File/Glob
785 STATIC_EXT = DynaLoader
788 DYNALOADER = $(EXTDIR)\DynaLoader\DynaLoader
789 SOCKET = $(EXTDIR)\Socket\Socket
790 FCNTL = $(EXTDIR)\Fcntl\Fcntl
791 OPCODE = $(EXTDIR)\Opcode\Opcode
792 SDBM_FILE = $(EXTDIR)\SDBM_File\SDBM_File
794 POSIX = $(EXTDIR)\POSIX\POSIX
795 ATTRS = $(EXTDIR)\attrs\attrs
796 THREAD = $(EXTDIR)\Thread\Thread
799 DUMPER = $(EXTDIR)\Data\Dumper\Dumper
800 ERRNO = $(EXTDIR)\Errno\Errno
801 PEEK = $(EXTDIR)\Devel\Peek\Peek
802 BYTELOADER = $(EXTDIR)\ByteLoader\ByteLoader
803 DPROF = $(EXTDIR)\Devel\DProf\DProf
804 GLOB = $(EXTDIR)\File\Glob\Glob
823 POD2HTML = $(PODDIR)\pod2html
824 POD2MAN = $(PODDIR)\pod2man
825 POD2LATEX = $(PODDIR)\pod2latex
826 POD2TEXT = $(PODDIR)\pod2text
832 all : .cleanoldfiles .\nwconfig.h $(CONFIGPM) $(NLM_NAME) $(EXTENSION_NLP) $(EXTENSION_NPM) $(TEST_NLMS) $(NETWARE_EXTNS)
834 #------------------------------------------------------------
836 ..\config.sh : config.nw5 $(MINIPERL) config_sh.PL
837 $(MINIPERL) -I..\lib config_sh.PL $(NW_CFG_VARS) config.nw5 > ..\config.sh
839 # this target is for when changes to the main config.sh happen
840 # edit config.{b,v,g,w}c and make this target once for each supported
841 # compiler (e.g. `dmake CCTYPE=BORLAND regen_config_h`)
843 perl config_sh.PL $(NW_CFG_VARS) $(NW_CFGSH_TMPL) > ..\config.sh
848 -del /f $(NW_CFGH_TMPL)
850 -perl -I..\lib config_h.PL "INST_VER=$(INST_VER)"
851 rename config.h $(NW_CFGH_TMPL)
853 $(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl
854 cd .. && miniperl configpm
855 if exist lib\* $(RCOPY) lib\*.* ..\lib\$(NULL)
856 $(XCOPY) ..\*.h $(COREDIR)\*.*
857 $(XCOPY) *.h $(COREDIR)\*.*
858 $(XCOPY) ..\ext\re\re.pm $(LIBDIR)\*.*
859 if exist include\* $(RCOPY) include $(COREDIR)\*.*
860 $(MINIPERL) -I..\lib config_h.PL "INST_VER=$(INST_VER)" \
861 || $(MAKE) /$(MAKEFLAGS) $(CONFIGPM)
864 $(error)Please build $(MINIPERL) before continuing
866 $(MINIMOD) : $(MINIPERL) ..\minimod.pl
867 cd .. && miniperl minimod.pl > lib\ExtUtils\Miniperl.pm
869 ..\x2p\a2p$(o) : ..\x2p\a2p.c
870 @echo $(MPKMESSAGE)...$(BLDMESG)...$@
871 @$(C_COMPILER) -I..\x2p $(NLM_INCLUDES) $(COMPLER_FLAGS) $(ADD_LOCDEFS) $(OBJOUT_FLAG)$@ $(ERROR_FLAG)$*.err ..\x2p\a2p.c
873 ..\x2p\hash$(o) : ..\x2p\hash.c
874 @echo $(MPKMESSAGE)...$(BLDMESG)...$@
875 @$(C_COMPILER) -I..\x2p $(NLM_INCLUDES) $(COMPLER_FLAGS) $(ADD_LOCDEFS) $(OBJOUT_FLAG)$@ $(ERROR_FLAG)$*.err ..\x2p\hash.c
877 ..\x2p\str$(o) : ..\x2p\str.c
878 @echo $(MPKMESSAGE)...$(BLDMESG)...$@
879 @$(C_COMPILER) -I..\x2p $(NLM_INCLUDES) $(COMPLER_FLAGS) $(ADD_LOCDEFS) $(OBJOUT_FLAG)$@ $(ERROR_FLAG)$*.err ..\x2p\str.c
881 ..\x2p\util$(o) : ..\x2p\util.c
882 @echo $(MPKMESSAGE)...$(BLDMESG)...$@
883 @$(C_COMPILER) -I..\x2p $(NLM_INCLUDES) $(COMPLER_FLAGS) $(ADD_LOCDEFS) $(OBJOUT_FLAG)$@ $(ERROR_FLAG)$*.err ..\x2p\util.c
885 ..\x2p\walk$(o) : ..\x2p\walk.c
886 @echo $(MPKMESSAGE)...$(BLDMESG)...$@
887 @$(C_COMPILER) -I..\x2p $(NLM_INCLUDES) $(COMPLER_FLAGS) $(ADD_LOCDEFS) $(OBJOUT_FLAG)$@ $(ERROR_FLAG)$*.err ..\x2p\walk.c
889 $(X2P) : $(MINIPERL) $(X2P_OBJ)
890 $(MINIPERL) ..\x2p\find2perl.PL
891 $(MINIPERL) ..\x2p\s2p.PL
893 $(MPKTOOL) $(XDCFLAGS) $*.xdc
896 @$(NLM_LINK) @<<$*.link
897 Form Novell NLM 'Awk to Perl converter'
900 Option Version = $(NLM_VERSION)
901 Option Copyright '$(COPYRIGHT)'
903 Option Map=$*.map, Verbose, screenname 'System Console'
905 Option SYMFILE=$*.sym
907 OPTION XDCDATA=$*.xdc
911 !if "$(MAKE_TYPE)"=="Debug"
923 File $(X2P_OBJ:.obj=,) .\$(BLDDIR)\clibstuf.obj
927 # Linker definitions and lining come here for CODEWARRIOR
931 $(EXTDIR)\DynaLoader\dl_netware.xs: dl_netware.xs
932 copy dl_netware.xs $(EXTDIR)\DynaLoader\dl_netware.xs
935 @echo . . . . making stdio.h and string.h
936 @copy << stdio.h >\nul
939 * Copyright © 2001 Novell, Inc. All Rights Reserved.
941 * You may distribute under the terms of either the GNU General Public
942 * License or the Artistic License, as specified in the README file.
948 * DESCRIPTION : Generated header file, do not edit. See makefile.
949 * This header file causes the includer to use clibstuf.h
950 * The purpose of clibstuf is to make sure that Perl, cgi2perl and
951 * all the perl extension nlm's (*.NLP) use the Novell Netware CLIB versions
952 * of standard functions. This code loads up a whole bunch of function pointers
953 * to point at the standard CLIB functions.
955 * Date : January 2001.
964 #include "$(NLMSDKBASE)\INCLUDE\NLM\stdio.h"
965 #include "clibsdio.h"
968 #endif // __Stdio_H__
971 @copy stdio.h $(COREDIR)
973 @copy << string.h >\nul
976 * Copyright © 2001 Novell, Inc. All Rights Reserved.
978 * You may distribute under the terms of either the GNU General Public
979 * License or the Artistic License, as specified in the README file.
984 * FILENAME : string.h
985 * DESCRIPTION : Generated header file, do not edit. See makefile.
986 * This header file causes the includer to use clibstuf.h
987 * The purpose of clibstuf is to make sure that Perl, cgi2perl and
988 * all the perl extension nlm's (*.NLP) use the Novell Netware CLIB versions
989 * of standard functions. This code loads up a whole bunch of function pointers
990 * to point at the standard CLIB functions.
992 * Date : January 2001.
1001 #include "$(NLMSDKBASE)\INCLUDE\NLM\string.h"
1002 #include "clibstr.h"
1005 #endif // __String_H__
1008 @copy string.h $(COREDIR)
1011 $(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)
1012 @echo======= Linking $@ at $(MAKEDIR)\$(BLDDIR) =======
1014 @$(NLM_LINK) @<<$(BLDDIR)\$*.link
1015 Form Novell NLM '$(NLM_DESCRIPTION)'
1018 Option Version = $(NLM_VERSION)
1019 Option Copyright '$(COPYRIGHT)'
1021 Option Map=$(BLDDIR)\$(NLM_NAME8).map, Verbose, screenname $(SCREEN)
1024 Option SYMFILE=$(BLDDIR)\$(NLM_NAME8).sym
1026 OPTION XDCDATA=$(BLDDIR)\$(NLM_NAME8).xdc
1029 Option SYMFILE=$(BLDDIR)\$(NLM_NAME).sym
1031 OPTION XDCDATA=$(BLDDIR)\$(NLM_NAME).xdc
1034 Option NoDefaultLibs
1035 $(EXTRA_LINK_OPTION)
1036 !if "$(MAKE_TYPE)"=="Debug"
1045 $(BASE_IMPORT_FILES)
1049 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,)
1053 # Linker definitions and lining come here for CODEWARRIOR
1056 copy ..\win32\splittree.pl ..
1057 $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
1060 !if "$(MAKE_TYPE)"=="Debug"
1062 .\bat\cvpack $(BLDDIR)\$(NLM_NAME8).sym
1064 .\bat\cvpack $(BLDDIR)\$(NLM_NAME).sym
1068 @echo======= Finished building $(BUILT).
1070 # Create the debug\release directory if not existing
1072 @echo . . . . mkdir $(BLDDIR)
1076 @echo======= $(MAKE_ACTION)ing $(NLM_NAME) at $(MAKEDIR)\$(BLDDIR) =======
1080 @echo======= Creating XDC file
1082 $(MPKTOOL) $(XDCFLAGS) $(BLDDIR)\$(NLM_NAME8).xdc
1084 $(MPKTOOL) $(XDCFLAGS) $(BLDDIR)\$(NLM_NAME).xdc
1088 $(PERLIMPLIB): perllib.def
1089 $(NLM_LIB) -def:perllib.def -out:$(PERLIMPLIB)
1090 $(XCOPY) $(PERLIMPLIB) $(COREDIR)
1092 perllib.def : $(MINIPERL) $(CONFIGPM) ..\global.sym ..\pp.sym ..\makedef.pl
1093 $(MINIPERL) -w ..\makedef.pl PLATFORM=netware FILETYPE=def $(BS_CFLAGS) $(DEFINES) $(ADD_BUILDOPT) \
1094 CCTYPE=$(CCTYPE) > perllib.def
1095 $(MINIPERL) -w ..\makedef.pl PLATFORM=netware FILETYPE=imp $(BS_CFLAGS) $(DEFINES) $(ADD_BUILDOPT) \
1096 CCTYPE=$(CCTYPE) > perl.imp
1098 $(DLL_OBJ) : $(DYNALOADER).c $(CORE_H) $(EXTDIR)\DynaLoader\dlutils.c
1099 @echo $(MPKMESSAGE)...$(BLDMESG)...$@
1100 @$(C_COMPILER) @<<$(BLDDIR)\$(*F).options
1101 $(NLM_INCLUDES) -I$(EXTDIR)\DynaLoader\ $(COMPLER_FLAGS) $(ADD_LOCDEFS) $(OBJOUT_FLAG)$@ $(ERROR_FLAG)$(BLDDIR)\$(*F).err $(EXTDIR)\DynaLoader\$(*F).c
1104 $(DYNALOADER).c : $(MINIPERL) $(EXTDIR)\DynaLoader\dl_netware.xs $(CONFIGPM)
1105 if not exist $(AUTODIR) mkdir $(AUTODIR)
1107 ..\$(MINIPERL) -I..\..\lib $(*B)_pm.PL
1108 ..\$(MINIPERL) -I..\..\lib XSLoader_pm.PL
1110 $(XCOPY) $(EXTDIR)\$(*B)\$(*B).pm $(LIBDIR)\$(NULL)
1111 $(XCOPY) $(EXTDIR)\$(*B)\XSLoader.pm $(LIBDIR)\$(NULL)
1113 $(XSUBPP) dl_netware.xs > $(*B).c
1116 $(PERL_LIB_OBJ_DEP) : $(NW_HOST_H_FILES) $(*F).c
1117 @echo $(MPKMESSAGE)...$(BLDMESG)...$@
1118 @$(CPP_COMPILER) @<<$(BLDDIR)\$(*F).options
1119 -I.. $(NLM_INCLUDES) $(COMPLER_FLAGS) $(ADD_LOCDEFS) $(OBJOUT_FLAG)$@ $(ERROR_FLAG)$*.err $(*F).c
1122 $(PERL_IO_OBJ_DEP) : ..\$(*F).c
1123 @echo $(MPKMESSAGE) $(BLDMESG) $@
1124 @$(C_COMPILER) @<<$(BLDDIR)\$(*F).options
1125 $(NLM_INCLUDES) $(COMPLER_FLAGS) $(ADD_LOCDEFS) $(OBJOUT_FLAG)$@ $(ERROR_FLAG)$*.err ..\$(*F).c
1128 $(NLM_OBJ) : ..\$(*F).c
1129 @echo $(MPKMESSAGE) $(BLDMESG) $@
1130 @$(C_COMPILER) @<<$(BLDDIR)\$(*F).options
1131 $(NLM_INCLUDES) $(COMPLER_FLAGS) $(ADD_LOCDEFS) $(OBJOUT_FLAG)$@ $(ERROR_FLAG)$*.err ..\$(*F).c
1134 $(NEWTARE_OBJ_DEP) : $(NW_H_FILES) $(NW_HOST_H_FILES) $(*F).c
1135 @echo $(MPKMESSAGE) $(BLDMESG) $@
1136 @$(C_COMPILER) @<<$(BLDDIR)\$(*F).options
1137 $(NLM_INCLUDES) $(COMPLER_FLAGS) $(ADD_LOCDEFS) $(OBJOUT_FLAG)$@ $(ERROR_FLAG)$*.err $(*F).c
1140 $(EXT_MAIN_OBJ) : $(CLIB_H_FILES)
1141 @echo $(MPKMESSAGE) $(BLDMESG) $@
1142 @$(C_COMPILER) @<<$(BLDDIR)\$(*F).options
1143 $(NLM_INCLUDES) $(COMPLER_FLAGS) $(ADD_LOCDEFS) $(OBJOUT_FLAG)$@ $(ERROR_FLAG)$*.err $(*F).c
1145 $(NLM_LIB) $@ $(NLMIMPORTS)\prelude.obj -out:$*.lib
1146 @copy $*.lib $(COREDIR)
1148 # Delete any files that might have got created during building miniperl.exe
1149 # config.sh will definitely be created
1150 # COREDIR might have got created
1155 -rmdir /s /q $(AUTODIR)
1156 -rmdir /s /q $(COREDIR)
1158 .\nwconfig.h : $(NW_CFGH_TMPL)
1160 copy $(NW_CFGH_TMPL) config.h
1162 # REQUIRED WHEN WE INCLUDE CONFIGPM OR REGEN_CONFIG - sgp
1163 #..\nwconfig.sh : config.nw5 $(MINIPERL) config_sh.PL
1164 # $(MINIPERL) -I..\lib config_sh.PL $(NW_CFG_VARS) config.nw5 > ..\config.sh
1168 # rename nwconfig.sh config.sh
1171 config.nw5 : $(NW_CFGSH_TMPL)
1172 copy $(NW_CFGSH_TMPL) config.nw5
1174 $(SOCKET_NLP): $(NLM_NAME) $(SOCKET).xs
1176 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1182 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1188 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1194 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1200 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1205 cd $(EXTDIR)\Data\$(*B)
1206 ..\..\..\miniperl -I..\..\..\lib Makefile.PL INSTALLDIRS=perl
1211 cd $(EXTDIR)\Devel\$(*B)
1212 ..\..\..\miniperl -I..\..\..\lib Makefile.PL INSTALLDIRS=perl
1218 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1224 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1229 cd $(EXTDIR)\Devel\$(*B)
1230 ..\..\..\miniperl -I..\..\..\lib Makefile.PL INSTALLDIRS=perl
1235 cd $(EXTDIR)\File\$(*B)
1236 ..\..\..\miniperl -I..\..\..\lib Makefile.PL INSTALLDIRS=perl
1242 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1248 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1254 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1260 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1266 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1270 $(ECHO_SRC_OBJ): $*.c
1271 @echo $(MPKMESSAGE) $(BLDMESG) $@
1272 @$(C_COMPILER) @<<$*.options
1273 $(NLM_INCLUDES) $(COMPLER_FLAGS) $(ADD_LOCDEFS) $(OBJOUT_FLAG)$@ $(ERROR_FLAG)$*.err $*.c
1276 $(ECHO_NLM): $(ECHO_SRC_OBJ)
1277 @echo======= Linking $@ =======
1279 $(MPKTOOL) $(XDCFLAGS) $*.xdc
1282 @$(NLM_LINK) @<<$*.link
1283 Form Novell NLM 'DOS echo emulation for Perl Testing' Name $@
1284 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
1286 OPTION XDCDATA=$*.xdc
1288 $(EXTRA_LINK_OPTION)
1289 !if "$(MAKE_TYPE)"=="Debug"
1294 $(BASE_LIBRARIES) Module clib $(BASE_IMPORT_FNS) $(BASE_IMPORT_FILES) $(ADD_IMPORT_FNS)
1297 File $(ECHO_SRC_OBJ:.obj=.obj,) .\$(BLDDIR)\clibstuf.obj
1301 # Linker definitions and lining come here for CODEWARRIOR
1304 @echo======= Linking Complete =======
1306 $(TYPE_SRC_OBJ): $*.c
1307 @echo $(MPKMESSAGE) $(BLDMESG) $@
1308 @$(C_COMPILER) @<<$*.options
1309 $(NLM_INCLUDES) $(COMPLER_FLAGS) $(ADD_LOCDEFS) $(OBJOUT_FLAG)$@ $(ERROR_FLAG)$*.err $*.c
1312 $(TYPE_NLM): $(TYPE_SRC_OBJ)
1313 @echo======= Linking $@ =======
1315 $(MPKTOOL) $(XDCFLAGS) $*.xdc
1318 @$(NLM_LINK) @<<$*.link
1319 Form Novell NLM 'DOS type emulation for Perl Testing' Name $@
1320 Option Quiet Option Version = $(NLM_VERSION) Option Copyright '$(COPYRIGHT)' Option Caseexact Option Map=$*.map, Verbose, screenname 'System Console' Option Stack=1000 Option SYMFILE=$*.sym
1322 OPTION XDCDATA=$*.xdc
1324 Option NoDefaultLibs
1325 $(EXTRA_LINK_OPTION)
1326 !if "$(MAKE_TYPE)"=="Debug"
1331 $(BASE_LIBRARIES) Module clib $(BASE_IMPORT_FNS) $(BASE_IMPORT_FILES) $(ADD_IMPORT_FNS)
1334 File $(TYPE_SRC_OBJ:.obj=.obj,) .\$(BLDDIR)\clibstuf.obj
1338 # Linker definitions and lining come here for CODEWARRIOR
1341 @echo======= Linking Complete =======
1343 # Build NetWare specific extensions
1345 !if "$(NW_EXTNS)"=="yes"
1347 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1353 !if "$(NW_EXTNS)"=="yes"
1355 ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
1361 -rmdir /s /q $(REL_DIR) || rmdir /s $(REL_DIR)
1362 -rmdir /s /q $(DEB_DIR) || rmdir /s $(DEB_DIR)
1363 @if exist .\stdio.h del .\stdio.h
1364 @if exist .\string.h del .\string.h
1365 @if exist .\Main.obj del .\Main.obj
1366 @if exist .\Main.lib del .\Main.lib
1368 -del *.obj *.map *.link *.options *.nlm *.sym *.xdc *.err
1370 -del *.obj *.map *.link *.options *.nlm *.sym *.xdc *.err
1373 utils: $(BLDDIR)\$(NLM_NAME8).$(NLM_EXT) $(X2P)
1375 $(MAKE) PERL=$(MINIPERL)
1377 copy ..\README.amiga .\perlamiga.pod
1378 copy ..\README.cygwin .\perlcygwin.pod
1379 copy ..\README.dos .\perldos.pod
1380 copy ..\README.hpux .\perlhpux.pod
1381 # copy ..\README.machten .\perlmachten.pod
1382 copy ..\README.os2 .\perlos2.pod
1383 copy ..\vms\perlvms.pod .\perlvms.pod
1384 copy ..\README.win32 .\perlwin32.pod
1385 copy ..\README.netware .\perlnw5.pod
1386 $(MAKE) -f ..\win32\pod.mak converters
1388 $(MINIPERL) $(PL2BAT) $(UTILS)
1390 distclean: clean nwclean
1391 -del /f $(PERLIMPLIB) ..\miniperl.lib $(MINIMOD)
1393 -del /f $(EXTENSION_C) $(DYNALOADER).c $(ERRNO).pm
1394 -del /f $(EXTDIR)\DynaLoader\dl_netware.xs
1395 -del /f $(LIBDIR)\.exists $(LIBDIR)\attrs.pm $(LIBDIR)\DynaLoader.pm
1396 -del /f $(LIBDIR)\XSLoader.pm
1397 -del /f $(LIBDIR)\Fcntl.pm $(LIBDIR)\IO.pm $(LIBDIR)\Opcode.pm
1398 -del /f $(LIBDIR)\ops.pm $(LIBDIR)\Safe.pm $(LIBDIR)\Thread.pm
1399 -del /f $(LIBDIR)\SDBM_File.pm $(LIBDIR)\Socket.pm $(LIBDIR)\POSIX.pm
1400 -del /f $(LIBDIR)\B.pm $(LIBDIR)\O.pm $(LIBDIR)\re.pm
1401 -del /f $(LIBDIR)\Data\Dumper.pm $(LIBDIR)\ByteLoader.pm
1402 -del /f $(LIBDIR)\Devel\Peek.pm $(LIBDIR)\Devel\DProf.pm
1403 -del /f $(LIBDIR)\File\Glob.pm
1404 -rmdir /s /q $(LIBDIR)\IO || rmdir /s $(LIBDIR)\IO
1405 -rmdir /s /q $(LIBDIR)\Thread || rmdir /s $(LIBDIR)\Thread
1406 -rmdir /s /q $(LIBDIR)\B || rmdir /s $(LIBDIR)\B
1407 -rmdir /s /q $(LIBDIR)\Data || rmdir /s $(LIBDIR)\Data
1408 -del /f $(PODDIR)\*.html
1409 -del /f $(PODDIR)\*.bat
1411 -del /f h2ph splain perlbug pl2pm c2ph h2xs perldoc dprofpp
1415 -del /f find2perl s2p
1417 -del *.obj *.map *.link *.xdc *.err
1419 -del /f ..\config.sh ..\splittree.pl dlutils.c config.h.new
1423 -del /s *.lib *.def *.map *.pdb *.bs Makefile *$(o) pm_to_blib *.xdc *.err
1425 !if "$(NW_EXTNS)"=="yes"
1427 -del *.obj *.bs Makefile *$(o) *.c pm_to_blib *.xdc *.err
1430 -rmdir /s /q $(AUTODIR) || rmdir /s $(AUTODIR)
1431 -rmdir /s /q $(COREDIR) || rmdir /s $(COREDIR)
1435 $(MINIPERL) -I..\lib ..\installperl
1437 install : utils installwin
1440 $(MINIPERL) -I..\lib ..\installperl -netware
1442 nwinstall: utils installnw
1444 inst_lib : $(CONFIGPM)
1445 copy ..\win32\splittree.pl ..
1446 $(MINIPERL) -I..\lib ..\splittree.pl "../LIB" $(AUTODIR)
1447 $(RCOPY) ..\lib $(INST_LIB)\*.*
1450 -@erase miniperlmain$(o)
1453 -@erase ..\*$(o) ..\*.lib ..\*.exp *$(o) *.lib *.exp *.res
1454 -@erase ..\t\*.exe ..\t\*.dll ..\t\*.bat
1455 -@erase ..\x2p\*.nlm ..\x2p\*.bat