summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-05-24 05:36:44 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-05-24 05:36:44 +0000
commitcedea190b107621491e9374674b8382221691335 (patch)
treed57622b4603591ea7a1d09cb31735005b87ffd8f /win32
parent3666098248b43282bda1153dae2f4c1e4af38d09 (diff)
downloadperl-cedea190b107621491e9374674b8382221691335.tar.gz
[asperl] tweak makefiles
p4raw-id: //depot/asperl@1031
Diffstat (limited to 'win32')
-rw-r--r--win32/Makefile80
-rw-r--r--win32/makefile.mk46
2 files changed, 90 insertions, 36 deletions
diff --git a/win32/Makefile b/win32/Makefile
index 05e3c3a467..335485a6d6 100644
--- a/win32/Makefile
+++ b/win32/Makefile
@@ -145,7 +145,7 @@ LINK_DBG = -debug -pdb:none
! IF "$(CCTYPE)" == "MSVC20"
OPTIMIZE = -Od $(RUNTIME) -DNDEBUG
! ELSE
-OPTIMIZE = -O2 $(RUNTIME) -DNDEBUG
+OPTIMIZE = -Od $(RUNTIME) -DNDEBUG
! ENDIF
LINK_DBG = -release
!ENDIF
@@ -180,7 +180,7 @@ o = .obj
.SUFFIXES : .c $(o) .dll .lib .exe
.c$(o):
- $(CC) -c $(CFLAGS_O) $(OBJOUT_FLAG)$@ $<
+ $(CC) -c -I$(<D) $(CFLAGS_O) $(OBJOUT_FLAG)$@ $<
.y.c:
$(NOOP)
@@ -267,7 +267,9 @@ CORE_SRC = \
..\universal.c \
..\util.c
-CORE_SRC = $(CORE_SRC) $(CRYPT_SRC)
+!IF "$(CRYPT_SRC)" != ""
+CORE_SRC = $(CORE_SRC) ..\$(CRYPT_SRC)
+!ENDIF
!IF "$(PERL_MALLOC)" == "define"
CORE_SRC = $(CORE_SRC) ..\malloc.c
@@ -281,8 +283,8 @@ WIN32_SRC = \
.\win32.c \
.\win32sck.c
-!IF "$(USE_THREADS)" == "define" || "$(OBJECT)" == ""
-WIN32_SRC = $(WIN32_SRC) .\win32thread.c
+!IF "$(USE_THREADS)" == "define"
+WIN32_SRC = $(WIN32_SRC) .\win32thread.c
!ENDIF
PERL95_SRC = \
@@ -290,6 +292,10 @@ PERL95_SRC = \
win32mt.c \
win32sckmt.c
+!IF "$(CRYPT_SRC)" != ""
+PERL95_SRC = $(PERL95_SRC) ..\$(CRYPT_SRC)
+!ENDIF
+
DLL_SRC = $(DYNALOADER).c
@@ -346,15 +352,17 @@ CORE_H = \
CORE_OBJ = $(CORE_SRC:.c=.obj)
WIN32_OBJ = $(WIN32_SRC:.c=.obj)
-MINICORE_OBJ = $(CORE_OBJ:..\=.\mini\) \
- $(MINIDIR)\perlio$(o) \
- $(MINIDIR)\miniperlmain$(o)
+MINICORE_OBJ = $(CORE_OBJ:..\=.\mini\) $(MINIDIR)\miniperlmain$(o)
MINIWIN32_OBJ = $(WIN32_OBJ:.\=.\mini\)
MINI_OBJ = $(MINICORE_OBJ) $(MINIWIN32_OBJ)
PERL95_OBJ = $(PERL95_SRC:.c=.obj) DynaLoadmt$(o)
DLL_OBJ = $(DLL_SRC:.c=.obj)
X2P_OBJ = $(X2P_SRC:.c=.obj)
+!IF "$(OBJECT)" != ""
+MINICORE_OBJ = $(MINICORE_OBJ) $(MINIDIR)\perlio$(o)
+!ENDIF
+
PERLDLL_OBJ = $(CORE_OBJ)
PERLEXE_OBJ = perlmain$(o)
@@ -364,7 +372,7 @@ PERLDLL_OBJ = $(PERLDLL_OBJ) $(WIN32_OBJ) $(DLL_OBJ)
PERLEXE_OBJ = $(PERLEXE_OBJ) $(WIN32_OBJ) $(DLL_OBJ)
!ENDIF
-DYNAMIC_EXT = Socket IO Fcntl Opcode SDBM_File attrs Thread B
+DYNAMIC_EXT = Socket IO Fcntl Opcode SDBM_File POSIX attrs Thread B
STATIC_EXT = DynaLoader
DYNALOADER = $(EXTDIR)\DynaLoader\DynaLoader
@@ -373,6 +381,7 @@ FCNTL = $(EXTDIR)\Fcntl\Fcntl
OPCODE = $(EXTDIR)\Opcode\Opcode
SDBM_FILE = $(EXTDIR)\SDBM_File\SDBM_File
IO = $(EXTDIR)\IO\IO
+POSIX = $(EXTDIR)\POSIX\POSIX
ATTRS = $(EXTDIR)\attrs\attrs
THREAD = $(EXTDIR)\Thread\Thread
B = $(EXTDIR)\B\B
@@ -382,26 +391,29 @@ FCNTL_DLL = $(AUTODIR)\Fcntl\Fcntl.dll
OPCODE_DLL = $(AUTODIR)\Opcode\Opcode.dll
SDBM_FILE_DLL = $(AUTODIR)\SDBM_File\SDBM_File.dll
IO_DLL = $(AUTODIR)\IO\IO.dll
+POSIX_DLL = $(AUTODIR)\POSIX\POSIX.dll
ATTRS_DLL = $(AUTODIR)\attrs\attrs.dll
THREAD_DLL = $(AUTODIR)\Thread\Thread.dll
B_DLL = $(AUTODIR)\B\B.dll
-EXTENSION_C = \
+EXTENSION_C = \
$(SOCKET).c \
$(FCNTL).c \
$(OPCODE).c \
$(SDBM_FILE).c \
$(IO).c \
+ $(POSIX).c \
$(ATTRS).c \
$(THREAD).c \
$(B).c
-EXTENSION_DLL = \
+EXTENSION_DLL = \
$(SOCKET_DLL) \
$(FCNTL_DLL) \
$(OPCODE_DLL) \
$(SDBM_FILE_DLL)\
$(IO_DLL) \
+ $(POSIX_DLL) \
$(ATTRS_DLL)
# $(THREAD_DLL) \
# $(B_DLL)
@@ -576,6 +588,9 @@ $(PERL95EXE): $(PERLDLL) $(CONFIGPM) $(PERL95_OBJ)
$(DYNALOADER).c: $(MINIPERL) $(EXTDIR)\DynaLoader\dl_win32.xs $(CONFIGPM)
if not exist $(AUTODIR) mkdir $(AUTODIR)
+ cd $(EXTDIR)\$(*B)
+ ..\$(MINIPERL) -I..\..\lib $(*B).pm.PL
+ cd ..\..\win32
$(XCOPY) $(EXTDIR)\$(*B)\$(*B).pm $(LIBDIR)\$(NULL)
cd $(EXTDIR)\$(*B)
$(XSUBPP) dl_win32.xs > $(*B).c
@@ -614,6 +629,12 @@ $(ATTRS_DLL): $(PERLEXE) $(ATTRS).xs
$(MAKE)
cd ..\..\win32
+$(POSIX_DLL): $(PERLEXE) $(POSIX).xs
+ cd $(EXTDIR)\$(*B)
+ ..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
+ $(MAKE)
+ cd ..\..\win32
+
$(IO_DLL): $(PERLEXE) $(IO).xs
cd $(EXTDIR)\$(*B)
..\..\miniperl -I..\..\lib Makefile.PL INSTALLDIRS=perl
@@ -657,24 +678,39 @@ doc: $(PERLEXE)
utils: $(PERLEXE)
cd ..\utils
- $(MAKE) PERL=$(PERLEXE)
+ $(MAKE) PERL=$(MINIPERL)
$(PERLEXE) -I..\lib ..\win32\$(PL2BAT) h2ph splain perlbug pl2pm c2ph
$(PERLEXE) ..\win32\$(PL2BAT) h2xs perldoc pstruct
$(XCOPY) *.bat ..\win32\bin\*.*
cd ..\win32
- $(PERLEXE) -I..\lib $(PL2BAT) bin\network.pl bin\www.pl bin\runperl.pl \
+ $(PERLEXE) $(PL2BAT) bin\network.pl bin\www.pl bin\runperl.pl \
bin\pl2bat.pl bin\perlglob.pl
-realclean: clean
+distclean: clean
-del /f $(MINIPERL) $(PERLEXE) $(PERL95EXE) $(PERLDLL) $(GLOBEXE) \
$(PERLIMPLIB) ..\miniperl.lib $(MINIMOD)
-del /f *.def *.map
-del /f $(EXTENSION_DLL)
- -del /f $(EXTENSION_C)
+ -del /f $(EXTENSION_C) $(DYNALOADER).c
+ -del /f $(EXTDIR)\DynaLoader\dl_win32.xs
+ -del /f $(LIBDIR)\.exists $(LIBDIR)\attrs.pm $(LIBDIR)\DynaLoader.pm
+ -del /f $(LIBDIR)\Fcntl.pm $(LIBDIR)\IO.pm $(LIBDIR)\Opcode.pm
+ -del /f $(LIBDIR)\ops.pm $(LIBDIR)\Safe.pm $(LIBDIR)\Thread.pm
+ -del /f $(LIBDIR)\SDBM_File.pm $(LIBDIR)\Socket.pm $(LIBDIR)\POSIX.pm
+ -del /f $(LIBDIR)\B.pm $(LIBDIR)\O.pm
+ -rmdir /s /q $(LIBDIR)\IO || rmdir /s $(LIBDIR)\IO
+ -rmdir /s /q $(LIBDIR)\Thread || rmdir /s $(LIBDIR)\Thread
+ -rmdir /s /q $(LIBDIR)\B || rmdir /s $(LIBDIR)\B
-del /f $(PODDIR)\*.html
-del /f $(PODDIR)\*.bat
- -del /f ..\utils\h2ph ..\utils\splain ..\utils\perlbug ..\utils\pl2pm ..\utils\c2ph
- -del /f ..\utils\h2xs ..\utils\perldoc ..\utils\pstruct ..\utils\*.bat
+ cd ..\utils
+ -del /f h2ph splain perlbug pl2pm c2ph h2xs perldoc pstruct
+ -del /f *.bat
+ cd ..\win32
+ cd ..\x2p
+ -del /f find2perl s2p
+ -del /f *.bat
+ cd ..\win32
-del /f ..\config.sh ..\splittree.pl perlmain.c dlutils.c config.h.new
-del /f $(CONFIGPM)
-del /f perl95.c
@@ -682,16 +718,8 @@ realclean: clean
cd $(EXTDIR)
-del /s *.lib *.def *.map *.bs Makefile *$(o) pm_to_blib
cd ..\win32
- -del /f $(EXTDIR)\DynaLoader\dl_win32.xs
- -del /f $(EXTDIR)\DynaLoader\DynaLoader.c
- -del /f $(LIBDIR)\.exists $(LIBDIR)\attrs.pm $(LIBDIR)\Dynaloader.pm $(LIBDIR)\FCntl.pm
- -del /f $(LIBDIR)\IO.pm $(LIBDIR)\Opcode.pm $(LIBDIR)\ops.pm $(LIBDIR)\Safe.pm
- -del /f $(LIBDIR)\SDBM_File.pm $(LIBDIR)\Socket.pm
- -del /f ..\x2p\find2perl ..\x2p\s2p
- -rmdir /s /q $(LIBDIR)\IO || rmdir /s $(LIBDIR)\IO
-rmdir /s /q $(AUTODIR) || rmdir /s $(AUTODIR)
-rmdir /s /q $(COREDIR) || rmdir /s $(COREDIR)
- -rmdir /s /q $(MINIDIR) || rmdir /s $(MINIDIR)
install : all installbare installutils installhtml
@@ -750,7 +778,7 @@ clean :
-@erase $(PERLDLL)
-@erase $(CORE_OBJ)
-@erase $(CAPILIB)
- -rmdir /s /q "$(MINIDIR)"
+ -rmdir /s /q $(MINIDIR) || rmdir /s $(MINIDIR)
-@erase $(WIN32_OBJ)
-@erase $(DLL_OBJ)
-@erase $(X2P_OBJ)
diff --git a/win32/makefile.mk b/win32/makefile.mk
index d7476452a8..f74c1be519 100644
--- a/win32/makefile.mk
+++ b/win32/makefile.mk
@@ -338,6 +338,7 @@ XCOPY = xcopy /f /r /i /d
RCOPY = xcopy /f /r /i /e /d
NOOP = @echo
+#
# filenames given to xsubpp must have forward slashes (since it puts
# full pathnames in #line strings)
XSUBPP = ..\$(MINIPERL) -I..\..\lib ..\$(EXTUTILSDIR)\xsubpp \
@@ -371,7 +372,9 @@ CORE_SRC = \
..\universal.c \
..\util.c
-CORE_SRC += $(CRYPT_SRC)
+.IF "$(CRYPT_SRC)" != ""
+CORE_SRC += ..\$(CRYPT_SRC)
+.ENDIF
.IF "$(PERL_MALLOC)" == "define"
CORE_SRC += ..\malloc.c
@@ -385,8 +388,8 @@ WIN32_SRC = \
.\win32.c \
.\win32sck.c
-.IF "$(USE_THREADS)" == "define" || "$(OBJECT)" == ""
-WIN32_SRC += .\win32thread.c
+.IF "$(USE_THREADS)" == "define"
+WIN32_SRC += .\win32thread.c
.ENDIF
PERL95_SRC = \
@@ -394,6 +397,10 @@ PERL95_SRC = \
win32mt.c \
win32sckmt.c
+.IF "$(CRYPT_SRC)" != ""
+PERL95_SRC += ..\$(CRYPT_SRC)
+.ENDIF
+
DLL_SRC = $(DYNALOADER).c
@@ -450,13 +457,17 @@ CORE_H = \
CORE_OBJ = $(CORE_SRC:db:+$(o))
WIN32_OBJ = $(WIN32_SRC:db:+$(o))
-MINICORE_OBJ = $(MINIDIR)\{$(CORE_OBJ:f) perlio$(o) miniperlmain$(o)}
+MINICORE_OBJ = $(MINIDIR)\{$(CORE_OBJ:f) miniperlmain$(o)}
MINIWIN32_OBJ = $(MINIDIR)\{$(WIN32_OBJ:f)}
MINI_OBJ = $(MINICORE_OBJ) $(MINIWIN32_OBJ)
PERL95_OBJ = $(PERL95_SRC:db:+$(o)) DynaLoadmt$(o)
DLL_OBJ = $(DLL_SRC:db:+$(o))
X2P_OBJ = $(X2P_SRC:db:+$(o))
+.IF "$(OBJECT)" != ""
+MINICORE_OBJ += $(MINIDIR)\perlio$(o)
+.ENDIF
+
PERLDLL_OBJ = $(CORE_OBJ)
PERLEXE_OBJ = perlmain$(o)
@@ -466,7 +477,7 @@ PERLDLL_OBJ += $(WIN32_OBJ) $(DLL_OBJ)
PERLEXE_OBJ += $(WIN32_OBJ) $(DLL_OBJ)
.ENDIF
-DYNAMIC_EXT = Socket IO Fcntl Opcode SDBM_File attrs Thread B
+DYNAMIC_EXT = Socket IO Fcntl Opcode SDBM_File POSIX attrs Thread B
STATIC_EXT = DynaLoader
DYNALOADER = $(EXTDIR)\DynaLoader\DynaLoader
@@ -475,6 +486,7 @@ FCNTL = $(EXTDIR)\Fcntl\Fcntl
OPCODE = $(EXTDIR)\Opcode\Opcode
SDBM_FILE = $(EXTDIR)\SDBM_File\SDBM_File
IO = $(EXTDIR)\IO\IO
+POSIX = $(EXTDIR)\POSIX\POSIX
ATTRS = $(EXTDIR)\attrs\attrs
THREAD = $(EXTDIR)\Thread\Thread
B = $(EXTDIR)\B\B
@@ -484,6 +496,7 @@ FCNTL_DLL = $(AUTODIR)\Fcntl\Fcntl.dll
OPCODE_DLL = $(AUTODIR)\Opcode\Opcode.dll
SDBM_FILE_DLL = $(AUTODIR)\SDBM_File\SDBM_File.dll
IO_DLL = $(AUTODIR)\IO\IO.dll
+POSIX_DLL = $(AUTODIR)\POSIX\POSIX.dll
ATTRS_DLL = $(AUTODIR)\attrs\attrs.dll
THREAD_DLL = $(AUTODIR)\Thread\Thread.dll
B_DLL = $(AUTODIR)\B\B.dll
@@ -494,6 +507,7 @@ EXTENSION_C = \
$(OPCODE).c \
$(SDBM_FILE).c \
$(IO).c \
+ $(POSIX).c \
$(ATTRS).c \
$(THREAD).c \
$(B).c
@@ -504,6 +518,7 @@ EXTENSION_DLL = \
$(OPCODE_DLL) \
$(SDBM_FILE_DLL)\
$(IO_DLL) \
+ $(POSIX_DLL) \
$(ATTRS_DLL)
# $(THREAD_DLL) \
# $(B_DLL)
@@ -733,6 +748,7 @@ $(PERL95EXE): $(PERLDLL) $(CONFIGPM) $(PERL95_OBJ)
$(DYNALOADER).c: $(MINIPERL) $(EXTDIR)\DynaLoader\dl_win32.xs $(CONFIGPM)
if not exist $(AUTODIR) mkdir $(AUTODIR)
+ cd $(EXTDIR)\$(*B) && ..\$(MINIPERL) -I..\..\lib $(*B).pm.PL
$(XCOPY) $(EXTDIR)\$(*B)\$(*B).pm $(LIBDIR)\$(NULL)
cd $(EXTDIR)\$(*B) && $(XSUBPP) dl_win32.xs > $(*B).c
$(XCOPY) $(EXTDIR)\$(*B)\dlutils.c .
@@ -795,7 +811,7 @@ doc: $(PERLEXE)
--libpod=perlfunc:perlguts:perlvar:perlrun:perlop --recurse
utils: $(PERLEXE)
- cd ..\utils && $(MAKE) PERL=$(PERLEXE)
+ cd ..\utils && $(MAKE) PERL=$(MINIPERL)
cd ..\utils && $(PERLEXE) ..\win32\$(PL2BAT) h2ph splain perlbug \
pl2pm c2ph h2xs perldoc pstruct
$(XCOPY) ..\utils\*.bat bin\*.*
@@ -807,13 +823,22 @@ distclean: clean
$(PERLIMPLIB) ..\miniperl.lib $(MINIMOD)
-del /f *.def *.map
-del /f $(EXTENSION_DLL)
- -del /f $(EXTENSION_C)
+ -del /f $(EXTENSION_C) $(DYNALOADER).c
+ -del /f $(EXTDIR)\DynaLoader\dl_win32.xs
+ -del /f $(LIBDIR)\.exists $(LIBDIR)\attrs.pm $(LIBDIR)\DynaLoader.pm
+ -del /f $(LIBDIR)\Fcntl.pm $(LIBDIR)\IO.pm $(LIBDIR)\Opcode.pm
+ -del /f $(LIBDIR)\ops.pm $(LIBDIR)\Safe.pm $(LIBDIR)\Thread.pm
+ -del /f $(LIBDIR)\SDBM_File.pm $(LIBDIR)\Socket.pm $(LIBDIR)\POSIX.pm
+ -del /f $(LIBDIR)\B.pm $(LIBDIR)\O.pm
+ -rmdir /s /q $(LIBDIR)\IO || rmdir /s $(LIBDIR)\IO
+ -rmdir /s /q $(LIBDIR)\Thread || rmdir /s $(LIBDIR)\Thread
+ -rmdir /s /q $(LIBDIR)\B || rmdir /s $(LIBDIR)\B
-del /f $(PODDIR)\*.html
-del /f $(PODDIR)\*.bat
-cd ..\utils && del /f h2ph splain perlbug pl2pm c2ph h2xs perldoc pstruct *.bat
-cd ..\x2p && del /f find2perl s2p *.bat
-del /f ..\config.sh ..\splittree.pl perlmain.c dlutils.c config.h.new
- -del /f ..\lib\Config.pm
+ -del /f $(CONFIGPM)
.IF "$(PERL95EXE)" != ""
-del /f perl95.c
.ENDIF
@@ -821,7 +846,8 @@ distclean: clean
-cd $(EXTDIR) && del /s *.lib *.def *.map *.bs Makefile *$(o) pm_to_blib
-rmdir /s /q $(AUTODIR) || rmdir /s $(AUTODIR)
-rmdir /s /q $(COREDIR) || rmdir /s $(COREDIR)
- -rmdir /s /q $(MINIDIR) || rmdir /s $(MINIDIR)
+
+install : all installbare installutils installhtml
installbare :
$(PERLEXE) ..\installperl
@@ -881,7 +907,7 @@ clean :
-@erase $(PERLEXE)
-@erase $(PERLDLL)
-@erase $(CORE_OBJ)
- -rmdir /s /q "$(MINIDIR)"
+ -rmdir /s /q $(MINIDIR) || rmdir /s $(MINIDIR)
-@erase $(WIN32_OBJ)
-@erase $(DLL_OBJ)
-@erase $(X2P_OBJ)