Difference between revisions of "FreeBSD"

From uGFX Wiki
Jump to: navigation, search
(Created page with "µ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 d...")
 
(Add missing parenthesis)
 
(4 intermediate revisions by the same user not shown)
Line 3: Line 3:
  
 
= Dependencies =
 
= Dependencies =
As of today, we recommend using GCC for compiling µGFX applications on FreeBSD.
+
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>)
 +
* <code>[https://www.freshports.org/devel/gmake/ devel/gmake]</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:

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.