1 | The freealut library |
---|
2 | ===================== |
---|
3 | |
---|
4 | freealut is a free implementation of OpenAL's ALUT standard. See the file |
---|
5 | AUTHORS for the people involved. |
---|
6 | |
---|
7 | |
---|
8 | Building and installing on *nix-alikes using autotools |
---|
9 | ====================================================== |
---|
10 | |
---|
11 | To build and run ALUT, you need an OpenAL somewhere (and a sound card, of course |
---|
12 | :-). If OpenAL is not installed in a standard place (let's say ${OPENAL_PREFIX}) |
---|
13 | you'll have to tell the build system about it: |
---|
14 | |
---|
15 | CPPFLAGS="-I${OPENAL_PREFIX}/include" |
---|
16 | LDFLAGS="-L${OPENAL_PREFIX}/lib" |
---|
17 | export CPPFLAGS LDFLAGS |
---|
18 | |
---|
19 | If you install ALUT from the CVS repository, you'll have to call |
---|
20 | |
---|
21 | ./autogen.sh |
---|
22 | |
---|
23 | first, this will generate some necessary files for building ALUT. |
---|
24 | |
---|
25 | If these initial preparations are done, you can simply run: |
---|
26 | |
---|
27 | ./configure |
---|
28 | make |
---|
29 | make install |
---|
30 | |
---|
31 | The last step is optional and must be done as 'root', you can build and use the |
---|
32 | test programs in 'test_suite' and the example programs in 'examples' without |
---|
33 | installing ALUT. To build these, just go to the respective subdirectories and |
---|
34 | run 'make'. |
---|
35 | |
---|
36 | Alternatively, there is a spec file in the admin/RPM subdirectory, which can be |
---|
37 | used to build an RPM. |
---|
38 | |
---|
39 | |
---|
40 | Building with VisualStudio |
---|
41 | ========================== |
---|
42 | |
---|
43 | The admin subdirectory contains VisualStudio6 and VisualStudioDotNET |
---|
44 | subdirectories, which contain a Visual Studio 6 workspace and a Visual Studio |
---|
45 | .NET solution, respectively. These expect the OpenAL SDK (header and import |
---|
46 | library) at the standard path "C:\Program Files\OpenAL 1.1 with EFX SDK". If |
---|
47 | this is not the case for your setup, you can change this either directly with a |
---|
48 | text editor in the project files (the only way for *real* men ;-) or via the |
---|
49 | project settings within Visual Studio. When everything is OK, just build |
---|
50 | e.g. the hello_world project and you should get the ALUT library itself and a |
---|
51 | demo with Steve Baker saying an immortal phrase. |
---|
52 | |
---|
53 | |
---|
54 | Building with CMake |
---|
55 | =================== |
---|
56 | |
---|
57 | The CMake build files are maintained by prakash@punnoor.de, so |
---|
58 | if you have troubles building Alut using CMake, please contact |
---|
59 | me and not the Alut devs, as the official build system is still |
---|
60 | the one using autotools. The CMake build files are currenty |
---|
61 | meant as an additional possibility to build Alut. |
---|
62 | |
---|
63 | The aim of using CMake is making portable development easier, as |
---|
64 | CMake containg generators for various build systems. On eg. Unix |
---|
65 | Makefiles will be built, and on Windows MS VC++ project files, if |
---|
66 | you wish. You can get CMake at cmake.org. |
---|
67 | |
---|
68 | Current status: |
---|
69 | The build system is feature complete, so it (should) build every- |
---|
70 | thing as the default one does. |
---|
71 | |
---|
72 | |
---|
73 | This document explains briefly how to build with CMake on Linux via out- |
---|
74 | of-tree build: |
---|
75 | |
---|
76 | - Change to the alut dir. |
---|
77 | - Create a dir, eg "default", and change into it. |
---|
78 | - Now (eg.) run: |
---|
79 | |
---|
80 | cmake .. -DCMAKE_INSTALL_PREFIX:STRING="/usr" -DCMAKE_C_FLAGS:STRING="-march=athlon-xp -O2" |
---|
81 | make |
---|
82 | make install |
---|
83 | |
---|
84 | If you exported your CFLAGS, there is no need to specify them |
---|
85 | explicitly, as CMake will pick them up. |
---|
86 | |
---|
87 | - OpenAL should get installed as you got used to it. |
---|
88 | |
---|
89 | |
---|
90 | I really would like to get CMake building Alut on every |
---|
91 | supported platform. So please contact me if it doesn't build |
---|
92 | on yours. I'll try to fix this with your help. |
---|
93 | |
---|
94 | |
---|
95 | Some Tips: |
---|
96 | |
---|
97 | - You can use a console GUI named ccmake for configuring cmake. |
---|
98 | This also comes in handy, to find out about available options. |
---|
99 | You can also set options via command-line: |
---|
100 | |
---|
101 | ccmake .. -DCMAKE_INSTALL_PREFIX:STRING="/usr" -DCMAKE_C_FLAGS:STRING="-march=athlon-xp -O2" |
---|
102 | |
---|
103 | sets the two variables defined on command line and then starts |
---|
104 | the GUI. Press 'c' the first time and every time you want to commit |
---|
105 | changes in the config. Finally press 'g' to run the generator. |
---|
106 | Btw, to set boolean vars from the command line, use -DVAR:BOOL=X, |
---|
107 | where X is eg. ON or OFF. |
---|
108 | |
---|
109 | - If you want more output at compile time, use |
---|
110 | |
---|
111 | make VERBOSE=1 |
---|
112 | |
---|
113 | - If you want to install to a different directory (using same prefix), |
---|
114 | use |
---|
115 | |
---|
116 | make install DESTDIR=/foo/bar |
---|
117 | |
---|
118 | - CMake doesn't has a distclean target by default, so you better |
---|
119 | really do an out-of-tree build, then you can simply delete its |
---|
120 | content when you want a distclean... Furthermore it is easier to |
---|
121 | have different builds using different parameters via out-of-tree |
---|
122 | builds. |
---|
123 | |
---|
124 | - If you are interested in variables to set, take a look into |
---|
125 | CMakeCache.txt after having run the configuring stage. |
---|
126 | |
---|
127 | - If you update your source tree via cvs and want to rebuild an pre- |
---|
128 | viously built lib without cleaning, you better at least clear the |
---|
129 | CMake cache (remove CMakeCache.txt) otherwise a modified CMake project |
---|
130 | file could result to unwanted behaviour. |
---|
131 | |
---|
132 | |
---|
133 | Support |
---|
134 | ======= |
---|
135 | |
---|
136 | Please don't email me the authors directly, sign up to the OpenAL user's mailing |
---|
137 | list. Instructions can be found here: |
---|
138 | |
---|
139 | http://www.openal.org/ |
---|
140 | |
---|
141 | |
---|
142 | Licensing |
---|
143 | ========= |
---|
144 | |
---|
145 | These libraries are offered as OpenSource freeware under the provisions of the |
---|
146 | GNU Library Public License (LGPL). Those terms and conditions are detailed in |
---|
147 | the file 'COPYING' in this directory. |
---|
148 | |
---|
149 | |
---|
150 | Portability and Dependencies |
---|
151 | ============================ |
---|
152 | |
---|
153 | This library is designed to be easily portable (and more importantly so that |
---|
154 | programs using it can be UTTERLY portable). |
---|
155 | |
---|
156 | |
---|
157 | Compiling/Linking with ALUT |
---|
158 | =========================== |
---|
159 | |
---|
160 | In your source code, simply add: |
---|
161 | |
---|
162 | #include <AL/alut.h> |
---|
163 | |
---|
164 | On *nix-alikes, use |
---|
165 | |
---|
166 | openal-config --cflags |
---|
167 | openal-config --libs |
---|
168 | |
---|
169 | to find out the compiler and linker flags needed for OpenAL, the flags needed |
---|
170 | for ALUT itself depend on the --prefix option given to configure. |
---|
171 | |
---|
172 | In a VisualStudio project, add the path to the ALUT header, import library and |
---|
173 | DLL to your project settings as usual. |
---|
174 | |
---|
175 | |
---|
176 | Directories |
---|
177 | =========== |
---|
178 | |
---|
179 | Within this distribution, you will find the following directories: |
---|
180 | |
---|
181 | admin -- Administrative files needed for building ALUT |
---|
182 | doc -- The ALUT documentation |
---|
183 | examples -- For application authors, here is a small collection of example |
---|
184 | programs that you can use to get you started |
---|
185 | include -- The ALUT header |
---|
186 | src -- The source code for the ALUT library itself |
---|
187 | test_suite -- A small suite of test programs to check that ALUT is installed and |
---|
188 | working correctly |
---|