forked from emscripten-core/emscripten
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
188 lines (126 loc) · 6.02 KB
/
README
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
The freealut library
=====================
freealut is a free implementation of OpenAL's ALUT standard. See the file
AUTHORS for the people involved.
Building and installing on *nix-alikes using autotools
======================================================
To build and run ALUT, you need an OpenAL somewhere (and a sound card, of course
:-). If OpenAL is not installed in a standard place (let's say ${OPENAL_PREFIX})
you'll have to tell the build system about it:
CPPFLAGS="-I${OPENAL_PREFIX}/include"
LDFLAGS="-L${OPENAL_PREFIX}/lib"
export CPPFLAGS LDFLAGS
If you install ALUT from the CVS repository, you'll have to call
./autogen.sh
first, this will generate some necessary files for building ALUT.
If these initial preparations are done, you can simply run:
./configure
make
make install
The last step is optional and must be done as 'root', you can build and use the
test programs in 'test_suite' and the example programs in 'examples' without
installing ALUT. To build these, just go to the respective subdirectories and
run 'make'.
Alternatively, there is a spec file in the admin/RPM subdirectory, which can be
used to build an RPM.
Building with VisualStudio
==========================
The admin subdirectory contains VisualStudio6 and VisualStudioDotNET
subdirectories, which contain a Visual Studio 6 workspace and a Visual Studio
.NET solution, respectively. These expect the OpenAL SDK (header and import
library) at the standard path "C:\Program Files\OpenAL 1.1 with EFX SDK". If
this is not the case for your setup, you can change this either directly with a
text editor in the project files (the only way for *real* men ;-) or via the
project settings within Visual Studio. When everything is OK, just build
e.g. the hello_world project and you should get the ALUT library itself and a
demo with Steve Baker saying an immortal phrase.
Building with CMake
===================
The CMake build files are maintained by [email protected], so
if you have troubles building Alut using CMake, please contact
me and not the Alut devs, as the official build system is still
the one using autotools. The CMake build files are currenty
meant as an additional possibility to build Alut.
The aim of using CMake is making portable development easier, as
CMake containg generators for various build systems. On eg. Unix
Makefiles will be built, and on Windows MS VC++ project files, if
you wish. You can get CMake at cmake.org.
Current status:
The build system is feature complete, so it (should) build every-
thing as the default one does.
This document explains briefly how to build with CMake on Linux via out-
of-tree build:
- Change to the alut dir.
- Create a dir, eg "default", and change into it.
- Now (eg.) run:
cmake .. -DCMAKE_INSTALL_PREFIX:STRING="/usr" -DCMAKE_C_FLAGS:STRING="-march=athlon-xp -O2"
make
make install
If you exported your CFLAGS, there is no need to specify them
explicitly, as CMake will pick them up.
- OpenAL should get installed as you got used to it.
I really would like to get CMake building Alut on every
supported platform. So please contact me if it doesn't build
on yours. I'll try to fix this with your help.
Some Tips:
- You can use a console GUI named ccmake for configuring cmake.
This also comes in handy, to find out about available options.
You can also set options via command-line:
ccmake .. -DCMAKE_INSTALL_PREFIX:STRING="/usr" -DCMAKE_C_FLAGS:STRING="-march=athlon-xp -O2"
sets the two variables defined on command line and then starts
the GUI. Press 'c' the first time and every time you want to commit
changes in the config. Finally press 'g' to run the generator.
Btw, to set boolean vars from the command line, use -DVAR:BOOL=X,
where X is eg. ON or OFF.
- If you want more output at compile time, use
make VERBOSE=1
- If you want to install to a different directory (using same prefix),
use
make install DESTDIR=/foo/bar
- CMake doesn't has a distclean target by default, so you better
really do an out-of-tree build, then you can simply delete its
content when you want a distclean... Furthermore it is easier to
have different builds using different parameters via out-of-tree
builds.
- If you are interested in variables to set, take a look into
CMakeCache.txt after having run the configuring stage.
- If you update your source tree via cvs and want to rebuild an pre-
viously built lib without cleaning, you better at least clear the
CMake cache (remove CMakeCache.txt) otherwise a modified CMake project
file could result to unwanted behaviour.
Support
=======
Please don't email me the authors directly, sign up to the OpenAL user's mailing
list. Instructions can be found here:
http://www.openal.org/
Licensing
=========
These libraries are offered as OpenSource freeware under the provisions of the
GNU Library Public License (LGPL). Those terms and conditions are detailed in
the file 'COPYING' in this directory.
Portability and Dependencies
============================
This library is designed to be easily portable (and more importantly so that
programs using it can be UTTERLY portable).
Compiling/Linking with ALUT
===========================
In your source code, simply add:
#include <AL/alut.h>
On *nix-alikes, use
openal-config --cflags
openal-config --libs
to find out the compiler and linker flags needed for OpenAL, the flags needed
for ALUT itself depend on the --prefix option given to configure.
In a VisualStudio project, add the path to the ALUT header, import library and
DLL to your project settings as usual.
Directories
===========
Within this distribution, you will find the following directories:
admin -- Administrative files needed for building ALUT
doc -- The ALUT documentation
examples -- For application authors, here is a small collection of example
programs that you can use to get you started
include -- The ALUT header
src -- The source code for the ALUT library itself
test_suite -- A small suite of test programs to check that ALUT is installed and
working correctly