Artistic Style Install Information

Artistic Style Versions
Linux Version
Windows Version
Mac OS X Version

Artistic Style Versions

astyle_x.y_linux.tar.gz is the Linux version of Artistic Style. It contains the source code, documentation, and makefiles for compiling the source code. Refer to the Linux Version compile instructions below. Refer to the documentation for instructions on executing AStyle.exe. The Linux shell will allow the use of wildcards (such as *.cpp) during execution.

astyle_x.y_windows.zip is the Windows version of Artistic Style. It contains the source code, documentation, a Visual C project file, and an executable, AStyle.exe. Refer to the documentation for instructions on executing AStyle.exe. It has been compiled to allow the use of wildcards (such as *.cpp) during execution.

astyle_x.y_macosx.tar.gz is the Mac OS X version of Artistic Style. It contains the source code, documentation, and a makefile for compiling the source code. Refer to the Mac OS X Version compile instructions below. Refer to the documentation for instructions on executing AStyle.exe. The Mac shell will allow the use of wildcards (such as *.cpp) during execution.

The build directory in all versions contains all the makefiles and project files. If you want all platforms you need to download only one distribution package. The difference in distribution packages are the line endings and the executable included with Windows. Most development environments and compilers will accept either type of line ending.

 

Linux Version

GCC Compiler

To compile using the GCC compiler you must have GCC (3.1 or better) installed. To build the Artistic Style configurations use the makefile located in the astyle/build directory.  The executables will be in the astyle/bin directory.  To build the command line configuration enter the following:

    cd astyle/build
    make

To build the other astyle configurations you can enter the file name or a symbolic name.  Entering "make astyle" or "make release" will build the command line configuration.  Following are the symbolic names and file names (in parens) of the various configurations:

More than one configuration can be built at the same time.  For example, to build all of the release configurations enter:

    cd astyle/build
    make release shared static

Intel Compiler

The Intel makefile is named makeintel. To build astyle, use the makeintel file located in the astyle/build directory.  The executables will be in the astyle/bin directory.  To build the command line configuration enter the following:

    cd astyle/build
    make -f makeintel

Another way to compile with Intel is to rename "makeintel" as "makefile". Then the -f option is not needed. If this is done the Intel makefile will always be used instead of the GCC makefile.

The configuration names for Intel are the same as for the GCC compiler.  More than one configuration can be built at the same time.   For example, to build all of the debug configurations enter:

    cd astyle/build
    make -f makeintel debug shareddebug staticdebug

Other Makefile Options

The following options do not depend on the compiler and can be run using either makefile.

clean

To remove the object files for all configurations:

    make clean

The executables will not be removed.

install

You must have the appropriate permissions to use install.  To install the astyle executable to /usr/bin:

    make install

To install the executable to a different directory set a value for the macro $(prefix).  For example to install the executable to a users home directory (/home/user/bin):

   make prefix=$HOME/bin install
uninstall

You must have the appropriate permissions to use uninstall.  To uninstall the astyle executable from /usr/bin:

    make uninstall

To uninstall the executable from a different directory set a value for the macro $(prefix).  For example to uninstall the executable from a users home directory (/home/user/bin):

   make prefix=$HOME/bin uninstall

NOTE: The uninstall option will NOT remove the .astylerc files from the users home directories.  The files must be removed  individually for each user.

 

Windows Version

Precompiled Executable

In addition to the source files, the Windows version contains an astyle executable (AStyle.exe). The executable is compiled to allow wildcard use during execution.

Visual C++ Compiler

There is a project file for Visual C++ 2003 (version 7) or higher.  Open the file AStyle.sln in the AStyle/build directory.  Select the Release configuration to compile the command line version.  All output files will be in the AStyle/bin directory.  The project has the following configurations.

Other Compilers

To use other compilers a project file must be built using the compiler's development environment.

To compile as a static or dynamic library define the macro ASTYLE_LIB. Then use the appropriate compiler and linker options to compile the library or DLL.

Mac OS X Version

Mac OS X uses the same makefile as Linux GCC. To build the Artistic Style configurations use the makefile located in the astyle/build directory.  The executables will be in the astyle/bin directory.  To build the command line configuration enter the following:

    cd astyle/build
    make

The configurations for Mac are the same as for the Linux GCC compiler.  More than one configuration can be built at the same time.   For example, to build all of the release configurations enter:

    cd astyle/build
    make release shared static