Improving FreeBSD integration support
This commit is contained in:
parent
71a308a01a
commit
a4f225700f
@ -1,7 +1,6 @@
|
|||||||
GFXINC += $(GFXLIB)/boards/base/Linux
|
GFXINC +=
|
||||||
GFXSRC +=
|
GFXSRC +=
|
||||||
GFXDEFS += -DGFX_USE_OS_LINUX=GFXON
|
GFXDEFS += -DGFX_USE_OS_FREEBSD=GFXON
|
||||||
GFXLIBS += rt
|
GFXLIBS += rt
|
||||||
|
|
||||||
include $(GFXLIB)/drivers/multiple/SDL/driver.mk
|
include $(GFXLIB)/drivers/multiple/SDL/driver.mk
|
||||||
|
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
// #define GFX_FREERTOS_USE_TRACE GFXOFF
|
// #define GFX_FREERTOS_USE_TRACE GFXOFF
|
||||||
//#define GFX_USE_OS_WIN32 GFXOFF
|
//#define GFX_USE_OS_WIN32 GFXOFF
|
||||||
//#define GFX_USE_OS_LINUX GFXOFF
|
//#define GFX_USE_OS_LINUX GFXOFF
|
||||||
|
//#define GFX_USE_OS_FREEBSD GFXOFF
|
||||||
//#define GFX_USE_OS_OSX GFXOFF
|
//#define GFX_USE_OS_OSX GFXOFF
|
||||||
//#define GFX_USE_OS_ECOS GFXOFF
|
//#define GFX_USE_OS_ECOS GFXOFF
|
||||||
//#define GFX_USE_OS_RAWRTOS GFXOFF
|
//#define GFX_USE_OS_RAWRTOS GFXOFF
|
||||||
|
@ -468,6 +468,8 @@
|
|||||||
#include "gos_win32.h"
|
#include "gos_win32.h"
|
||||||
#elif GFX_USE_OS_LINUX
|
#elif GFX_USE_OS_LINUX
|
||||||
#include "gos_linux.h"
|
#include "gos_linux.h"
|
||||||
|
#elif GFX_USE_OS_FREEBSD
|
||||||
|
#include "gos_linux.h"
|
||||||
#elif GFX_USE_OS_OSX
|
#elif GFX_USE_OS_OSX
|
||||||
#include "gos_osx.h"
|
#include "gos_osx.h"
|
||||||
#elif GFX_USE_OS_RAW32
|
#elif GFX_USE_OS_RAW32
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
#include "../../gfx.h"
|
#include "../../gfx.h"
|
||||||
|
|
||||||
#if GFX_USE_OS_LINUX
|
#if GFX_USE_OS_LINUX || GFX_USE_OS_FREEBSD
|
||||||
|
|
||||||
// Linux seems to have deprecated pthread_yield() and now says to use sched_yield()
|
// Linux seems to have deprecated pthread_yield() and now says to use sched_yield()
|
||||||
#define USE_SCHED_NOT_PTHREAD_YIELD GFXON
|
#define USE_SCHED_NOT_PTHREAD_YIELD GFXON
|
||||||
@ -238,4 +238,4 @@ gThreadreturn gfxThreadWait(gThread thread) {
|
|||||||
}
|
}
|
||||||
#endif // GFX_USE_POSIX_SEMAPHORES
|
#endif // GFX_USE_POSIX_SEMAPHORES
|
||||||
|
|
||||||
#endif /* GFX_USE_OS_LINUX */
|
#endif /* GFX_USE_OS_LINUX || GFX_USE_OS_FREEBSD */
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
#ifndef _GOS_LINUX_H
|
#ifndef _GOS_LINUX_H
|
||||||
#define _GOS_LINUX_H
|
#define _GOS_LINUX_H
|
||||||
|
|
||||||
#if GFX_USE_OS_LINUX
|
#if GFX_USE_OS_LINUX || GFX_USE_OS_FREEBSD
|
||||||
|
|
||||||
// We don't put this in the general sys_options.h as it is Linux specific.
|
// We don't put this in the general sys_options.h as it is Linux specific.
|
||||||
#ifndef GFX_USE_POSIX_SEMAPHORES
|
#ifndef GFX_USE_POSIX_SEMAPHORES
|
||||||
@ -88,6 +88,6 @@ void gfxSemSignal(gSem *psem);
|
|||||||
gThread gfxThreadCreate(void *stackarea, gMemSize stacksz, gThreadpriority prio, GFX_THREAD_FUNCTION((*fn),p), void *param);
|
gThread gfxThreadCreate(void *stackarea, gMemSize stacksz, gThreadpriority prio, GFX_THREAD_FUNCTION((*fn),p), void *param);
|
||||||
gThreadreturn gfxThreadWait(gThread thread);
|
gThreadreturn gfxThreadWait(gThread thread);
|
||||||
|
|
||||||
#endif /* GFX_USE_OS_LINUX */
|
#endif /* GFX_USE_OS_LINUX || GFX_USE_OS_FREEBSD */
|
||||||
|
|
||||||
#endif /* _GOS_LINUX_H */
|
#endif /* _GOS_LINUX_H */
|
||||||
|
@ -48,6 +48,13 @@
|
|||||||
#ifndef GFX_USE_OS_LINUX
|
#ifndef GFX_USE_OS_LINUX
|
||||||
#define GFX_USE_OS_LINUX GFXOFF
|
#define GFX_USE_OS_LINUX GFXOFF
|
||||||
#endif
|
#endif
|
||||||
|
/**
|
||||||
|
* @brief Use a FreeBSD based system running X11
|
||||||
|
* @details Defaults to GFXOFF
|
||||||
|
*/
|
||||||
|
#ifndef GFX_USE_OS_FREEBSD
|
||||||
|
#define GFX_USE_OS_FREEBSD GFXOFF
|
||||||
|
#endif
|
||||||
/**
|
/**
|
||||||
* @brief Use a Mac OS-X based system
|
* @brief Use a Mac OS-X based system
|
||||||
* @details Defaults to GFXOFF
|
* @details Defaults to GFXOFF
|
||||||
|
@ -16,11 +16,11 @@
|
|||||||
#ifndef _GOS_RULES_H
|
#ifndef _GOS_RULES_H
|
||||||
#define _GOS_RULES_H
|
#define _GOS_RULES_H
|
||||||
|
|
||||||
#if !GFX_USE_OS_CHIBIOS && !GFX_USE_OS_WIN32 && !GFX_USE_OS_LINUX && !GFX_USE_OS_OSX && !GFX_USE_OS_RAW32 && !GFX_USE_OS_FREERTOS && !GFX_USE_OS_ECOS && !GFX_USE_OS_RAWRTOS && !GFX_USE_OS_ARDUINO && !GFX_USE_OS_CMSIS && !GFX_USE_OS_CMSIS2 && !GFX_USE_OS_KEIL && !GFX_USE_OS_RTX5 && !GFX_USE_OS_NIOS && !GFX_USE_OS_ZEPHYR && !GFX_USE_OS_QT
|
#if !GFX_USE_OS_CHIBIOS && !GFX_USE_OS_WIN32 && !GFX_USE_OS_LINUX && !GFX_USE_OS_FREEBSD && !GFX_USE_OS_OSX && !GFX_USE_OS_RAW32 && !GFX_USE_OS_FREERTOS && !GFX_USE_OS_ECOS && !GFX_USE_OS_RAWRTOS && !GFX_USE_OS_ARDUINO && !GFX_USE_OS_CMSIS && !GFX_USE_OS_CMSIS2 && !GFX_USE_OS_KEIL && !GFX_USE_OS_RTX5 && !GFX_USE_OS_NIOS && !GFX_USE_OS_ZEPHYR && !GFX_USE_OS_QT
|
||||||
#error "GOS: No operating system has been defined."
|
#error "GOS: No operating system has been defined."
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if GFX_USE_OS_CHIBIOS + GFX_USE_OS_WIN32 + GFX_USE_OS_LINUX + GFX_USE_OS_OSX + GFX_USE_OS_RAW32 + GFX_USE_OS_FREERTOS + GFX_USE_OS_ECOS + GFX_USE_OS_RAWRTOS + GFX_USE_OS_ARDUINO + GFX_USE_OS_CMSIS + GFX_USE_OS_CMSIS2 + GFX_USE_OS_KEIL + GFX_USE_OS_RTX5 + GFX_USE_OS_NIOS + GFX_USE_OS_ZEPHYR + GFX_USE_OS_QT != 1 * GFXON
|
#if GFX_USE_OS_CHIBIOS + GFX_USE_OS_WIN32 + GFX_USE_OS_LINUX + GFX_USE_OS_FREEBSD + GFX_USE_OS_OSX + GFX_USE_OS_RAW32 + GFX_USE_OS_FREERTOS + GFX_USE_OS_ECOS + GFX_USE_OS_RAWRTOS + GFX_USE_OS_ARDUINO + GFX_USE_OS_CMSIS + GFX_USE_OS_CMSIS2 + GFX_USE_OS_KEIL + GFX_USE_OS_RTX5 + GFX_USE_OS_NIOS + GFX_USE_OS_ZEPHYR + GFX_USE_OS_QT != 1 * GFXON
|
||||||
#error "GOS: More than one operation system has been defined as GFXON."
|
#error "GOS: More than one operation system has been defined as GFXON."
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -33,7 +33,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if GFX_EMULATE_MALLOC
|
#if GFX_EMULATE_MALLOC
|
||||||
#if GFX_USE_OS_WIN32 || GFX_USE_OS_LINUX || GFX_USE_OS_OSX || GFX_USE_OS_ECOS || \
|
#if GFX_USE_OS_WIN32 || GFX_USE_OS_LINUX || GFX_USE_OS_FREEBSD || GFX_USE_OS_OSX || GFX_USE_OS_ECOS || \
|
||||||
(GFX_OS_HEAP_SIZE == 0 && (GFX_USE_OS_RAW32 || GFX_USE_OS_ARDUINO || GFX_USE_OS_CMSIS || GFX_USE_OS_CMSIS2 || GFX_USE_OS_KEIL || GFX_USE_OS_RTX5))
|
(GFX_OS_HEAP_SIZE == 0 && (GFX_USE_OS_RAW32 || GFX_USE_OS_ARDUINO || GFX_USE_OS_CMSIS || GFX_USE_OS_CMSIS2 || GFX_USE_OS_KEIL || GFX_USE_OS_RTX5))
|
||||||
#if GFX_DISPLAY_RULE_WARNINGS
|
#if GFX_DISPLAY_RULE_WARNINGS
|
||||||
#if GFX_COMPILER_WARNING_TYPE == GFX_COMPILER_WARNING_DIRECT
|
#if GFX_COMPILER_WARNING_TYPE == GFX_COMPILER_WARNING_DIRECT
|
||||||
|
Loading…
Reference in New Issue
Block a user