Difference between revisions of "FreeBSD"
From uGFX Wiki
(→Dependencies) |
(Add missing parenthesis) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
= Dependencies = | = Dependencies = | ||
The following dependencies are required: | The following dependencies are required: | ||
− | * GCC (eg. <code>[https://www.freshports.org/lang/gcc10 lang/gcc10]</code>, <code>[https://www.freshports.org/lang/gcc11 lang/gcc11]</code> | + | * GCC (eg. <code>[https://www.freshports.org/lang/gcc10 lang/gcc10]</code>, <code>[https://www.freshports.org/lang/gcc11 lang/gcc11]</code>) |
* <code>[https://www.freshports.org/devel/gmake/ devel/gmake]</code> | * <code>[https://www.freshports.org/devel/gmake/ devel/gmake]</code> | ||
* <code>[https://www.freshports.org/devel/sdl2 devel/sdl2]</code> | * <code>[https://www.freshports.org/devel/sdl2 devel/sdl2]</code> | ||
+ | |||
+ | = Makefile = | ||
+ | A sample Makefile can be found under <code>/boards/base/FreeBSD-SDL/example/Makefile</code>. Copy it to your project directory. | ||
+ | |||
+ | From there, set the <code>GFXLIB</code> variable in the Makefile to point to the root directory of the µGFX library. | ||
+ | |||
+ | If the <code>GFXDEMO</code> variable is set to non-empty (it has to point to one of the demo directories in <code>/demos</code>, the corresponding demo will be compiled. If you want to compile your own application code, add the source files to the <code>SRC</code> variable. |
Latest revision as of 13:29, 6 June 2022
µGFX can be compiled into native FreeBSD applications. This is especially useful for developing µGFX applications on a Desktop machine. The SDL2 library is used to spawn a desktop window. Mouse & keyboard inputs are supported.
Dependencies
The following dependencies are required:
- GCC (eg.
lang/gcc10
,lang/gcc11
) -
devel/gmake
-
devel/sdl2
Makefile
A sample Makefile can be found under /boards/base/FreeBSD-SDL/example/Makefile
. Copy it to your project directory.
From there, set the GFXLIB
variable in the Makefile to point to the root directory of the µGFX library.
If the GFXDEMO
variable is set to non-empty (it has to point to one of the demo directories in /demos
, the corresponding demo will be compiled. If you want to compile your own application code, add the source files to the SRC
variable.