4 wxGTK uses GNU configure. If you have problems with your make use GNU
8 -----------------------
10 wxGTK requires the GTK (The Gimp Toolkit) to be installed,
11 which probably makes sense.
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.
20 Requires pthreads under Linux with glibc 2. pthreads are
21 always present on such systems, so just compile.
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.
27 Python scripting language support:
29 Requires Python. Soon to come.
32 -----------------------------
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.
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.
44 * Create your configuration
45 -----------------------------
47 This must be done in ~/wxGTK/install/gtk
52 If you want to use system's C and C++ compiler,
53 set environment variables CC and CCC as
59 to see all the options please use:
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
73 Configure will complain if the system variable OSTYPE has
74 not been defined. And Make in some circumstances as well...
79 The following options handle the kind of library you want to build.
81 --with-shared Create shared libraries.
83 --without-optimise Do not optimise the code.
85 --with-profile Add profiling info to the
86 object files. Currently
89 --with-mem_tracing Add built-in memory tracing.
91 --with-debug_info Add debug info to object
94 --with-debug_flag Define __DEBUG__ and __WXDEBUG__ when
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.
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
113 The following must be done in ~/wxGTK
115 First you have to create all makefiles in all subdirectories:
119 Dependencies are generated automatically using
123 for some reason, this doesn't seem to work.
125 Now the makefiles are created you can compile everything is as simple
130 make yourself some coffee, as it will try to compile
131 ALL the files in this distribution.
133 if you want to be more selective:
135 make src will build only the base libraries
136 make utils will build the utils
137 make samples will build the samples
138 make other will build the other samples
139 make user will build the files in the directory other
141 Depending on the configuration of some files, the libraries
142 and binaries will be placed in different directories.
143 The "global" binaries and libraries will be placed in:
146 lib/$(OSTYPE) respectively
148 "local" binaries and libraries will be placed in:
150 (basedir of that application)/$(OSTYPE).
152 This is also the place where all the object-files will go.
154 If you want to conserve disk space by removing unnecessary
159 will do the work for you.
161 * Creating a new Project
162 --------------------------
164 I propose to put all contributed programs in the directory
165 "~/wxGTK/user", with a directory of its own.
167 This directory then should include the following files:
169 Makefile (You can copy this one from any application in samples
170 probably you will not need to edit this one. There is
171 only one case where you might be interested in changing
172 this file, but about that see later.)
173 Makefile.in (This is the base application-Makefile template, from
174 which the actual Makefile for each system is created.
175 More about this later)
177 put ALL your source code along with all the other stuff you need for
178 your application in this directory (subdirectories are welcome).
180 ** Something about Makefiles
181 ------------------------------
183 On general principle it should only contain ONE line, which is as follows:
185 include ../../src/gtk/setup/general/makeapp
187 this will include all the necessary definitions for creating the applications
189 the only case where you might want to add another line is the following:
190 this version of configure also supports creation of source archives of the
191 application for easy distribution and updates to newer version of wxGTK.
192 For this purpose all files in the application-directory will be put into
193 a gziped tar-file in the full notation user/<your application>/*
194 if you want to include some other files that you want "more visible", like
195 a README.<yourApp> or a shell script for easy
196 compilation/installation/distribution, then you have to add a variable
198 DISTRIBUTE_ADDITIONAL=<your files>
201 So it would look like this:
203 DISTRIBUTE_ADDITIONAL=README.TheApp
204 include ../../src/gtk/setup/general/makeapp
206 As we have already talked about distribution the command to create a
211 NOTE: If you are in the base directory of wxGTK it will create
212 distribution packages for wxxt as well as for all packages in the
214 So if you want to create only packages for the files in user,
215 then go to the directory other and type:
219 or if you only want one application to be created then
220 enter the specific directory and type there:
223 All the distribution files will be put in the directory
224 distrib at the base of the wxxt-tree (where also configure
225 and template.mak can be found).
227 ** Something about Makefile.in
228 --------------------------------
230 As you have already seen with Makefile, configure makes a lot of use
231 if the include statement in make to keep the Makefiles as simple as
234 So basically there are only variables to define and then a include command.
235 Exception to this rule is if you have special rules for some stuff...
236 These rules should go AFTER the include statement!!!
238 so the general header looks like this:
240 # wxGTK base directory
241 WXBASEDIR=@WXBASEDIR@
242 # set the OS type for compilation
244 # compile a library only
247 and the general footer will look like this:
249 # include the definitions now
250 include ../../../template.mak
252 the key variable is RULE, which defines what make should create
255 here are some examples:
258 ===========================================================================
259 bin creates a local binary (for a global binary prefix bin with g)
260 additional variables needed:
261 BIN_TARGET this gives the name of your application
262 BIN_OBJ this gives the object files needed to
264 optional variables are:
265 BIN_SRC this gives the list of c/c++ files for
266 which dependencies will be checked.
267 (This can be achieved with: make depend)
268 BIN_LINK this gives commands for additional
269 libraries needed to link the application
270 ---------------------------------------------------------------------------
271 bin2 creates two local binaries (for global binaries prefix bin2 with g)
272 in addition to the variables specified above you MUST also
273 provide the same variables with BIN2_ instead of BIN_
274 ---------------------------------------------------------------------------
275 lib creates a local library (for a global binary prefix bin with g)
276 additional variables needed:
277 LIB_TARGET this gives the name of your library
278 LIB_OBJ this gives the object files needed for
279 the library to be build.
280 optional variables are:
281 LIB_SRC this gives the list of c/c++ files for
282 which dependencies will be checked.
283 libbin and libgbin are also possible and will need in addition
284 the variables from bin
285 ---------------------------------------------------------------------------
286 gslib is similar to lib, but it creates a shared library if the system
288 additional variables needed:
289 LIB_MAJOR major number of the shared library
290 LIB_MINOR minor number of the shared library
291 ---------------------------------------------------------------------------
292 other additional variables:
294 ADD_COMPILE define additional includes/defines that
295 are needed to compile the object files
296 (if you need to reference some directory
297 utils - like wxGrid -, then please
298 reference them with the variables defined
299 in template.mak - e.g.: $(SRCDIR),$(UTILS),
300 $(SAMPLES),$(OTHERS))
302 NEEDED_DEFINES lists all the defines that HAVE to be set in
303 /include/wx/setup.h to compile correctly.
305 SRC_DIR lists all directories that are needed to
306 compile. (i.e: lists all the directories,
307 where there are source-files.) But it is
308 also needed to clean an object and for
309 machines, for which make does not support
312 currently there are the following compiling rules provided:
313 object files are created for the following file extensions:
316 Please have a closer look at the Makefiles in this distribution.
318 * Platforms configure is working with
319 ---------------------------------------
321 Please report build succes on any machine. Especially non-
322 Linux operating systems (which I don't have).
324 Original author of the autoconf system for wxxt-1.66 and for this INSTALL
327 Martin Sperl sperl@dsn.ast.univie.ac.at
331 Wolfram Gloger wmglo@dent.med.uni-muenchen.de
333 Thanks alot to both of them.
335 In the hope that it will be useful,
337 Robert Roebling roebling@sun2.ruf.uni-freiburg.de