-
Notifications
You must be signed in to change notification settings - Fork 214
Compiling under LINUX
Calvin Hass edited this page Aug 18, 2019
·
2 revisions
Overview > Configuring GUIslice >
GUIslice comes with a Makefile that can be used directly with the make command. However, it is also possible to auto-generate a Makefile via cmake
. The following summarizes the two approaches.
For the following, start by entering the GUIslice linux examples folder: cd examples/linux
By default, the GUIslice makefile defaults to SDL1.2 graphics mode and using the tslib touch driver. If no other options are provided to make, these defaults will be used.
- To build all examples with default SDL1.2 graphics & tslib touch:
make all
- To build a specific example with default SDL1.2 graphics & tslib touch:
make ex04_lnx_ctrls
- To change the graphics driver (eg. SDL1.2 vs SDL2), you can pass a
GSLC_DRV=SDL1
or GSLC_DRV=SDL2` parameter:make ex02_lnx_btn_txt GSLC_DRV=SDL2
- To change the touch driver (eg. SDL or tslib), you can pass a
GSLC_TOUCH=SDL
orGSLC_TOUCH=TSLIB
parameter:make ex07_lnx_slider GSLC_TOUCH=SDL
- The options can be combined, for example:
make ex06_lnx_callback GSLC_TOUCH=TSLIB GSLC_DRV=SDL2
make all GSLC_TOUCH=TSLIB
Note regarding SDL2 graphics mode:
- In general, I have found configuring LINUX to work with SDL2 mode from the console (ie. without X / desktop) to be tricky. Therefore, users are strongly recommended to use SDL1.2 mode if possible.
- At a later stage I may publish a more detailed guide explaining how to run SDL2 from the shell (without X)
Note regarding SDL touch mode:
- In my experience, I have found that the RPi SDL touch handling drivers are not very reliable. I strongly recommend users select tslib as shown above.
cmake .
make
- TODO: Fix the recommendations here to include a make target and include
examples/CMakeLists.txt