summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nuttx/arch/sim/src/Makefile17
-rw-r--r--nuttx/graphics/nxbe/nxbe.h4
2 files changed, 17 insertions, 4 deletions
diff --git a/nuttx/arch/sim/src/Makefile b/nuttx/arch/sim/src/Makefile
index 05b13e739..067b7cf36 100644
--- a/nuttx/arch/sim/src/Makefile
+++ b/nuttx/arch/sim/src/Makefile
@@ -35,6 +35,19 @@
-include $(TOPDIR)/Make.defs
+# The X11 stuff only builds on Linux (but not Ubuntu -- Ubuntu needs
+# some work).
+
+ifneq ($(HOSTOS),Cygwin)
+ifeq ($(CONFIG_SIM_X11FB),y)
+ USEX = y
+else
+ USEX = n
+endif
+else
+ USEX = n
+endif
+
CFLAGS += -I$(TOPDIR)/sched
ASRCS = up_setjmp.S
@@ -46,7 +59,7 @@ CSRCS = up_initialize.c up_idle.c up_interruptcontext.c \
up_exit.c up_schedulesigaction.c up_allocateheap.c \
up_devconsole.c up_framebuffer.c
HOSTSRCS = up_stdio.c up_hostusleep.c
-ifneq ($(HOSTOS),Cygwin)
+ifeq ($(USEX),y)
HOSTSRCS += up_x11framebuffer.c
endif
ifeq ($(CONFIG_FS_FAT),y)
@@ -66,7 +79,7 @@ SRCS = $(ASRCS) $(CSRCS) $(HOSTSRCS)
OBJS = $(AOBJS) $(COBJS) $(HOSTOBJS)
LDFLAGS = $(ARCHSCRIPT)
-ifneq ($(HOSTOS),Cygwin)
+ifeq ($(USEX),y)
STDLIBS = -lX11 -lXext -lc
else
STDLIBS = -lc
diff --git a/nuttx/graphics/nxbe/nxbe.h b/nuttx/graphics/nxbe/nxbe.h
index ce95481b3..c9e7e6381 100644
--- a/nuttx/graphics/nxbe/nxbe.h
+++ b/nuttx/graphics/nxbe/nxbe.h
@@ -211,8 +211,8 @@ extern "C" {
*
****************************************************************************/
-#if CONFIG_FB_CMAP
-EXTERN int nxbe_colormap(FAR struct NX_DRIVERTYPE *dev);
+#ifdef CONFIG_FB_CMAP
+EXTERN int nxbe_colormap(FAR NX_DRIVERTYPE *dev);
#endif
/****************************************************************************