| | 1 | = Building BOINC on Unix = |
| | 2 | |
| | 3 | The BOINC software consists of several components: |
| | 4 | |
| | 5 | {{{ |
| | 6 | #!html |
| | 7 | <div style="text-align: center;"><img |
| | 8 | src="http://boinc.berkeley.edu/components.png"></div> |
| | 9 | }}} |
| | 10 | |
| | 11 | * '''Miscellaneous''': the API and various shared code. |
| | 12 | * '''Client''': the core client and Manager. |
| | 13 | * '''Server''': the scheduler, file upload handler, daemons, and tools. |
| | 14 | |
| | 15 | On UNIX systems, the BOINC software can be built by typing |
| | 16 | |
| | 17 | {{{ |
| | 18 | ./_autosetup |
| | 19 | ./configure [see options below] |
| | 20 | make |
| | 21 | }}} |
| | 22 | |
| | 23 | in the top directory. |
| | 24 | |
| | 25 | * If you're creating a project, you need to build the server and miscellaneous software (you '''don't''' need to build the client software; participants can get that from the BOINC web site). Use |
| | 26 | |
| | 27 | {{{ |
| | 28 | ./configure --disable-client |
| | 29 | }}} |
| | 30 | |
| | 31 | * If you're porting the BOINC client software to a new platform, you need the client and miscellaneous components. Use |
| | 32 | |
| | 33 | {{{ |
| | 34 | ./configure --disable-server |
| | 35 | }}} |
| | 36 | |
| | 37 | * If you're developing or porting a BOINC application, you need only the miscellaneous component. Use |
| | 38 | |
| | 39 | {{{ |
| | 40 | ./configure --disable-server --disable-client |
| | 41 | }}} |
| | 42 | |
| | 43 | == Configuration == |
| | 44 | |
| | 45 | Usage: |
| | 46 | |
| | 47 | {{{ |
| | 48 | ./configure [OPTION]... [VAR=VALUE]... |
| | 49 | }}} |
| | 50 | |
| | 51 | You can use environment variables to override the choices made by `configure` or to help it to find libraries and programs with nonstandard names/locations. To assign environment variables (e.g., CC, CFLAGS...), specify them as `VAR=VALUE`. Example: to compile BOINC with strict compiler warnings, use |
| | 52 | |
| | 53 | {{{ |
| | 54 | ./configure CXXFLAGS="-Wall -W -Wmissing-prototypes -Wstrict-prototypes -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -fno-common " |
| | 55 | }}} |
| | 56 | |
| | 57 | Defaults for the options are specified in brackets. |
| | 58 | |
| | 59 | {{{ |
| | 60 | #!html |
| | 61 | <h2 style="text-align: center;">Configuration</h2> |
| | 62 | }}} |
| | 63 | |
| | 64 | ||'''-h, --help'''||display configuration options and exit|| |
| | 65 | ||'''--host=HOST'''||Use HOST to identify platforms in executable names. For Linux/x86 builds, use --build=i686-pc-linux-gnu|| |
| | 66 | |
| | 67 | {{{ |
| | 68 | #!html |
| | 69 | <h2 style="text-align: center;">Installation directories</h2> |
| | 70 | }}} |
| | 71 | |
| | 72 | ||'''--prefix=PREFIX'''||install architecture-independent files in PREFIX [/usr/local] By default, `make install` will install all the files in `/usr/local/bin`, `/usr/local/lib` etc. You can specify an installation prefix other than `/usr/local` using `--prefix`, for instance `--prefix=`. For better control, use the options below.|| |
| | 73 | |
| | 74 | {{{ |
| | 75 | #!html |
| | 76 | <h2 style="text-align: center;">Optional Features</h2> |
| | 77 | }}} |
| | 78 | |
| | 79 | ||'''--disable-FEATURE'''||do not include FEATURE (same as --enable-FEATURE=no)|| |
| | 80 | ||'''--enable-FEATURE[=ARG]'''||include FEATURE [ARG=yes]|| |
| | 81 | ||'''--enable-debug'''||enable tracing and debugging flags for all components|| |
| | 82 | ||'''--disable-server'''||disable building the server component|| |
| | 83 | ||'''--disable-client'''||disable building the client component Default: --enable-server --enable-client: builds both server and client.[[BR]]If configure can't find WxWidgets it will build the core client but not the Manager. If you want to build only the core client, run configure with --with-wxdir=junk.|| |
| | 84 | ||'''--enable-maintainer-mode'''||enable make rules and dependencies not useful (and sometimes confusing) to the casual installer|| |
| | 85 | ||'''--enable-shared[=PKGS]'''||build shared libraries [default=yes]|| |
| | 86 | ||'''--enable-static[=PKGS]'''||build static libraries [default=yes]|| |
| | 87 | ||'''--disable-static-linkage'''||disable static linking of certain libraries|| |
| | 88 | ||'''--enable-client-release'''||Try building a portable 'release-candidate' (currently implemented for Linux and Solaris only): this links libstd++ statically. You will probably need gcc-3.0 for this to produce a portable client-binary. It is therefore recommended to use CC=gcc-3.0 and CXX=g++-3.0 for this. (Default = no)|| |
| | 89 | |
| | 90 | {{{ |
| | 91 | #!html |
| | 92 | <h2 style="text-align: center;">Optional Packages</h2> |
| | 93 | }}} |
| | 94 | |
| | 95 | ||'''--with-PACKAGE[=ARG]'''||use PACKAGE [ARG=yes]|| |
| | 96 | ||'''--without-PACKAGE'''||do not use PACKAGE (same as --with-PACKAGE=no)|| |
| | 97 | ||'''--with-x'''||use the X Window System|| |
| | 98 | ||'''--with-apple-opengl-framework'''||use Apple OpenGL framework (Mac OS X only)|| |
| | 99 | ||'''--with-wxdir=PATH'''||Use uninstalled version of wxWindows in PATH|| |
| | 100 | ||'''--with-wx-config=CONFIG'''||wx-config script to use (optional)|| |
| | 101 | |
| | 102 | {{{ |
| | 103 | #!html |
| | 104 | <h2 style="text-align: center;">Environment variables</h2> |
| | 105 | }}} |
| | 106 | |
| | 107 | ||'''CC'''||C compiler command|| |
| | 108 | ||'''CFLAGS'''||C compiler flags|| |
| | 109 | ||'''LDFLAGS'''||linker flags, e.g. -L<lib dir> if you have libraries in a nonstandard directory <lib dir>|| |
| | 110 | ||'''CPPFLAGS'''||C/C++ preprocessor flags, e.g. -I<include dir> if you have headers in a nonstandard directory <include dir>|| |
| | 111 | ||'''CXX'''||C++ compiler command|| |
| | 112 | ||'''CXXFLAGS'''||C++ compiler flags.|| |
| | 113 | ||'''CPP'''||C preprocessor|| |
| | 114 | ||'''CXXCPP'''||C++ preprocessor|| |
| | 115 | ||'''F77'''||Fortran 77 compiler command|| |
| | 116 | ||'''FFLAGS'''||Fortran 77 compiler flags|| |
| | 117 | ||'''MYSQL_CONFIG'''||mysql_config program|| |
| | 118 | |
| | 119 | == Source layout == |
| | 120 | |
| | 121 | The top-level `Makefile.am` contains the `SUBDIRS=` line which sets up directory recursion, and the rules for creating source distributions. |
| | 122 | |
| | 123 | Each subdirectory's `Makefile.am` contains the rules for making the binaries and libraries in that directory and any extra files to distribute. |
| | 124 | |
| | 125 | Usually you will want to run `make` from the top level (the directory containing the file `configure`), but sometimes it is useful to run `make` and `make check` in certain subdirectories (e.g. `client/`). |
| | 126 | |
| | 127 | == Adding new directories == |
| | 128 | |
| | 129 | If you create a new directory with another `Makefile.am`, you should |
| | 130 | |
| | 131 | * make sure the directory is referenced by a `SUBDIRS=` line from its parent `Makefile.am` |
| | 132 | * add it to the AC_CONFIG_FILES directive in `configure.ac`. |
| | 133 | |
| | 134 | == Version number == |
| | 135 | |
| | 136 | To set the BOINC client version: |
| | 137 | |
| | 138 | {{{ |
| | 139 | set-version 7.17.56 |
| | 140 | }}} |
| | 141 | |
| | 142 | in the BOINC top-level source directory. This updates the `AC_INIT` line in `configure.ac` and regenerates files that use the version numbers (config.h, py/version.py, test/version.inc, client/win/win_config.h, Makefiles) |