12a4f2932SChristoph Malloncparser - A C99 parser (with GNU extensions)
2e7ab3b56SMatthias Braun============================================
3d5761655SMatthias Braun
439e6402fSMatthias BraunIntroduction
539e6402fSMatthias Braun------------
6d5761655SMatthias Braun
72a4f2932SChristoph Malloncparser is a recursive descent C99 parser written in C99.  It contains a
88eeea9caSMatthias Braunpreprocessor, lexer, parser, constructs an AST and does semantic analysis.  It
98eeea9caSMatthias Braunacts as a frontend to the libFirm intermediate representation library.  This
108eeea9caSMatthias Braunway optimization and code generation is performed. The compiler supports cross
11ecb0a54dSChristoph Malloncompilation to multiple target architectures with a command-line switch.  It
128eeea9caSMatthias Brauncomes with driver logic for calling assemblers and linkers as well as parsing
13092cfa26SChristoph Malloncommand-line options.  This allows it to be a drop-in replacement for gcc or
148eeea9caSMatthias Braunclang in many situations.
15d5761655SMatthias Braun
1639e6402fSMatthias BraunBuilding and Installation
1739e6402fSMatthias Braun-------------------------
18d5761655SMatthias Braun
19d5761655SMatthias BraunRequirements:
20e7ab3b56SMatthias Braun
21e7ab3b56SMatthias Braun* A C99 compiler (gcc and icc are known to work).
229ed9540aSMatthias Braun* libFirm-1.22
23d5761655SMatthias Braun
2439e6402fSMatthias Braun### Building with make
2539e6402fSMatthias Braun
2639e6402fSMatthias BraunUnpack libfirm in a directory called libfirm in the source directory
2739e6402fSMatthias Braunalternatively you may setup an alternate location with a 'config.mak' file.
2839e6402fSMatthias BraunJust type 'make' in the source directory. The results are put into a directory
2939e6402fSMatthias Brauncalled "build". You can override the existing preprocessor, compiler and linker
3039e6402fSMatthias Braunflags and built-in paths for include directories by creating a 'config.mak'
3139e6402fSMatthias Braunfile.
3239e6402fSMatthias Braun
3339e6402fSMatthias Braun### Building with cmake
3439e6402fSMatthias Braun
3539e6402fSMatthias Brauncparser has an additional cmake build system. CMake is a complexer build system
3639e6402fSMatthias Braunthan the make based build and most cparser developers do not use it.  However
3739e6402fSMatthias Braunit can adapt the compiler and linker flags to build shared libraries for a
3839e6402fSMatthias Braunwider range of systems, provides an installation target and is often more
3939e6402fSMatthias Braunfamiliar for people preparing packages for distribution.
4039e6402fSMatthias Braun
413fd69e64SMatthias Braun### Notes for a cparser installation
423fd69e64SMatthias Braun
433fd69e64SMatthias BraunWhile cparser often runs fine from the source/build directory, a proper
443fd69e64SMatthias Brauninstallation should be configured with correct system paths. For this a
453fd69e64SMatthias Braun`config.mak` file should be created and the following variables set apropriately
463fd69e64SMatthias Braunfor the system: `PREFIX`, `SYSTEM_INCLUDE_DIR`, `LOCAL_INCLUDE_DIR`,
473fd69e64SMatthias Braun`COMPILER_INCLUDE_DIR`, `MULTILIB_M32_TRIPLE`, `MULTILIB_M64_TRIPLE`,
483fd69e64SMatthias Braun`variant=optimize`.
493fd69e64SMatthias BraunThe variable may be defined empty; See `config.default.mak` and `Makefile` for
503fd69e64SMatthias Braundetails.
513fd69e64SMatthias Braun
5239e6402fSMatthias BraunFurther Information and Contact
5339e6402fSMatthias Braun-------------------------------
54d5761655SMatthias Braun
559ed9540aSMatthias BraunOfficial website: http://libfirm.org/
56f817440bSMatthias Braun
579ed9540aSMatthias BraunContact E-Mail: firm@ipd.info.uni-karlsruhe.de
58f817440bSMatthias Braun
594f04e3a1SMatthias BraunMailing list: https://lists.ira.uni-karlsruhe.de/mailman/listinfo/firm
60d5761655SMatthias Braun
619ed9540aSMatthias BraunBugtracker: http://pp.ipd.kit.edu/~firm/bugs
629ed9540aSMatthias Braun
639ed9540aSMatthias BraunInternet relay chat: irc://chat.freenode.net/#firm
64