[webkit-changes] cvs commit: JavaScriptCore Makefile.vc README-Win32.txt ChangeLog

Darin darin at opensource.apple.com
Sat Sep 10 22:27:31 PDT 2005


darin       05/09/10 22:27:30

  Modified:    .        ChangeLog
  Added:       .        Makefile.vc README-Win32.txt
  Log:
          Reviewed and landed by Darin.
  
          * Makefile.vc: Added.
          * README-Win32.txt: Added.
  
  Revision  Changes    Path
  1.824     +7 -0      JavaScriptCore/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/JavaScriptCore/ChangeLog,v
  retrieving revision 1.823
  retrieving revision 1.824
  diff -u -r1.823 -r1.824
  --- ChangeLog	10 Sep 2005 19:10:23 -0000	1.823
  +++ ChangeLog	11 Sep 2005 05:27:29 -0000	1.824
  @@ -1,3 +1,10 @@
  +2005-09-10  Krzysztof Kowalczyk  <kkowalczyk at gmail.com>
  +
  +        Reviewed and landed by Darin.
  +
  +        * Makefile.vc: Added.
  +        * README-Win32.txt: Added.
  +
   2005-09-10  Darin Adler  <darin at apple.com>
   
           - fixed compilation for WebCore (another try)
  
  
  
  1.1                  JavaScriptCore/Makefile.vc
  
  Index: Makefile.vc
  ===================================================================
  NULL=
  BASEDIR=.
  BINDIR=bin
  OBJDIR=obj
  KJSDIR=kjs
  PCREDIR=pcre
  
  ICUDIR=$(BASEDIR)\..\..\icu
  
  #
  # Define compiler flags
  #
  CC = cl.exe
  CFLAGS = $(CFLAGS) /nologo
  # 4996 - deprecated function, only needed for VS 2005 in which a lot
  #  of C standard functions that cause security risks (strcat, strcpy,
  #  printf etc.) were declared deprecated)
  # 4138 - */ found outside of comment
  # 4355 'this' : used in  base member initializer list
  CFLAGS = $(CFLAGS) /wd4138 /wd4996 /wd4355
  CFLAGS = $(CFLAGS) /D "HAVE_CONFIG_H"
  CFLAGS = $(CFLAGS) /D "WIN32" /D "__STD_C"
  CFLAGS = $(CFLAGS) /D "_MBCS" /D "_REENTRANT" /EHsc /W1
  CFLAGS = $(CFLAGS) /I$(BASEDIR)\os-win32
  CFLAGS = $(CFLAGS) /I$(BASEDIR)\pcre
  CFLAGS = $(CFLAGS) /I$(KJSDIR)
  CFLAGS = $(CFLAGS) /I$(ICUDIR)\include
  
  # /Zm increases max memory used by the compiler. It's for VC6 and compiling chartables.c
  #CFLAGS = $(CFLAGS) /Zm300
  
  !if "$(DEBUG)"=="1"
  CFLAGS = $(CFLAGS) /MDd /Od /Zi
  !else
  CFLAGS = $(CFLAGS) /D "NDEBUG" /MD /Zi
  !endif
  
  #
  # Define linker flags
  #
  LD = link.exe
  LDFLAGS = $(LDFLAGS) /nologo
  LDFLAGS = $(LDFLAGS) /LIBPATH:$(BINDIR) /LIBPATH:$(ICUDIR)\lib
  #LIBS = $(LIBS) icuin.lib icudt.lib icuio.lib icuuc.lib
  TESTKJS_LIBS = $(LIBS) jscore.lib
  LIBS = $(LIBS) icuuc.lib
  
  !if "$(DEBUG)"=="1"
  LDFLAGS = $(LDFLAGS) /DEBUG
  !else
  LDFLAGS = $(LDFLAGS) /OPT:NOWIN98 /DEBUG
  !endif
  
  #
  # Archiver flags
  #
  AR       = lib.exe
  ARFLAGS  = $(ARFLAGS) /nologo
  
  PCRE_OBJS=\
      $(OBJDIR)\pcre.obj \
      $(NULL)
  
  #
  # jscore.dll
  #
  JSCORE_DLL_OBJS=\
      $(OBJDIR)\array_object.obj \
      $(OBJDIR)\bool_object.obj \
      $(OBJDIR)\collector.obj \
      $(OBJDIR)\date_object.obj \
      $(OBJDIR)\debugger.obj \
      $(OBJDIR)\dtoa.obj \
      $(OBJDIR)\error_object.obj \
      $(OBJDIR)\fast_malloc.obj \
      $(OBJDIR)\fpconst.obj \
      $(OBJDIR)\function.obj \
      $(OBJDIR)\function_object.obj \
      $(OBJDIR)\grammar.obj \
      $(OBJDIR)\identifier.obj \
      $(OBJDIR)\internal.obj \
      $(OBJDIR)\interpreter.obj \
      $(OBJDIR)\interpreter_map.obj \
      $(OBJDIR)\lexer.obj \
      $(OBJDIR)\list.obj \
      $(OBJDIR)\lookup.obj \
      $(OBJDIR)\math_object.obj \
      $(OBJDIR)\nodes.obj \
      $(OBJDIR)\nodes2string.obj \
      $(OBJDIR)\number_object.obj \
      $(OBJDIR)\object.obj \
      $(OBJDIR)\object_object.obj \
      $(OBJDIR)\operations.obj \
      $(OBJDIR)\property_map.obj \
      $(OBJDIR)\property_slot.obj \
      $(OBJDIR)\protected_values.obj \
      $(OBJDIR)\reference.obj \
      $(OBJDIR)\reference_list.obj \
      $(OBJDIR)\regexp.obj \
      $(OBJDIR)\regexp_object.obj \
      $(OBJDIR)\scope_chain.obj \
      $(OBJDIR)\string_object.obj \
      $(OBJDIR)\ustring.obj \
      $(OBJDIR)\value.obj \
      $(NULL)
  
  JSCORE_DLL_NAME=jscore.dll
  JSCORE_DLL_LIB_NAME=jscore.lib
  
  TESTKJS_OBJS=\
      $(OBJDIR)\testkjs.obj \
      $(NULL)
  
  TESTKJS_EXE_NAME=testkjs.exe
  TESTKJS_PDB_NAME=testkjs.pdb
  
  #all: $(BINDIR)\$(JSCORE_DLL_NAME)
  
  all: $(BINDIR)\$(TESTKJS_EXE_NAME)
  
  clean:
      if exist $(OBJDIR) rmdir /S /Q $(OBJDIR)
      if exist $(BINDIR) rmdir /S /Q $(BINDIR)
  
  $(OBJDIR):
      if not exist $(OBJDIR) mkdir $(OBJDIR)
  
  $(BINDIR):
      if not exist $(BINDIR) mkdir $(BINDIR)
  
  #
  # jscore DLL
  #
  $(BINDIR)\$(JSCORE_DLL_NAME) : $(BINDIR) $(PCRE_OBJS) $(JSCORE_DLL_OBJS) $(BASEDIR)\jscore.def
  #       $(LD) $(LDFLAGS) $(LIBS) /DLL /DEF:$(BASEDIR)\jscore.def \
         $(LD) $(LDFLAGS) $(LIBS) /DLL \
                 $(PCRE_OBJS) $(JSCORE_DLL_OBJS) \
                 /IMPLIB:$(BINDIR)\$(JSCORE_DLL_LIB_NAME) \
                 /OUT:$(BINDIR)\$(JSCORE_DLL_NAME)
  
  $(BINDIR)\icuuc32.dll :
      copy $(ICUDIR)\bin\icuuc34.dll $(BINDIR)
  
  $(BINDIR)\icudt32.dll :
      copy $(ICUDIR)\bin\icudt34.dll $(BINDIR)
  
  $(BINDIR)\$(TESTKJS_EXE_NAME) : $(BINDIR) $(PCRE_OBJS) $(JSCORE_DLL_OBJS) $(TESTKJS_OBJS) \
          $(BINDIR)\icudt32.dll \
          $(BINDIR)\icuuc32.dll
      $(LD) $(LDFLAGS) $(LIBS) \
          $(PCRE_OBJS) $(JSCORE_DLL_OBJS) \
          $(TESTKJS_OBJS) \
          /PDB:$(BINDIR)\$(TESTKJS_PDB_NAME) \
          /OUT:$(BINDIR)\$(TESTKJS_EXE_NAME)
  
  $(JSCORE_DLL_OBJS) : $(OBJDIR)
  
  {$(BASEDIR)\kjs}.cpp{$(OBJDIR)}.obj::
         $(CC) $(CFLAGS) /Fo$(OBJDIR)\ /c $<
  
  {$(BASEDIR)\pcre}.c{$(OBJDIR)}.obj::
         $(CC) $(CFLAGS) /Fo$(OBJDIR)\ /c /Tp $<
  
  
  
  1.1                  JavaScriptCore/README-Win32.txt
  
  Index: README-Win32.txt
  ===================================================================
  Notes about building JavaScriptCore on Win32:
  
  The build has been tested with Visual Studio 2003 (7.1) and Visual Studio
  2005 Beta 2. It should also work with Microsft's free
  http://msdn.microsoft.com/visualc/vctoolkit2003 (which is basically
  the same compiler & linker that is a part of VS 2003 but without the IDE)
  but it has not been tested.
  
  It doesn't build with VS 6.
  
  To build:
   * make sure that the tools are in the path. VS comes with vcvars32.bat
     batch file somewhere under installation directory which sets all the
     proper env variables. I usually rename it to e.g. vc7.bat and put
     in my %PATH% for easy invocation)
   * you need to download ICU (http://www-306.ibm.com/software/globalization/icu/index.jsp)
     pre-built DLLs and header files. I've tested it with VS 7.1
     (ftp://ftp.software.ibm.com/software/globalization/icu/3.4/icu-3.4-Win32-msvc7.1.zip)
     Set ICUDIR to where you've downloaded the files.
   * you need perl for generating *.lut.h files
   * you need bison for generating parser from grammar.y (I use http://gnuwin32.sourceforge.net/packages/bison.htm)
   * nmake -f Makefile.vc clean
   * nmake -f Makefile.vc
   or
   * nmake -f Makefile.vc DEBUG=1
  
  What do you get: in bin subdirectory you'll find testkjs.exe executable
  which is a javascript interpreter. It can be used to run javascript
  tests in tests\mozilla (see \WebKitTools\scripts\run-javascriptcore-tests
  for an example on how to run them; you can use this script if you
  just replace "testkjs" with a full path to testkjs.exe.
  
  TODO
  
  Currently only testkjs.exe is built. It should also build a static
  .lib library so that it's easy to build programs incorporating the core.
  It should also build as a dynamic DLL. It's just a matter of fiddling
  with the makefile.
  
  
  



More information about the webkit-changes mailing list