1 | ** This file is generated from 'make help' output, do not edit it. **
|
---|
2 |
|
---|
3 | OSCam build system documentation
|
---|
4 | ================================
|
---|
5 |
|
---|
6 | Build variables:
|
---|
7 | The build variables are set on the make command line and control the build
|
---|
8 | process. Setting the variables lets you enable additional features, request
|
---|
9 | extra libraries and more. Currently recognized build variables are:
|
---|
10 |
|
---|
11 | CROSS=prefix - Set tools prefix. This variable is used when OScam is being
|
---|
12 | cross compiled. For example if you want to cross compile
|
---|
13 | for SH4 architecture you can run: 'make CROSS=sh4-linux-'
|
---|
14 | If you don't have the directory where cross compilers are
|
---|
15 | in your PATH you can run:
|
---|
16 | 'make CROSS=/opt/STM/STLinux-2.3/devkit/sh4/bin/sh4-linux-'
|
---|
17 |
|
---|
18 | CROSS_DIR=dir - Set tools directory. This variable is added in front of
|
---|
19 | CROSS variable. CROSS_DIR is useful if you want to use
|
---|
20 | predefined targets that are setting CROSS, but you don't have
|
---|
21 | the cross compilers in your PATH. For example:
|
---|
22 | 'make sh4 CROSS_DIR=/opt/STM/STLinux-2.3/devkit/sh4/bin/'
|
---|
23 | 'make dm500 CROSS_DIR=/opt/cross/dm500/cdk/bin/'
|
---|
24 |
|
---|
25 | CONF_DIR=/dir - Set OSCam config directory. For example to change config
|
---|
26 | directory to /etc run: 'make CONF_DIR=/etc'
|
---|
27 | The default config directory is: '/usr/local/etc'
|
---|
28 |
|
---|
29 | CC_OPTS=text - This variable holds compiler optimization parameters.
|
---|
30 | Default CC_OPTS value is:
|
---|
31 | '-O2 -ggdb -pipe -ffunction-sections -fdata-sections '
|
---|
32 | To add text to this variable set EXTRA_CC_OPTS=text.
|
---|
33 |
|
---|
34 | CC_WARN=text - This variable holds compiler warning parameters.
|
---|
35 | Default CC_WARN value is:
|
---|
36 | '-W -Wall -Wshadow -Wredundant-decls -Wstrict-prototypes -Wold-style-definition '
|
---|
37 | To add text to this variable set EXTRA_CC_WARN=text.
|
---|
38 |
|
---|
39 | V=1 - Request build process to print verbose messages. By
|
---|
40 | default the only messages that are shown are simple info
|
---|
41 | what is being compiled. To request verbose build run:
|
---|
42 | 'make V=1'
|
---|
43 |
|
---|
44 | Extra build variables:
|
---|
45 | These variables add text to build variables. They are useful if you want
|
---|
46 | to add additional options to already set variables without overwriting them
|
---|
47 | Currently defined EXTRA_xxx variables are:
|
---|
48 |
|
---|
49 | EXTRA_CC_OPTS - Add text to CC_OPTS.
|
---|
50 | Example: 'make EXTRA_CC_OPTS=-Os'
|
---|
51 |
|
---|
52 | EXTRA_CC_WARN - Add text to CC_WARN.
|
---|
53 | Example: 'make EXTRA_CC_WARN=-Wshadow'
|
---|
54 |
|
---|
55 | EXTRA_TARGET - Add text to TARGET.
|
---|
56 | Example: 'make EXTRA_TARGET=-private'
|
---|
57 |
|
---|
58 | EXTRA_CFLAGS - Add text to CFLAGS (affects compilation).
|
---|
59 | Example: 'make EXTRA_CFLAGS="-DBLAH=1 -I/opt/local"'
|
---|
60 |
|
---|
61 | EXTRA_LDFLAGS - Add text to LDFLAGS (affects linking).
|
---|
62 | Example: 'make EXTRA_LDFLAGS=-Llibdir'
|
---|
63 |
|
---|
64 | EXTRA_FLAGS - Add text to both EXTRA_CFLAGS and EXTRA_LDFLAGS.
|
---|
65 | Example: 'make EXTRA_FLAGS=-DBLAH=1'
|
---|
66 |
|
---|
67 | EXTRA_LIBS - Add text to LIBS (affects linking).
|
---|
68 | Example: 'make EXTRA_LIBS="-L./stapi -loscam_stapi"'
|
---|
69 |
|
---|
70 | Use flags:
|
---|
71 | Use flags are used to request additional libraries or features to be used
|
---|
72 | by OSCam. Currently defined USE_xxx flags are:
|
---|
73 |
|
---|
74 | USE_LIBUSB=1 - Request linking with libusb. The variables that control
|
---|
75 | USE_LIBUSB=1 build are:
|
---|
76 | LIBUSB_FLAGS='-DWITH_LIBUSB=1'
|
---|
77 | LIBUSB_CFLAGS='-DWITH_LIBUSB=1'
|
---|
78 | LIBUSB_LDFLAGS='-DWITH_LIBUSB=1'
|
---|
79 | LIBUSB_LIB='-lusb-1.0 -lrt'
|
---|
80 | Using USE_LIBUSB=1 adds to '-libusb' to PLUS_TARGET.
|
---|
81 | To build with static libusb, set the variable LIBUSB_LIB
|
---|
82 | to contain full path of libusb library. For example:
|
---|
83 | make USR_LIBUSB=1 LIBUSB_LIB=/usr/lib/libusb-1.0.a
|
---|
84 |
|
---|
85 | USE_PCSC=1 - Request linking with PCSC. The variables that control
|
---|
86 | USE_PCSC=1 build are:
|
---|
87 | PCSC_FLAGS='-DWITH_PCSC=1 -I/usr/include/PCSC'
|
---|
88 | PCSC_CFLAGS='-DWITH_PCSC=1 -I/usr/include/PCSC'
|
---|
89 | PCSC_LDFLAGS='-DWITH_PCSC=1 -I/usr/include/PCSC'
|
---|
90 | PCSC_LIB='-lpcsclite'
|
---|
91 | Using USE_PCSC=1 adds to '-pcsc' to PLUS_TARGET.
|
---|
92 | To build with static PCSC, set the variable PCSC_LIB
|
---|
93 | to contain full path of PCSC library. For example:
|
---|
94 | make USE_PCSC=1 PCSC_LIB=/usr/local/lib/libpcsclite.a
|
---|
95 |
|
---|
96 | USE_STAPI=1 - Request linking with STAPI. The variables that control
|
---|
97 | USE_STAPI=1 build are:
|
---|
98 | STAPI_FLAGS='-DWITH_STAPI=1'
|
---|
99 | STAPI_CFLAGS='-DWITH_STAPI=1'
|
---|
100 | STAPI_LDFLAGS='-DWITH_STAPI=1'
|
---|
101 | STAPI_LIB='-L./stapi -loscam_stapi'
|
---|
102 | Using USE_STAPI=1 adds to '-stapi' to PLUS_TARGET.
|
---|
103 | In order for USE_STAPI to work you have to create stapi
|
---|
104 | directory and put liboscam_stapi.a file in it.
|
---|
105 |
|
---|
106 | USE_COOLAPI=1 - Request support for Coolstream API (libnxp) aka NeutrinoHD
|
---|
107 | box. The variables that control the build are:
|
---|
108 | COOLAPI_FLAGS='-DWITH_COOLAPI=1'
|
---|
109 | COOLAPI_CFLAGS='-DWITH_COOLAPI=1'
|
---|
110 | COOLAPI_LDFLAGS='-DWITH_COOLAPI=1'
|
---|
111 | COOLAPI_LIB='-lnxp -lrt'
|
---|
112 | Using USE_COOLAPI=1 adds to '-coolapi' to PLUS_TARGET.
|
---|
113 | In order for USE_COOLAPI to work you have to have libnxp.so
|
---|
114 | library in your cross compilation toolchain.
|
---|
115 |
|
---|
116 | USE_AZBOX=1 - Request support for AZBOX (openxcas)
|
---|
117 | box. The variables that control the build are:
|
---|
118 | AZBOX_FLAGS='-DWITH_AZBOX=1'
|
---|
119 | AZBOX_CFLAGS='-DWITH_AZBOX=1'
|
---|
120 | AZBOX_LDFLAGS='-DWITH_AZBOX=1'
|
---|
121 | AZBOX_LIB='-Lextapi/openxcas -lOpenXCASAPI'
|
---|
122 | Using USE_AZBOX=1 adds to '-azbox' to PLUS_TARGET.
|
---|
123 | extapi/openxcas/libOpenXCASAPI.a library that is shipped
|
---|
124 | with OSCam is compiled for MIPSEL.
|
---|
125 |
|
---|
126 | USE_MCA=1 - Request support for Matrix Cam Air (MCA).
|
---|
127 | The variables that control the build are:
|
---|
128 | MCA_FLAGS='-DWITH_MCA=1'
|
---|
129 | MCA_CFLAGS='-DWITH_MCA=1'
|
---|
130 | MCA_LDFLAGS='-DWITH_MCA=1'
|
---|
131 | Using USE_MCA=1 adds to '-mca' to PLUS_TARGET.
|
---|
132 |
|
---|
133 | USE_LIBCRYPTO=1 - Request linking with libcrypto instead of using OSCam
|
---|
134 | internal crypto functions. USE_LIBCRYPTO is automatically
|
---|
135 | enabled if the build is configured with SSL support. The
|
---|
136 | variables that control USE_LIBCRYPTO=1 build are:
|
---|
137 | LIBCRYPTO_FLAGS='-DWITH_LIBCRYPTO=1'
|
---|
138 | LIBCRYPTO_CFLAGS='-DWITH_LIBCRYPTO=1'
|
---|
139 | LIBCRYPTO_LDFLAGS='-DWITH_LIBCRYPTO=1'
|
---|
140 | LIBCRYPTO_LIB='-lcrypto'
|
---|
141 |
|
---|
142 | USE_SSL=1 - Request linking with libssl. USE_SSL is automatically
|
---|
143 | enabled if the build is configured with SSL support. The
|
---|
144 | variables that control USE_SSL=1 build are:
|
---|
145 | SSL_FLAGS='-DWITH_SSL=1'
|
---|
146 | SSL_CFLAGS='-DWITH_SSL=1'
|
---|
147 | SSL_LDFLAGS='-DWITH_SSL=1'
|
---|
148 | SSL_LIB='-lssl'
|
---|
149 | Using USE_SSL=1 adds to '-ssl' to PLUS_TARGET.
|
---|
150 |
|
---|
151 | Automatically intialized variables:
|
---|
152 |
|
---|
153 | TARGET=text - This variable is auto detected by using the compiler's
|
---|
154 | -dumpmachine output. To see the target on your machine run:
|
---|
155 | 'gcc -dumpmachine'
|
---|
156 |
|
---|
157 | PLUS_TARGET - This variable is added to TARGET and it is set depending
|
---|
158 | on the chosen USE_xxx flags. To disable adding
|
---|
159 | PLUS_TARGET to TARGET, set NO_PLUS_TARGET=1
|
---|
160 |
|
---|
161 | BINDIR - The directory where final oscam binary would be put. The
|
---|
162 | default is: Distribution
|
---|
163 |
|
---|
164 | OSCAM_BIN=text - This variable controls how the oscam binary will be named.
|
---|
165 | Default OSCAM_BIN value is:
|
---|
166 | 'BINDIR/oscam-VERSVN_REV-TARGET'
|
---|
167 | Once the variables (BINDIR, VER, SVN_REV and TARGET) are
|
---|
168 | replaced, the resulting filename can look like this:
|
---|
169 | 'Distribution/oscam-1.20-unstable_svn7404-i486-slackware-linux-static'
|
---|
170 | For example you can run: 'make OSCAM_BIN=my-oscam'
|
---|
171 |
|
---|
172 | Binaries compiled and run during the OSCam build:
|
---|
173 |
|
---|
174 | OSCam builds webif/pages_gen binary that is run by the build system to
|
---|
175 | generate file that holds web pages. To build this binary two variables
|
---|
176 | are used:
|
---|
177 |
|
---|
178 | HOSTCC=gcc - The compiler used for building binaries that are run on
|
---|
179 | the build machine (the host). Default: gcc
|
---|
180 | To use clang for example run: make CC=clang HOSTCC=clang
|
---|
181 |
|
---|
182 | HOSTCFLAGS=xxx - The CFLAGS passed to HOSTCC. See webif/Makefile for the
|
---|
183 | default host cflags.
|
---|
184 |
|
---|
185 | Config targets:
|
---|
186 | make config - Start configuration utility.
|
---|
187 | make allyesconfig - Enable all configuration options.
|
---|
188 | make allnoconfig - Disable all configuration options.
|
---|
189 | make defconfig - Restore default configuration options.
|
---|
190 |
|
---|
191 | Cleaning targets:
|
---|
192 | make clean - Remove 'build' directory which contains compiled
|
---|
193 | object files.
|
---|
194 | make distclean - Executes clean target and also removes binary files
|
---|
195 | located in 'Distribution' directory.
|
---|
196 |
|
---|
197 | Build system files:
|
---|
198 | config.sh - OSCam configuration. Run 'config.sh --help' to see
|
---|
199 | available parameters or 'make config' to start GUI
|
---|
200 | configuratior.
|
---|
201 | Makefile - Main build system file.
|
---|
202 | Makefile.extra - Contains predefined targets. You can use this file
|
---|
203 | as example on how to use the build system.
|
---|
204 | Makefile.local - This file is included in Makefile and allows creation
|
---|
205 | of local build system targets. See Makefile.extra for
|
---|
206 | examples.
|
---|
207 |
|
---|
208 | Here are some of the interesting predefined targets in Makefile.extra.
|
---|
209 | To use them run 'make target ...' where ... can be any extra flag. For
|
---|
210 | example if you want to compile OSCam for Dreambox (DM500) but do not
|
---|
211 | have the compilers in the path, you can run:
|
---|
212 | make dm500 CROSS_DIR=/opt/cross/dm500/cdk/bin/
|
---|
213 |
|
---|
214 | Predefined targets in Makefile.extra:
|
---|
215 |
|
---|
216 | make libusb - Builds OSCam with libusb support
|
---|
217 | make pcsc - Builds OSCam with PCSC support
|
---|
218 | make pcsc-libusb - Builds OSCam with PCSC and libusb support
|
---|
219 | make dm500 - Builds OSCam for Dreambox (DM500)
|
---|
220 | make sh4 - Builds OSCam for SH4 boxes
|
---|
221 | make azbox - Builds OSCam for AZBox STBs
|
---|
222 | make mca - Builds OSCam for Matrix Cam Air (MCA)
|
---|
223 | make coolstream - Builds OSCam for Coolstream
|
---|
224 | make dockstar - Builds OSCam for Dockstar
|
---|
225 | make qboxhd - Builds OSCam for QBoxHD STBs
|
---|
226 | make opensolaris - Builds OSCam for OpenSolaris
|
---|
227 | make uclinux - Builds OSCam for m68k uClinux
|
---|
228 |
|
---|
229 | Predefined targets for static builds:
|
---|
230 | make static - Builds OSCam statically
|
---|
231 | make static-libusb - Builds OSCam with libusb linked statically
|
---|
232 | make static-libcrypto - Builds OSCam with libcrypto linked statically
|
---|
233 | make static-ssl - Builds OSCam with SSL support linked statically
|
---|
234 |
|
---|
235 | Examples:
|
---|
236 | Build OSCam for SH4 (the compilers are in the path):
|
---|
237 | make CROSS=sh4-linux-
|
---|
238 |
|
---|
239 | Build OSCam for SH4 (the compilers are in not in the path):
|
---|
240 | make sh4 CROSS_DIR=/opt/STM/STLinux-2.3/devkit/sh4/bin/
|
---|
241 | make CROSS_DIR=/opt/STM/STLinux-2.3/devkit/sh4/bin/ CROSS=sh4-linux-
|
---|
242 | make CROSS=/opt/STM/STLinux-2.3/devkit/sh4/bin/sh4-linux-
|
---|
243 |
|
---|
244 | Build OSCam for SH4 with STAPI:
|
---|
245 | make CROSS=sh4-linux- USE_STAPI=1
|
---|
246 |
|
---|
247 | Build OSCam for SH4 with STAPI and changed configuration directory:
|
---|
248 | make CROSS=sh4-linux- USE_STAPI=1 CONF_DIR=/var/tuxbox/config
|
---|
249 |
|
---|
250 | Build OSCam for ARM with COOLAPI (coolstream aka NeutrinoHD):
|
---|
251 | make CROSS=arm-cx2450x-linux-gnueabi- USE_COOLAPI=1
|
---|
252 |
|
---|
253 | Build OSCam for MIPSEL with AZBOX support:
|
---|
254 | make CROSS=mipsel-linux-uclibc- USE_AZBOX=1
|
---|
255 |
|
---|
256 | Build OSCam for ARM with MCA support:
|
---|
257 | make CROSS=arm-none-linux-gnueabi- USE_MCA=1
|
---|
258 |
|
---|
259 | Build OSCam with libusb and PCSC:
|
---|
260 | make USE_LIBUSB=1 USE_PCSC=1
|
---|
261 |
|
---|
262 | Build OSCam with static libusb:
|
---|
263 | make USE_LIBUSB=1 LIBUSB_LIB="/usr/lib/libusb-1.0.a"
|
---|
264 |
|
---|
265 | Build OSCam with static libcrypto:
|
---|
266 | make USE_LIBCRYPTO=1 LIBCRYPTO_LIB="/usr/lib/libcrypto.a"
|
---|
267 |
|
---|
268 | Build OSCam with static libssl and libcrypto:
|
---|
269 | make USE_SSL=1 SSL_LIB="/usr/lib/libssl.a" LIBCRYPTO_LIB="/usr/lib/libcrypto.a"
|
---|
270 |
|
---|
271 | Build with verbose messages and size optimizations:
|
---|
272 | make V=1 CC_OPTS=-Os
|
---|
273 |
|
---|
274 | Build and set oscam file name:
|
---|
275 | make OSCAM_BIN=oscam
|
---|
276 |
|
---|
277 | Build and set oscam file name depending on revision:
|
---|
278 | make OSCAM_BIN=oscam-`./config.sh -r`
|
---|
279 |
|
---|