1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Artistic Style - Install Information</title>
<meta http-equiv="Content-Language" content="en-us" />
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
<link href="styles.css" rel="stylesheet" type="text/css" />
</head>
<body>
<h1>
Artistic Style Install Information</h1>
<p>
</p>
<h3 id="Contents">
Contents</h3>
<p class="contents1">
<a class="contents" href="#_Artistic_Style_Versions">Artistic Style Versions</a></p>
<p class="contents1">
<a class="contents" href="#_Linux_Version">Linux Version</a></p>
<p class="contents2">
<a class="contents" href="#_GCC_Compiler">GCC Compiler</a></p>
<p class="contents2">
<a class="contents" href="#_Intel_Compiler">Intel Compiler</a></p>
<p class="contents2">
<a class="contents" href="#_Other_Makefile_Options">Other Makefile Options</a></p>
<p class="contents1">
<a class="contents" href="#_Mac_OS_X_Version">Mac OS X Version</a></p>
<p class="contents1">
<a class="contents" href="#_OpenVMS_Version">OpenVMS Version</a></p>
<p class="contents1">
<a class="contents" href="#_Windows_Version">Windows Version</a></p>
<p class="contents2">
<a class="contents" href="#_Precompiled_Executable">Precompiled Executable</a></p>
<p class="contents2">
<a class="contents" href="#_Visual_C++_Compiler">Visual C++ Compiler</a></p>
<p class="contents2">
<a class="contents" href="#_Other_Compilers">Other Compilers</a></p>
<p class="contents1">
<a class="contents" href="#_Compiler_Options">Compiler Options</a></p>
<h3 id="_Artistic_Style_Versions">
Artistic Style Versions</h3>
<p>
astyle_x.x_linux.tar.gz is the <b>Linux</b> version of Artistic Style. It contains the source code, documentation,
and makefiles. The Linux Version compile instructions below give information for compiling the source code.</p>
<p>
astyle_x.x_macosx.tar.gz is the <b>Mac OS X</b> version of Artistic Style. It contains the source code, documentation,
and a makefile. The Mac OS X Version compile instructions below give information for compiling the source code.</p>
<p>
astyle_x_x_openvms.zip is the <b>OpenVMS</b> version of Artistic Style. It contains the source code, documentation,
object files, build files, and executables. The OpenVMS Version compile instructions below give information for
compiling the source code. Object code is included for people that don't have the Hewlett-Packard C++ compiler.</p>
<p>
astyle_x.x_windows.zip is the <b>Windows</b> version of Artistic Style. It contains the source code, documentation,
Visual C project files, and an executable. The Windows Version compile instructions below give information for
compiling the source code.</p>
<p>
Only one platform is supported in each distribution package. If you use Artistic Style on more than one platform
you will need to download packages for each platform. The main difference in platforms is the build directories
and the line endings. Most compilers and development packages will accept any type of line ending. The source
code and documentation are the same for all distributions.</p>
<h3 id="_Linux_Version">
Linux Version</h3>
<h4 id="_GCC_Compiler">
GCC Compiler</h4>
<p>
To compile using the GCC compiler you must have GCC (3.1 or better) installed. There is no autoconf dependency.
To build the Artistic Style configurations use the makefile located in the astyle/build/gcc directory. The executables
will be in the astyle/build/gcc/bin directory. To build the command line configuration enter the following:</p>
<pre>cd astyle/build/gcc<br />make
</pre>
<p>
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:</p>
<ul>
<li><b>release</b> builds the Artistic Style command line program (astyle). This is the default option.</li>
<li><b>shared</b> builds the Artistic Style program as a shared library (libastyle.so).</li>
<li><b>static</b> builds the Artistic Style program as a static library (libastyle.a).</li>
<li><b>debug</b> builds the Artistic Style command line program with debugging information (astyled).</li>
<li><b>shareddebug</b> builds the Artistic Style program as a shared library with debugging information (libastyled.so).</li>
<li><b>staticdebug</b> builds the Artistic Style program as a static library with debugging information (libastyled.a).</li>
<li><b>all</b> builds all of the above configurations.
<p>
The following Java shared library builds are separate from the above. They include a Java Native Interface (JNI)
and require that the Java Development Kit (JDK) be installed. The environment variable JAVA_HOME should be defined.
It defines the install directory for the JDK. The makefile also has default install directories for Java 5 and
6. If the compile cannot find the file jni.h, either set the variable or change the value in the makefile.</p>
</li>
<li><b>java</b> builds the Artistic Style program as a shared library which includes the JNI (libastylej.so).</li>
<li><b>javadebug</b> builds the Artistic Style program as a shared library which includes the JNI and debugging information
(libastylejd.so).</li>
<li><span style="font-weight: bold;">javaall</span> builds all of the above java configurations.</li>
</ul>
<p>
More than one configuration can be built at the same time. For example, to build all of the release configurations
enter:</p>
<pre>cd astyle/build/gcc<br />make release shared static
</pre>
<h4 id="_Intel_Compiler">
Intel Compiler</h4>
<p>
There is no autoconf dependency. To use the Intel makefile the files icc and icpc should be copied to /usr/sbin.
If the compiler release is 11.1 or higher the file iccvars.sh should also be copied to /usr/sbin. These files
are located in the installed directories of the compiler.</p>
<p>
Beginning with compiler release 11.1 there are environment variables that should be set before the make. To set
the variables enter "source iccvars.sh <em>arg</em>" where <em>arg</em> is ia32, intel64, or ia64. If this is
not done the make will display an error message "*** No rule to make target `obj/astyle_main.o', needed by `astyle'."
Instructions for the options are in the compiler documentation file "getting_started_c.pdf" in the section "Starting
the Compiler from the Command Line". To build the Artistic Style configurations use the makefile located in the
astyle/build/intel directory. The executables will be in the astyle/build/intel/bin directory. To build the command
line configuration enter the following:</p>
<pre>cd astyle/build/intel<br />make</pre>
<p>
To build the other astyle configurations you can enter the file name or a symbolic name. The configuration names
for Intel are the same as for the <a href="#_GCC_Compiler">GCC compiler</a>. More than one configuration can be
built at the same time. For example, to build all of the debug configurations enter:</p>
<pre>cd astyle/build/intel<br />make debug shareddebug staticdebug</pre>
<h4 id="_Other_Makefile_Options">
Other Makefile Options</h4>
<p>
The following makefile options are available for GCC, Intel, and Mac. With Intel use the script file make.sh.</p>
<h5>
clean</h5>
<p>
Removes the object and executable files for all configurations.</p>
<p>
To remove the files for all configurations:</p>
<pre>make clean
</pre>
<h5>
cleanobj</h5>
<p>
Removes the object files for all configurations. The executables will not be removed.</p>
<p>
To remove only the object files for all configurations:</p>
<pre>make cleanobj
</pre>
<h5>
install</h5>
<p>
Installs the executable and documentation files. The default is /usr/bin for the executable and /usr/share/astyle
for the documentation. You must have the appropriate permissions to use install.</p>
<p>
To install the astyle to the default directories:</p>
<pre>make install
</pre>
<p>
To install astyle to a different bin directory set a value for the macro $(prefix). For example to install the
executable to a user's home directory (/home/<i>user</i>/bin):</p>
<pre>make prefix=$HOME install
</pre>
<h5>
uninstall</h5>
<p>
Uninstalls the executable and documentation. You must have the appropriate permissions to use uninstall.
</p>
<p>
To uninstall astyle from the default directories:</p>
<pre>make uninstall
</pre>
<p>
To uninstall the files from a different directory set a value for the macro $(prefix). For example to uninstall
the files from a user's home directory (/home/<i>user</i>):</p>
<pre> make prefix=$HOME uninstall
</pre>
<p>
NOTE: The uninstall option will NOT remove the .astylerc files from the users home directories. The files must
be removed individually for each user.</p>
<h3 id="_Mac_OS_X_Version">
Mac OS X Version</h3>
<p>
There is no autoconf dependency. To build the Artistic Style configurations use the makefile located in the astyle/build/mac
directory. The executables will be in the astyle/build/mac/bin directory.
</p>
<p>
To build the command line configuration:</p>
<pre>cd astyle/build/mac<br />make
</pre>
<p>
To build the other astyle configurations you can enter the file name or a symbolic name. The configurations for
Mac are the same as for the <a href="#_GCC_Compiler">Linux GCC compiler</a>. More than one configuration can be
built at the same time. For example, to build all of the release configurations enter:</p>
<pre>cd astyle/build/mac<br />make release shared static
</pre>
<br />
<p>
The <a href="#_Other_Makefile_Options">Other Makefile Options</a> are the same as for the Linux compilers.</p>
<h3 id="_OpenVMS_Version">
OpenVMS Version</h3>
<p>
To build Artistic Style on an OpenVMS system, you will need Hewlett-Packard's C++ compiler installed. To build
the code, use the OpenVMS specific build file located in the astyle/build/vms directory. The executables will
be in the astyle/bin directory. To build the standalone executable, enter the following:</p>
<pre>set def [.astyle.build.vms]<br />@vmsbuild
</pre>
<p>
To run Artistic Style, you should move the standalone executable to an appropriate directory, and create a foreign
symbol for it. For example:</p>
<pre>create/dir my_disk:[astyle.exe]<br />set def [--.bin]<br />copy astyle_main.exe my_disk:[astyle.exe]<br />ast*yle :== $my_disk:[astyle.exe]astyle_main.exe
</pre>
<p>
The build command procedure also includes a method to build a sharable image version of the program, which can
be linked and called from other executable modules.</p>
<p>
Additionally, if you have a Java Development Kit installed, you can build a Java Native Interface version of the
program, which can be called from Java code.</p>
<p>
To build either of these versions, please see the comments located at the end of the VMSBUILD.COM command procedure.</p>
<p>
If you use Artistic Style on ODS-2 disks, you will need to specify a different suffix for file renaming, as the
default is .orig, and multi-dot filenames are not supported on ODS-2 disks. Add the --suffix=_orig switch to either
the command line or your Artistic Style initialization file.</p>
<p>
To set up an initialization file on OpenVMS, create a file and define a logical to point to it. For example:</p>
<pre>create my_disk:[astyle]astyle.ini<br /> --suffix=_orig<br /> ^Z<br />define artistic_style_options my_disk:[astyle]astyle.ini
</pre>
<h3 id="_Windows_Version">
Windows Version</h3>
<h4 id="_Precompiled_Executable">
Precompiled Executable</h4>
<p>
In addition to the source files, the Windows distribution package contains an Artistic Style Win32 executable
(AStyle.exe). If you prefer to compile the executable yourself follow the following instructions.</p>
<h4 id="_Visual_C++_Compiler">
Visual C++ Compiler</h4>
<p>
There are configuration and project files for 4 versions of the Visual C compiler; build/vs2005 (Visual Studio
2005), build/vs2008 (Visual Studio 2008) and build/vs2010 (Visual Studio 2010). Open the AStyle configuration
file in the appropriate "build" directory. All project files have Release and Debug configurations.
Release file output will be in the "bin" directory. Debug file output will be in the "debug"
directory. The following solution files are available.</p>
<ul>
<li><b>All AStyle</b> will build the release and the debug configurations for all of the following.</li>
<li><b>AStyle</b> builds the Artistic Style command line program (AStyle.exe). This project has an extra "Static"
option. It is the same as the "Release" build except that it is linked with a static runtime library. This is
needed if the executable is to be run on a system without Visual Studio installed. The builds for this configuration
are placed in a separate "binstatic" directory. </li>
<li><b>AStyleDll</b> builds the Artistic Style program as a Dynamic Link Library (AStyle.dll). This will also build
an exports library and a static library for linking the dll. </li>
<li><b>AStyleJava</b> builds the Artistic Style program as a Dynamic Link Library (AStylej.dll) that can be called
from a Java program. The Java Development (JDK) is required for the project to compile. This builds the Artistic
Style as a Dynamic Link Library (AStylej.dll) that can be called from a Java program. The Project Properties must
have an include path to the JDK include and include/win32 directories. This is set in "Project > Properties
> C/C++ > General > Additional Include Directories". The default setting is for the JDK
to be installed in the default directory, but it may not be the most current release. The output DLL can also
be called from a C++ or C# program.</li>
<li><b>AStyleLib</b> builds the Artistic Style program as a Static Library (libAStyle.lib). This can be statically
linked to a calling program.</li>
</ul>
<h4 id="_Other_Compilers">
Other Compilers</h4>
<p>
To use other compilers a project file must be built using a development environment.</p>
<ul>
<li>Create a project using the compiler's development environment</li>
<li>Add to the project all the .cpp and .h files in the "src" directory.</li>
<li>The Compiler Options section discusses the compiler options to use.</li>
<li>Compile.</li>
</ul>
<h3 id="_Compiler_Options">
Compiler Options</h3>
<p>
No macro definitions are required to compile the executable. To compile as a static or shared (dynamic) library
define the macro ASTYLE_LIB. To compile a Java shared (dynamic) library define the macro ASTYLE_JNI. Then use
the appropriate compiler and linker options to compile the static or shared library. Add debug options to compile
the debug versions.</p>
<p>
Artistic Style is a small program and it is best to optimize for speed. The debug configurations are not usually
optimized. To optimize for speed in the release configurations use the macro NDEBUG to remove asserts. Use an
option that allows inline function expansion. Runtime Type Information (RTTI) is NOT needed. Exceptions are not
used. Use whole program optimization if your compiler supports it. There may be other options you can use depending
on the compiler.</p>
<p>
</p>
<center style="margin-left: -0.4in;">
<a href="http://sourceforge.net/projects/astyle">
<img src="http://sflogo.sourceforge.net/sflogo.php?group_id=2319&type=16" width="150" height="40" alt="[SourceForge.net]" /></a>
</center>
<p>
</p>
</body>
</html>
|