ba06f8bb |
1 | Building with Automake {#occt_dev_guides__building_automake} |
72b7576f |
2 | ====================== |
3 | |
576f8b11 |
4 | This file describes steps to build OCCT libraries from a complete source |
5 | archive on Linux with **Autotools** GNU build system. |
72b7576f |
6 | |
576f8b11 |
7 | If you build OCCT from bare sources (as in Git repository), or do some |
72b7576f |
8 | changes affecting CDL files, you need to use WOK to re-generate header files |
ba06f8bb |
9 | and build scripts / projects. See paragraph 1 \ref occt_dev_guides__building_wok for instructions. |
72b7576f |
10 | |
576f8b11 |
11 | Before building OCCT, you need to install the required third-party libraries; see paragraph 1 of |
ba06f8bb |
12 | \ref occt_dev_guides__building for instructions. |
72b7576f |
13 | |
576f8b11 |
14 | Note that during compilation by makefiles on Linux station with |
72b7576f |
15 | NVIDIA video card you may experience problems because the installation |
576f8b11 |
16 | procedure of NVIDIA video driver removes library *libGL.so* included in package |
17 | *libMesaGL* from directory <i>/usr/X11R6/lib</i> and places this library *libGL.so* in |
18 | directory <i>/usr/lib</i>. However, *libtool* expects to find the library in directory |
19 | <i>/usr/X11R6/lib</i>, which causes compilation crash (See <i>/usr/X11R6/lib/libGLU.la </i>). |
72b7576f |
20 | |
576f8b11 |
21 | To prevent this, it is suggested to make links: |
72b7576f |
22 | |
72b7576f |
23 | |
576f8b11 |
24 | ln -s /usr/lib/libGL.so /usr/X11R6/lib/libGL.so |
25 | ln -s /usr/lib/libGL.la /usr/X11R6/lib/libGL.la |
72b7576f |
26 | |
72b7576f |
27 | |
576f8b11 |
28 | 1.In OCCT root folder, launch *build_configure* script to generate files *configure* and *Makefile.in* for your system. |
72b7576f |
29 | |
576f8b11 |
30 | 2.Go to the directory, where OCCT will be built, and run *configure* to generate makefiles. |
72b7576f |
31 | |
576f8b11 |
32 | |
33 | $CASROOT/configure \<FLAGS\> |
34 | |
35 | Where <i> \<FLAGS\> </i> is a set of options. |
72b7576f |
36 | The following flags are mandatory: |
37 | |
576f8b11 |
38 | * <i> --with-tcl= </i> defines the location of *tclConfig.sh*; |
39 | * <i> --with-tk= </i> defines location of *tkConfig.sh*; |
40 | * <i> --with-freetype= </i> defines location of installed **FreeType** product |
41 | * <i> --prefix= </i> defines the location for installation of OCCT binaries |
72b7576f |
42 | |
43 | Additional flags: |
44 | |
576f8b11 |
45 | * <i> --with-gl2ps= </i> defines the location of installed **gl2ps** product; |
46 | * <i> --with-freeimage= </i> defines the location of installed **FreeImage** product; |
47 | * <i> --with-tbb-include= </i> defines the location of *tbb.h*; |
48 | * <i> --with-tbb-library= </i> defines the location of *libtbb.so*; |
18006a0f |
49 | * <i> --with-vtk-include= </i> defines the location of VTK includes; |
50 | * <i> --with-vtk-library= </i> defines the location of VTK libraries; |
576f8b11 |
51 | * <i> --enable-debug= yes: </i> includes debug information, no: does not include debug information; |
52 | * <i> --enable-production= yes: </i> switches code optimization, no: switches off code optimization; |
53 | * <i> --disable-draw </i> allows OCCT building without Draw. |
54 | |
18006a0f |
55 | If location of **FreeImage, TBB, gl2ps** or **VTK** is not specified, OCCT will be built without these optional libraries. |
72b7576f |
56 | |
576f8b11 |
57 | |
58 | Attention: 64-bit platforms are detected automatically. |
72b7576f |
59 | |
576f8b11 |
60 | Example: |
72b7576f |
61 | |
72b7576f |
62 | |
3f812249 |
63 | \> ./configure -prefix=/PRODUCTS/occt-6.5.5 --with-tcl=/PRODUCTS/tcltk-8.5.8/lib --with-tk=/PRODUCTS/tcltk-8.5.8/lib --with-freetype=/PRODUCTS/freetype-2.4.10 --with-gl2ps=/PRODUCTS/gl2ps-1.3.5 --with-freeimage=/PRODUCTS/freeimage-3.14.1 --with-tbb-include=/PRODUCTS/tbb30_018oss/include --with-tbb-library=/PRODUCTS/tbb30_018oss/lib/ia32/cc4.1.0_libc2.4_kernel2.6.16.21 --with-vtk-include=/PRODUCTS/VTK-6.1.0/include/vtk-6.1 -with-vtk-library=/PRODUCTS/ /VTK-6.1.0//lib |
72b7576f |
64 | |
72b7576f |
65 | |
576f8b11 |
66 | 3.If configure exits successfully, you can build OCCT with *make* command. |
72b7576f |
67 | |
576f8b11 |
68 | \> make -j8 install |
72b7576f |
69 | |
576f8b11 |
70 | 4.To start *DRAW*, launch |
72b7576f |
71 | |
576f8b11 |
72 | \> draw.sh |