4 The Unix variants of wxWindows use GNU configure. If you have problems
5 with your make use GNU make instead.
8 -----------------------
10 wxWindows requires a GUI toolkit to be installed. Does that make
11 sense? So far only the GTK is supported, but we hope to provide
12 the choice between GTK, Qt, Motif/Lesstif in the not so distant
15 You can get the newest version of the GTK from the GTK homepage
19 The newest versin of Qt can be downloaded for free from the Trolltec's
23 Lesstif can be downloaded from their site
25 http://www.lesstif.org
27 If you want to develop using Motif, you need to buy it, unless it comes
28 with your operating system such as all commercial Unices, as well as
29 RedHat's, SuSe's and probably other's Linux Motif editions.
31 * Additional libraries
32 -----------------------
34 There will be a few more features of wxWindows, which will
35 require further libraries (on some platforms). These
36 features will be optional. I hope to teach configure
37 to check that out automatically.
41 Requires pthreads under Linux with glibc 2. pthreads are
42 always present on such systems, so just compile, unless
43 you have RedHat 5.0, which has a broken combination of
44 glibc 2 and X. In this case, you have to run configure
45 with "--without-threads".
47 Requires PCthreads under Linux with libc 5. If you
48 haven't installed pcthreads, there will be no thread
49 support in wxWindows, but the library will compile.
51 Requires Posix threads on commercial Unix system,
52 which are always present. Just compile.
54 Requires SGI threads on IRIX, which are always present.
57 Python scripting language support:
59 Requires Python. Soon to come.
62 -----------------------------
64 wxGTK and wxMotif/wxLesstif require the built-in
65 ImLib/GdkImlib to be configured. For that purpose
66 copy the two files from /misc/imlib to your
67 home directory. You may also edit imrc by hand as
68 you like. The palette file is required when using
69 wxWindows in 256-colour mode.
71 If you want to use wxWindows's ODBC support, you'll have
72 to create a .odbc.ini file. The readme file in
73 ~/src/iodbc tells you what to do.
76 * Create your configuration
77 -----------------------------
79 This must be done in /install/unix
84 If you want to use system's C and C++ compiler,
85 set environment variables CC and CCC as
91 to see all the options please use:
95 The basic philosophy is that if you want to use different
96 configurations, like a debug and a release version,
97 or use the same source tree on different systems,
98 you have only to change the environment variable OSTYPE.
99 (Sadly this variable is not set by default on some systems
100 in some shells - on SGI's for example). So you will have to
101 set it there. This variable HAS to be set before starting
102 configure, so that it knows which system it tries to
105 Configure will complain if the system variable OSTYPE has
106 not been defined. And Make in some circumstances as well...
111 Obviously, you have to choose a toolkit. You must do this by
112 running configure with either of
114 --with-gtk Use the GIMP ToolKit (GTK)
116 --with-qt Use Qt from TrollTec
118 --with-motif Use either Motif or Lesstif
119 Configure will look for both.
121 The following options handle the kind of library you want to build.
123 --with-shared Create shared libraries.
125 --without-optimise Do not optimise the code.
127 --with-profile Add profiling info to the
128 object files. Currently
131 --with-mem_tracing Add built-in memory tracing.
133 --with-debug_info Add debug info to object
136 --with-debug_flag Define __DEBUG__ and __WXDEBUG__ when
142 When using the Windows version of wxWindows, it is possible
143 to edit the file /include/wx/msw/setup.h in order to enable
144 or disable some features of wxWindows so that the resulting
145 binaries get smaller.
147 As I don't yet care for binary size and target mainly at
148 producing a shared library, wxWindows's configure system auto-
149 matically enables all features, as long as they are already
155 The following must be done in the base directory (e.g. ~/wxGTK
158 First you have to create all makefiles in all subdirectories:
162 Dependencies are generated automatically using
166 for some reason, this doesn't seem to work.
168 Now the makefiles are created you can compile everything is as simple
173 make yourself some coffee, as it will try to compile
174 ALL the files in this distribution.
176 if you want to be more selective:
178 make src will build only the base libraries
179 make utils will build the utils
180 make samples will build the samples
181 make other will build the other samples
182 make user will build the files in the directory other
184 Depending on the configuration of some files, the libraries
185 and binaries will be placed in different directories.
186 The "global" binaries and libraries will be placed in:
189 lib/$(OSTYPE) respectively
191 "local" binaries and libraries will be placed in:
193 (basedir of that application)/$(OSTYPE).
195 This is also the place where all the object-files will go.
197 If you want to conserve disk space by removing unnecessary
202 will do the work for you.
204 * Creating a new Project
205 --------------------------
207 I propose to put all contributed programs in the directory
208 "~/wxWin/user", with a directory of its own.
210 This directory then should include the following files:
212 Makefile (You can copy this one from any application in samples
213 probably you will not need to edit this one. There is
214 only one case where you might be interested in changing
215 this file, but about that see later.)
216 Makefile.in (This is the base application-Makefile template, from
217 which the actual Makefile for each system is created.
218 More about this later)
220 put ALL your source code along with all the other stuff you need for
221 your application in this directory (subdirectories are welcome).
223 ** Something about Makefiles
224 ------------------------------
226 On general principle it should only contain ONE line, which is as follows:
228 include ../../src/unix/setup/general/makeapp
230 this will include all the necessary definitions for creating the applications
232 the only case where you might want to add another line is the following:
233 this version of configure also supports creation of source archives of the
234 application for easy distribution and updates to newer version of wxWindows.
235 For this purpose all files in the application-directory will be put into
236 a gziped tar-file in the full notation user/<your application>/*
237 if you want to include some other files that you want "more visible", like
238 a README.<yourApp> or a shell script for easy
239 compilation/installation/distribution, then you have to add a variable
241 DISTRIBUTE_ADDITIONAL=<your files>
244 So it would look like this:
246 DISTRIBUTE_ADDITIONAL=README.TheApp
247 include ../../src/unix/setup/general/makeapp
249 As we have already talked about distribution the command to create a
254 NOTE: If you are in the base directory of wxWindows it will create
255 distribution packages for wxWindows as well as for all packages in the
257 So if you want to create only packages for the files in user,
258 then go to the directory other and type:
262 or if you only want one application to be created then
263 enter the specific directory and type there:
266 All the distribution files will be put in the directory
267 distrib at the base of the wxWindows-tree (where also configure
268 and template.mak can be found).
270 ** Something about Makefile.in
271 --------------------------------
273 As you have already seen with Makefile, configure makes a lot of use
274 if the include statement in make to keep the Makefiles as simple as
277 So basically there are only variables to define and then a include command.
278 Exception to this rule is if you have special rules for some stuff...
279 These rules should go AFTER the include statement!!!
281 so the general header looks like this:
283 # wxWindows base directory
284 WXBASEDIR=@WXBASEDIR@
285 # set the OS type for compilation
287 # compile a library only
290 and the general footer will look like this:
292 # include the definitions now
293 include ../../../template.mak
295 the key variable is RULE, which defines what make should create
298 here are some examples:
301 ===========================================================================
302 bin creates a local binary (for a global binary prefix bin with g)
303 additional variables needed:
304 BIN_TARGET this gives the name of your application
305 BIN_OBJ this gives the object files needed to
307 optional variables are:
308 BIN_SRC this gives the list of c/c++ files for
309 which dependencies will be checked.
310 (This can be achieved with: make depend)
311 BIN_LINK this gives commands for additional
312 libraries needed to link the application
313 ---------------------------------------------------------------------------
314 bin2 creates two local binaries (for global binaries prefix bin2 with g)
315 in addition to the variables specified above you MUST also
316 provide the same variables with BIN2_ instead of BIN_
317 ---------------------------------------------------------------------------
318 lib creates a local library (for a global binary prefix bin with g)
319 additional variables needed:
320 LIB_TARGET this gives the name of your library
321 LIB_OBJ this gives the object files needed for
322 the library to be build.
323 optional variables are:
324 LIB_SRC this gives the list of c/c++ files for
325 which dependencies will be checked.
326 libbin and libgbin are also possible and will need in addition
327 the variables from bin
328 ---------------------------------------------------------------------------
329 gslib is similar to lib, but it creates a shared library if the system
331 additional variables needed:
332 LIB_MAJOR major number of the shared library
333 LIB_MINOR minor number of the shared library
334 ---------------------------------------------------------------------------
335 other additional variables:
337 ADD_COMPILE define additional includes/defines that
338 are needed to compile the object files
339 (if you need to reference some directory
340 utils - like wxGrid -, then please
341 reference them with the variables defined
342 in template.mak - e.g.: $(SRCDIR),$(UTILS),
343 $(SAMPLES),$(OTHERS))
345 NEEDED_DEFINES lists all the defines that HAVE to be set in
346 /include/wx/setup.h to compile correctly.
348 SRC_DIR lists all directories that are needed to
349 compile. (i.e: lists all the directories,
350 where there are source-files.) But it is
351 also needed to clean an object and for
352 machines, for which make does not support
355 currently there are the following compiling rules provided:
356 object files are created for the following file extensions:
359 Please have a closer look at the Makefiles in this distribution.
361 * Platforms configure is working with
362 ---------------------------------------
364 Please report build succes on any machine. Especially non-
365 Linux operating systems (which I don't have).
367 Original author of the autoconf system for wxxt-1.66 and for this INSTALL
370 Martin Sperl sperl@dsn.ast.univie.ac.at
374 Wolfram Gloger wmglo@dent.med.uni-muenchen.de
376 Thanks alot to both of them.
378 In the hope that it will be useful,
380 Robert Roebling roebling@sun2.ruf.uni-freiburg.de