Makefile for the C++ runtime of ANTLR 2.7.7 and Visual Studio 2008

Speedy Make makefile for the C++ version of the ANTLR grammar parser, compiled with Visual Studio 2008 or Visual C++ Express 2008, build 15.

The makefile is configured to produce a STATIC library, but you can change the options to produce a DLL as well.

Rule for compiling the sources

  /nologo /wd4101 /wd4291 /D"_CRT_SECURE_NO_WARNING" /I"." /I"lib/cpp/"
  /c /MT /W3 /Zc:forScope /FD /EHsc $sources

The /I option define the path of files to includes.
/c means for compile only, do not link.
See Visual C++ options for the meaning of other options or type cl /?

Rule to create a static library

 lib.exe /NOLOGO $sources[.obj] /out:$binary

The same list of source files is used again, but the .cpp extensions are replaced by .obj, this is the purpose of this variable:


Get the makefile

You can rename the file to to avoir to type the name at command line.

This makefile should work with other versions of ANTLR provided that the list of source files is updated.