diff options
Diffstat (limited to 'win32/Makefile')
-rw-r--r-- | win32/Makefile | 85 |
1 files changed, 55 insertions, 30 deletions
diff --git a/win32/Makefile b/win32/Makefile index 5da435915d..9431745331 100644 --- a/win32/Makefile +++ b/win32/Makefile @@ -14,7 +14,7 @@ INST_TOP=$(INST_DRV)\perl5004.5x # # uncomment to enable threads-capabilities -#USE_THREADS=-DUSE_THREADS +#USE_THREADS=define # # uncomment next line if you are using Visual C++ 2.x @@ -39,6 +39,13 @@ INST_TOP=$(INST_DRV)\perl5004.5x #CRYPT_LIB=des_fcrypt.lib # +# set this if you wish to use perl's malloc +# WARNING: Turning this on/off WILL break binary compatibility with extensions +# you may have compiled with/without it. Be prepared to recompile all extensions +# if you change the default. +PERL_MALLOC *= define + +# # set the install locations of the compiler include/libraries #CCHOME = f:\msvc20 CCHOME = $(MSVCDIR) @@ -59,19 +66,26 @@ D_CRYPT=define CRYPT_FLAG=-DHAVE_DES_FCRYPT !ENDIF -BUILDOPT = $(USE_THREADS) -#BUILDOPT = $(USE_THREADS) -DMULTIPLICITY -#BUILDOPT = $(USE_THREADS) -DPERL_GLOBAL_STRUCT -DMULTIPLICITY +!IF "$(PERL_MALLOC)" == "" +PERL_MALLOC = undef +!ENDIF + +#BUILDOPT = -DMULTIPLICITY +#BUILDOPT = -DPERL_GLOBAL_STRUCT -DMULTIPLICITY # -DUSE_PERLIO -D__STDC__=1 -DUSE_SFIO -DI_SFIO -I\sfio97\include +!IF "$(USE_THREADS)" == "" +USE_THREADS = undef +!ENDIF + !IF "$(PROCESSOR_ARCHITECTURE)" == "" PROCESSOR_ARCHITECTURE = x86 !ENDIF -!IF "$(USE_THREADS)" == "" -ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE) -!ELSE +!IF "$(USE_THREADS)" == "define" ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-thread +!ELSE +ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE) !ENDIF ARCHDIR = ..\lib\$(ARCHNAME) @@ -142,7 +156,7 @@ DMYMALLOC = define !IF "$(OBJECTDEF)" == "-DPERL_OBJECT" MINI_SRC = !ELSE -MINI_SRC = ..\perlio.c ..\malloc.c +MINI_SRC = ..\perlio.c !ENDIF LINK_FLAGS = -nologo $(LINK_DBG) -machine:$(PROCESSOR_ARCHITECTURE) OBJOUT_FLAG = -Fo @@ -214,8 +228,13 @@ NULL= CRYPT_OBJ=$(CRYPT_SRC:.c=.obj) !ENDIF +!IF "$(PERL_MALLOC)" == "define" +MALLOC_SRC = ..\malloc.c +MALLOC_OBJ = ..\malloc$(o) +!ENDIF + !IF "$(MINI_SRC)" != "" -MINI_OBJ=..\perlio$(o) ..\malloc$(o) +MINI_OBJ=..\perlio$(o) !ENDIF # @@ -224,6 +243,7 @@ MINI_OBJ=..\perlio$(o) ..\malloc$(o) XSUBPP=..\$(MINIPERLEXE) -I..\..\lib ..\$(EXTUTILSDIR)\xsubpp -C++ -prototypes CORE_C= ..\av.c \ + ..\byterun.c \ ..\deb.c \ ..\doio.c \ ..\doop.c \ @@ -248,10 +268,12 @@ CORE_C= ..\av.c \ ..\toke.c \ ..\universal.c \ ..\util.c \ - $(MINI_SRC) \ + $(MALLOC_SRC) \ + $(MINI_SRC) \ $(CRYPT_SRC) CORE_OBJ= ..\av$(o) \ + ..\byterun$(o) \ ..\deb$(o) \ ..\doio$(o) \ ..\doop$(o) \ @@ -276,7 +298,8 @@ CORE_OBJ= ..\av$(o) \ ..\toke$(o) \ ..\universal$(o)\ ..\util$(o) \ - $(MINI_OBJ) \ + $(MALLOC_OBJ) \ + $(MINI_OBJ) \ $(CRYPT_OBJ) WIN32_C = perllib.c \ @@ -311,6 +334,8 @@ X2P_OBJ = ..\x2p\a2p$(o) \ ..\x2p\walk$(o) CORE_H = ..\av.h \ + ..\byterun.h \ + ..\bytecode.h \ ..\cop.h \ ..\cv.h \ ..\dosish.h \ @@ -385,6 +410,24 @@ POD2MAN=$(PODDIR)\pod2man POD2LATEX=$(PODDIR)\pod2latex POD2TEXT=$(PODDIR)\pod2text +CFG_VARS= "INST_DRV=$(INST_DRV)" \ + "INST_TOP=$(INST_TOP)" \ + "archname=$(ARCHNAME)" \ + "cc=$(CC)" \ + "ccflags=$(OPTIMIZE) $(DEFINES)" \ + "cf_email=$(EMAIL)" \ + "d_crypt=$(D_CRYPT)" \ + "d_mymalloc=$(PERL_MALLOC)" \ + "libs=$(LIBFILES)" \ + "incpath=$(CCINCDIR)" \ + "libpth=$(CCLIBDIR)" \ + "libc=$(LIBC)" \ + "static_ext=$(STATIC_EXT)" \ + "dynamic_ext=$(DYNAMIC_EXT)" \ + "usethreads=$(USE_THREADS)" \ + "LINK_FLAGS=$(LINK_FLAGS)" \ + "optimize=$(OPTIMIZE)" + # # Top targets # @@ -413,25 +456,7 @@ config.w32 : $(CFGSH_TMPL) copy $(CFGH_TMPL) config.h ..\config.sh : config.w32 $(MINIPERL) config_sh.PL - $(MINIPERLEXE) -I..\lib config_sh.PL \ - "INST_DRV=$(INST_DRV)" \ - "INST_TOP=$(INST_TOP)" \ - "archname=$(ARCHNAME)" \ - "cc=$(CC)" \ - "ccflags=$(OPTIMIZE) $(DEFINES) $(OBJECT)"\ - "cf_email=$(EMAIL)" \ - "d_crypt=$(D_CRYPT)" \ - "libs=$(LIBFILES)" \ - "incpath=$(CCINCDIR)" \ - "libpth=$(CCLIBDIR)" \ - "libc=$(LIBC)" \ - "static_ext=$(STATIC_EXT)" \ - "dynamic_ext=$(DYNAMIC_EXT)" \ - "LINK_FLAGS=$(LINK_FLAGS)" \ - "optimize=$(OPTIMIZE)" \ - "libperl=$(PERLIMPLIB)" \ - "d_mymalloc=$(DMYMALLOC)" \ - config.w32 > ..\config.sh + $(MINIPERL) -I..\lib config_sh.PL $(CFG_VARS) config.w32 > ..\config.sh $(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl cd .. && miniperl configpm |