Adding FreeBSD support
This commit is contained in:
parent
1c29a88ee1
commit
1d63573408
7
boards/base/FreeBSD-SDL/board.mk
Normal file
7
boards/base/FreeBSD-SDL/board.mk
Normal file
@ -0,0 +1,7 @@
|
||||
GFXINC += $(GFXLIB)/boards/base/Linux
|
||||
GFXSRC +=
|
||||
GFXDEFS += -DGFX_USE_OS_LINUX=GFXON
|
||||
GFXLIBS += rt
|
||||
|
||||
include $(GFXLIB)/drivers/multiple/SDL/driver.mk
|
||||
|
52
boards/base/FreeBSD-SDL/example/Makefile
Normal file
52
boards/base/FreeBSD-SDL/example/Makefile
Normal file
@ -0,0 +1,52 @@
|
||||
# Possible Targets: all clean Debug cleanDebug Release cleanRelease
|
||||
|
||||
##############################################################################################
|
||||
# Settings
|
||||
#
|
||||
|
||||
# General settings
|
||||
# See $(GFXLIB)/tools/gmake_scripts/readme.txt for the list of variables
|
||||
OPT_OS = freebsd
|
||||
OPT_LINK_OPTIMIZE = yes
|
||||
# Change this next setting (or add the explicit compiler flags) if you are not compiling for x86 linux
|
||||
OPT_CPU = x64
|
||||
|
||||
# uGFX settings
|
||||
# See $(GFXLIB)/tools/gmake_scripts/library_ugfx.mk for the list of variables
|
||||
GFXLIB = ../uGFX
|
||||
GFXBOARD = FreeBSD-SDL
|
||||
GFXDEMO = modules/gdisp/basics
|
||||
|
||||
# Linux settings
|
||||
# See $(GFXLIB)/tools/gmake_scripts/os_linux.mk for the list of variables
|
||||
|
||||
##############################################################################################
|
||||
# Set these for your project
|
||||
#
|
||||
|
||||
ARCH =
|
||||
XCC = gcc10
|
||||
XAS = gcc10
|
||||
XLD = gcc10
|
||||
SRCFLAGS = -ggdb -O0
|
||||
CFLAGS = `sdl2-config --libs --cflags`
|
||||
CXXFLAGS =
|
||||
ASFLAGS =
|
||||
LDFLAGS =
|
||||
|
||||
SRC =
|
||||
OBJS =
|
||||
DEFS =
|
||||
LIBS =
|
||||
INCPATH =
|
||||
LIBPATH =
|
||||
|
||||
##############################################################################################
|
||||
# These should be at the end
|
||||
#
|
||||
|
||||
include $(GFXLIB)/tools/gmake_scripts/library_ugfx.mk
|
||||
include $(GFXLIB)/tools/gmake_scripts/os_$(OPT_OS).mk
|
||||
include $(GFXLIB)/tools/gmake_scripts/compiler_gcc.mk
|
||||
# *** EOF ***
|
||||
|
22
boards/base/FreeBSD-SDL/readme.txt
Normal file
22
boards/base/FreeBSD-SDL/readme.txt
Normal file
@ -0,0 +1,22 @@
|
||||
This directory contains the interface for FreeBSD using SDL.
|
||||
|
||||
As of today, this is simply a wrapper around the Linux drivers/support.
|
||||
|
||||
On this board uGFX currently supports:
|
||||
- GDISP via the SDL driver
|
||||
- GINPUT-touch via the SDL driver
|
||||
- GINPUT-keyboard via the SDL driver
|
||||
|
||||
|
||||
The folowing packages are required to run uGFX using this driver on
|
||||
a 64-bit FreeBSD system using SDL:
|
||||
+ devel/gcc10
|
||||
+ devel/sdl2
|
||||
|
||||
|
||||
The following should be added to the CFLAGS of the target makefile:
|
||||
CFLAGS = `sdl2-config --libs --cflags`
|
||||
|
||||
|
||||
There is an example Makefile and project in the examples directory.
|
||||
|
@ -24,6 +24,7 @@ FIX: Prevent const qualifier being discarded in vfnprintg().
|
||||
FIX: Fix missing return value in gfxQueueFSyncPut().
|
||||
FIX: Fix missing return value in gfxQueueFSyncPush().
|
||||
FIX: Fix missing return value in gfxQueueFSyncInsert().
|
||||
FEATURE: Adding support for FreeBSD.
|
||||
|
||||
|
||||
*** Release 2.9 ***
|
||||
|
@ -116,6 +116,10 @@ ifeq ($(basename $(OPT_OS)),osx)
|
||||
EXEFILE = $(BUILDDIR)/$(PROJECT)
|
||||
TARGETS = $(EXEFILE)
|
||||
endif
|
||||
ifeq ($(basename $(OPT_OS)),freebsd)
|
||||
EXEFILE = $(BUILDDIR)/$(PROJECT)
|
||||
TARGETS = $(EXEFILE)
|
||||
endif
|
||||
ifeq ($(EXEFILE),)
|
||||
LDFLAGS += -nostartfiles
|
||||
EXEFILE = $(BUILDDIR)/$(PROJECT).elf
|
||||
|
16
tools/gmake_scripts/os_freebsd.mk
Normal file
16
tools/gmake_scripts/os_freebsd.mk
Normal file
@ -0,0 +1,16 @@
|
||||
#
|
||||
# This file is subject to the terms of the GFX License. If a copy of
|
||||
# the license was not distributed with this file, you can obtain one at:
|
||||
#
|
||||
# http://ugfx.io/license.html
|
||||
#
|
||||
|
||||
# See readme.txt for the make API
|
||||
|
||||
# Requirements:
|
||||
#
|
||||
# NONE
|
||||
#
|
||||
|
||||
LDFLAGS += -pthread
|
||||
|
Loading…
Reference in New Issue
Block a user