]> git.saurik.com Git - wxWidgets.git/blob - install/gtk/INSTALL
511613954fe036f294caeb1ffab6eac48ca5154c
[wxWidgets.git] / install / gtk / INSTALL
1 * General
2 ----------
3
4 wxGTK uses GNU configure. If you have problems with your make use GNU
5 make instead.
6
7 * Additional libraries
8 -----------------------
9
10 wxGTK requires the GTK (The Gimp Toolkit) to be installed,
11 which probably makes sense.
12
13 There will be a few more features of wxGTK, which will
14 require further libraries (on some platforms). These
15 features will be optional. I hope to teach configure
16 to check that out automatically.
17
18 Thread support:
19
20 Requires pthreads under Linux with glibc 2. pthreads are
21 always present on such systems, so just compile.
22
23 Requires pcthreads under Linux with libc 5. If you
24 haven't installed pcthreads, there will be no thread
25 support in wxGTK, but the library will compile.
26
27 Python scripting language support:
28
29 Requires Python. Soon to come.
30
31 * Other things to do
32 -----------------------------
33
34 Copy the two files from ~/wxGTK/misc/imlib to your
35 home directory. You may also edit imrc by hand as
36 you like. The palette file is required when using
37 wxGTK in 256-colour mode.
38
39 If you want to use wxGTK's ODBC support, you'll have
40 to create a .odbc.ini file. The readme file in
41 ~/wxGTK/src/iodbc tells you what to do.
42
43
44 * Create your configuration
45 -----------------------------
46
47 This must be done in ~/wxGTK/install/gtk
48
49 Usage:
50 ./configure options
51
52 If you want to use system's C and C++ compiler,
53 set environment variables CC and CCC as
54
55 % setenv CC cc
56 % setenv CCC CC
57 % ./configure options
58
59 to see all the options please use:
60
61 ./configure --help
62
63 The basic philosophy is that if you want to use different
64 configurations, like a debug and a release version,
65 or use the same source tree on different systems,
66 you have only to change the environment variable OSTYPE.
67 (Sadly this variable is not set by default on some systems
68 in some shells - on SGI's for example). So you will have to
69 set it there. This variable HAS to be set before starting
70 configure, so that it knows which system it tries to
71 configure for.
72
73 Configure will complain if the system variable OSTYPE has
74 not been defined. And Make in some circumstances as well...
75
76 * General options
77 -------------------
78
79 The following options handle the kind of library you want to build.
80
81 --with-shared Create shared libraries.
82
83 --without-optimise Do not optimise the code.
84
85 --with-profile Add profiling info to the
86 object files. Currently
87 broken.
88
89 --with-mem_tracing Add built-in memory tracing.
90
91 --with-debug_info Add debug info to object
92 files.
93
94 --with-debug_flag Define __DEBUG__ and __WXDEBUG__ when
95 compiling.
96
97 * Feature Options
98 -------------------
99
100 When using the Windows version of wxWindows, it is possible
101 to edit the file /include/wx/msw/setup.h in order to enable
102 or disable some features of wxWindows so that the resulting
103 binaries get smaller.
104
105 As I don't yet care for binary size and target mainly at
106 producing a shared library, wxGTK's configure system auto-
107 matically enables all features, as long as they are already
108 implemented.
109
110 * Compiling
111 -------------
112
113 This must be done in ~/wxGTK
114
115 First you have to create all makefiles in all subdirectories:
116
117 make makefiles
118
119 Dependencies are generated automatically using
120
121 make depend
122
123 Now the makefiles are created you can compile everything is as simple
124 as typing:
125
126 make
127
128 make yourself some coffee, as it will try to compile
129 ALL the files in this distribution.
130
131 if you want to be more selective:
132
133 make src will build only the base libraries
134 make utils will build the utils
135 make samples will build the samples
136 make other will build the other samples
137 make user will build the files in the directory other
138
139 Depending on the configuration of some files, the libraries
140 and binaries will be placed in different directories.
141 The "global" binaries and libraries will be placed in:
142
143 bin/$(OSTYPE) and
144 lib/$(OSTYPE) respectively
145
146 "local" binaries and libraries will be placed in:
147
148 (basedir of that application)/$(OSTYPE).
149
150 This is also the place where all the object-files will go.
151
152 If you want to conserve disk space by removing unnecessary
153 object-files:
154
155 make clean_obj
156
157 will do the work for you.
158
159 * Creating a new Project
160 --------------------------
161
162 I propose to put all contributed programs in the directory
163 "~/wcGTK/user", with a directory of its own.
164
165 This directory then should include the following files:
166
167 Makefile (You can copy this one from any application in samples
168 probably you will not need to edit this one. There is
169 only one case where you might be interested in changing
170 this file, but about that see later.)
171 Makefile.in (This is the base application-Makefile template, from
172 which the actual Makefile for each system is created.
173 More about this later)
174
175 put ALL your source code along with all the other stuff you need for
176 your application in this directory (subdirectories are welcome).
177
178 ** Something about Makefiles
179 ------------------------------
180
181 On general principle it should only contain ONE line, which is as follows:
182
183 include ../../src/gtk/setup/general/makeapp
184
185 this will include all the necessary definitions for creating the applications
186
187 the only case where you might want to add another line is the following:
188 this version of configure also supports creation of source archives of the
189 application for easy distribution and updates to newer version of wxxt.
190 For this purpose all files in the application-directory will be put into
191 a gziped tar-file in the full notation user/<your application>/*
192 if you want to include some other files that you want "more visible", like
193 a README.<yourApp> or a shell script for easy
194 compilation/installation/distribution, then you have to add a variable
195
196 DISTRIBUTE_ADDITIONAL=<your files>
197
198 to the Makefile.
199 So it would look like this:
200
201 DISTRIBUTE_ADDITIONAL=README.TheApp
202 include ../../src/gtk/setup/general/makeapp
203
204 As we have already talked about distribution the command to create a
205 distribution is:
206
207 make distrib
208
209 NOTE: If you are in the base directory of wxxt it will create
210 distribution packages for wxxt as well as for all packages in the
211 user directory.
212 So if you want to create only packages for the files in user,
213 then go to the directory other and type:
214
215 make distrib
216
217 or if you only want one application to be created then
218 enter the specific directory and type there:
219 make distrib
220
221 All the distribution files will be put in the directory
222 distrib at the base of the wxxt-tree (where also configure
223 and template.mak can be found).
224
225 ** Something about Makefile.in
226 --------------------------------
227
228 As you have already seen with Makefile, configure makes a lot of use
229 if the include statement in make to keep the Makefiles as simple as
230 possible.
231
232 So basically there are only variables to define and then a include command.
233 Exception to this rule is if you have special rules for some stuff...
234 These rules should go AFTER the include statement!!!
235
236 so the general header looks like this:
237
238 # wxGTK base directory
239 WXBASEDIR=@WXBASEDIR@
240 # set the OS type for compilation
241 OS=@OS@
242 # compile a library only
243 RULE=bin
244
245 and the general footer will look like this:
246
247 # include the definitions now
248 include ../../../template.mak
249
250 the key variable is RULE, which defines what make should create
251 in this directory.
252
253 here are some examples:
254
255 RULE description
256 ===========================================================================
257 bin creates a local binary (for a global binary prefix bin with g)
258 additional variables needed:
259 BIN_TARGET this gives the name of your application
260 BIN_OBJ this gives the object files needed to
261 link the application
262 optional variables are:
263 BIN_SRC this gives the list of c/c++ files for
264 which dependencies will be checked.
265 (This can be achieved with: make depend)
266 BIN_LINK this gives commands for additional
267 libraries needed to link the application
268 ---------------------------------------------------------------------------
269 bin2 creates two local binaries (for global binaries prefix bin2 with g)
270 in addition to the variables specified above you MUST also
271 provide the same variables with BIN2_ instead of BIN_
272 ---------------------------------------------------------------------------
273 lib creates a local library (for a global binary prefix bin with g)
274 additional variables needed:
275 LIB_TARGET this gives the name of your library
276 LIB_OBJ this gives the object files needed for
277 the library to be build.
278 optional variables are:
279 LIB_SRC this gives the list of c/c++ files for
280 which dependencies will be checked.
281 libbin and libgbin are also possible and will need in addition
282 the variables from bin
283 ---------------------------------------------------------------------------
284 gslib is similar to lib, but it creates a shared library if the system
285 supports it.
286 additional variables needed:
287 LIB_MAJOR major number of the shared library
288 LIB_MINOR minor number of the shared library
289 ---------------------------------------------------------------------------
290 other additional variables:
291
292 ADD_COMPILE define additional includes/defines that
293 are needed to compile the object files
294 (if you need to reference some directory
295 utils - like wxGrid -, then please
296 reference them with the variables defined
297 in template.mak - e.g.: $(SRCDIR),$(UTILS),
298 $(SAMPLES),$(OTHERS))
299
300 NEEDED_DEFINES lists all the defines that HAVE to be set in
301 /include/wx/setup.h to compile correctly.
302
303 SRC_DIR lists all directories that are needed to
304 compile. (i.e: lists all the directories,
305 where there are source-files.) But it is
306 also needed to clean an object and for
307 machines, for which make does not support
308 VPATH
309
310 currently there are the following compiling rules provided:
311 object files are created for the following file extensions:
312 .c .cc .cpp
313
314 Please have a closer look at the Makefiles in this distribution.
315
316 * Platforms configure is working with
317 ---------------------------------------
318
319 Please report build succes on any machine. Especially non-
320 Linux operating systems (which I don't have).
321
322 Original author of the autoconf system for wxxt-1.66 and for this INSTALL
323 file:
324
325 Martin Sperl sperl@dsn.ast.univie.ac.at
326
327 Ported to wxGTK 0.1:
328
329 Wolfram Gloger wmglo@dent.med.uni-muenchen.de
330
331 Thanks alot to both of them.
332
333 In the hope that it will be useful,
334
335 Robert Roebling roebling@sun2.ruf.uni-freiburg.de
336
337