diff --git a/ChangeLog b/ChangeLog
index e3fa6f52624..1590700a6b7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6326,4 +6326,5 @@
reshuffling is necessary if we ever want to build graphics applications
as kernel builds. There is still more today (NXTK and NXFONTS need to
be moved to libc as well) (2013-12-27).
-
+ * Move libc/nx, nxmu, and nxglib to a new library, libnx. The NX
+ graphics is not properly a part of libc (2013-12-28).
diff --git a/Documentation/NXGraphicsSubsystem.html b/Documentation/NXGraphicsSubsystem.html
index 7da1c86f77d..4aa754b6c60 100644
--- a/Documentation/NXGraphicsSubsystem.html
+++ b/Documentation/NXGraphicsSubsystem.html
@@ -12,7 +12,7 @@
NX Graphics Subsystem
- Last Updated: May 7, 2012
+ Last Updated: December 28, 2013
@@ -3144,9 +3144,20 @@ int nxf_convert_32bpp(FAR uint32_t *dest, uint16_t height,
+
+ The graphics capability consist both of components internal to the RTOS and of user-callable interfaces.
+ In the NuttX kernel mode build there are some components of the graphics subsystem are callable in user mode and other components that are internal to the RTOS.
+ The directory nuttx/graphics contains only those components that are internal to the RTOS.
+
+ User callable functions must be part of a library that can be linked against user applications.
+ This user callable interfaces are provided in sub-directories under nuttx/libnx.
+
- graphics/nxglib
+ libnx/nx
+ - Common callable interfaces that are, logically, part of both nxmu and nxsu.
+
+
graphics/nxglib and libnx/nxglib
- The NuttX tiny graphics library.
The directory contains generic utilities support operations on primitive graphics objects
and logic to rasterize directly into a framebuffer or through an LCD driver interface.
@@ -3168,7 +3179,12 @@ int nxf_convert_32bpp(FAR uint32_t *dest, uint16_t height,
The single user front-end is selected when
CONFIG_NX_MULTIUSER is not
defined in the NuttX configuration file.
- graphics/nxsu
+
+ NOTE: There is no nxsu sub-directory in nuttx/libnx.
+ That is because this separation of interfaces is only required in the kernel build mode and only the multi-user interfaces can be used with the kernel build.
+
+
+ graphics/nxmu and libnx/nxmu
- This is the NX multi user front end.
When combined with the generic back-end (
nxbe), it implements a
multi-threaded, multi-user windowing system.
diff --git a/Documentation/README.html b/Documentation/README.html
index 7ae3ab5056a..cf0e2103451 100644
--- a/Documentation/README.html
+++ b/Documentation/README.html
@@ -255,6 +255,8 @@
| | `- README.txt
| |- libc/
| | `- README.txt
+ | |- libnx/
+ | | `- README.txt
| |- libxx/
| | `- README.txt
| |- mm/
diff --git a/Makefile.unix b/Makefile.unix
index 142b84ca126..273024f6d38 100644
--- a/Makefile.unix
+++ b/Makefile.unix
@@ -134,10 +134,10 @@ endif
endif
ifeq ($(CONFIG_NX),y)
-NONFSDIRS += graphics
-CONTEXTDIRS += graphics
+NONFSDIRS += graphics libnx
+CONTEXTDIRS += graphics libnx
else
-OTHERDIRS += graphics
+OTHERDIRS += graphics libnx
endif
ifeq ($(CONFIG_AUDIO),y)
@@ -256,6 +256,12 @@ endif
ifeq ($(CONFIG_NX),y)
NUTTXLIBS += lib/libgraphics$(LIBEXT)
+ifeq ($(CONFIG_NUTTX_KERNEL),y)
+NUTTXLIBS += lib/libknx$(LIBEXT)
+USERLIBS += lib/libunx$(LIBEXT)
+else
+NUTTXLIBS += lib/libnx$(LIBEXT)
+endif
endif
# Add libraries for the audio sub-system
@@ -471,6 +477,12 @@ libc/libkc$(LIBEXT): context
lib/libkc$(LIBEXT): libc/libkc$(LIBEXT)
$(Q) install libc/libkc$(LIBEXT) lib/libkc$(LIBEXT)
+libnx/libknx$(LIBEXT): context
+ $(Q) $(MAKE) -C libnx TOPDIR="$(TOPDIR)" libknx$(LIBEXT) EXTRADEFINES=$(KDEFINE)
+
+lib/libknx$(LIBEXT): libnx/libknx$(LIBEXT)
+ $(Q) install libnx/libknx$(LIBEXT) lib/libknx$(LIBEXT)
+
mm/libkmm$(LIBEXT): context
$(Q) $(MAKE) -C mm TOPDIR="$(TOPDIR)" libkmm$(LIBEXT) EXTRADEFINES=$(KDEFINE)
@@ -540,6 +552,12 @@ libc/libuc$(LIBEXT): context
lib/libuc$(LIBEXT): libc/libuc$(LIBEXT)
$(Q) install libc/libuc$(LIBEXT) lib/libuc$(LIBEXT)
+libnx/libunx$(LIBEXT): context
+ $(Q) $(MAKE) -C libnx TOPDIR="$(TOPDIR)" libunx$(LIBEXT)
+
+lib/libunx$(LIBEXT): libnx/libunx$(LIBEXT)
+ $(Q) install libnx/libunx$(LIBEXT) lib/libunx$(LIBEXT)
+
mm/libumm$(LIBEXT): context
$(Q) $(MAKE) -C mm TOPDIR="$(TOPDIR)" libumm$(LIBEXT)
@@ -579,6 +597,12 @@ libc/libc$(LIBEXT): context
lib/libc$(LIBEXT): libc/libc$(LIBEXT)
$(Q) install libc/libc$(LIBEXT) lib/libc$(LIBEXT)
+libnx/libnx$(LIBEXT): context
+ $(Q) $(MAKE) -C libnx TOPDIR="$(TOPDIR)" libnx$(LIBEXT)
+
+lib/libnx$(LIBEXT): libnx/libnx$(LIBEXT)
+ $(Q) install libnx/libnx$(LIBEXT) lib/libnx$(LIBEXT)
+
mm/libmm$(LIBEXT): context
$(Q) $(MAKE) -C mm TOPDIR="$(TOPDIR)" libmm$(LIBEXT)
diff --git a/Makefile.win b/Makefile.win
index a424580b7b9..7ca04070f4f 100644
--- a/Makefile.win
+++ b/Makefile.win
@@ -127,10 +127,10 @@ endif
endif
ifeq ($(CONFIG_NX),y)
-NONFSDIRS += graphics
-CONTEXTDIRS += graphics
+NONFSDIRS += graphics libnx
+CONTEXTDIRS += graphics libnx
else
-OTHERDIRS += graphics
+OTHERDIRS += graphics libnx
endif
ifeq ($(CONFIG_AUDIO),y)
@@ -249,6 +249,12 @@ endif
ifeq ($(CONFIG_NX),y)
NUTTXLIBS += lib\libgraphics$(LIBEXT)
+ifeq ($(CONFIG_NUTTX_KERNEL),y)
+NUTTXLIBS += lib\libknx$(LIBEXT)
+USERLIBS += lib\libunx$(LIBEXT)
+else
+NUTTXLIBS += lib\libnx$(LIBEXT)
+endif
endif
# Add libraries for the Audio sub-system
@@ -487,6 +493,12 @@ libc\libkc$(LIBEXT): context
lib\libkc$(LIBEXT): libc\libkc$(LIBEXT)
$(Q) install libc\libkc$(LIBEXT) lib\libkc$(LIBEXT)
+libnx\libknx$(LIBEXT): context
+ $(Q) $(MAKE) -C libnx TOPDIR="$(TOPDIR)" libknx$(LIBEXT) EXTRADEFINES=$(KDEFINE)
+
+lib\libknx$(LIBEXT): libnx\libknx$(LIBEXT)
+ $(Q) install libnx\libknx$(LIBEXT) lib\libknx$(LIBEXT)
+
mm\libkmm$(LIBEXT): context
$(Q) $(MAKE) -C mm TOPDIR="$(TOPDIR)" libkmm$(LIBEXT) EXTRADEFINES=$(KDEFINE)
@@ -556,6 +568,12 @@ libc\libuc$(LIBEXT): context
lib\libuc$(LIBEXT): libc\libuc$(LIBEXT)
$(Q) install libc\libuc$(LIBEXT) lib\libuc$(LIBEXT)
+libnx\libunx$(LIBEXT): context
+ $(Q) $(MAKE) -C libnx TOPDIR="$(TOPDIR)" libunx$(LIBEXT)
+
+lib\libunx$(LIBEXT): libnx\libunx$(LIBEXT)
+ $(Q) install libnx\libunx$(LIBEXT) lib\libunx$(LIBEXT)
+
mm\libumm$(LIBEXT): context
$(Q) $(MAKE) -C mm TOPDIR="$(TOPDIR)" libumm$(LIBEXT)
@@ -595,6 +613,12 @@ libc\libc$(LIBEXT): context
lib\libc$(LIBEXT): libc\libc$(LIBEXT)
$(Q) install libc\libc$(LIBEXT) lib\libc$(LIBEXT)
+libnx\libnx$(LIBEXT): context
+ $(Q) $(MAKE) -C libnx TOPDIR="$(TOPDIR)" libnx$(LIBEXT)
+
+lib\libnx$(LIBEXT): libnx\libnx$(LIBEXT)
+ $(Q) install libnx\libnx$(LIBEXT) lib\libnx$(LIBEXT)
+
mm\libmm$(LIBEXT): context
$(Q) $(MAKE) -C mm TOPDIR="$(TOPDIR)" libmm$(LIBEXT)
diff --git a/README.txt b/README.txt
index fdacb514ca5..ac0fac0b20e 100644
--- a/README.txt
+++ b/README.txt
@@ -1183,6 +1183,8 @@ nuttx
| `- README.txt
|- libc/
| `- README.txt
+ |- libnx/
+ | `- README.txt
|- libxx/
| `- README.txt
|- mm/
diff --git a/graphics/README.txt b/graphics/README.txt
index 474b0f3a9ca..9f3bdbe4e6c 100644
--- a/graphics/README.txt
+++ b/graphics/README.txt
@@ -52,7 +52,21 @@ include/nuttx/nx/nxfont.h -- Describe sthe NXFONT C interfaces
Directories
^^^^^^^^^^^
+ The graphics capability consist both of components internal to the RTOS
+ and of user-callable interfaces. In the NuttX kernel mode build there are
+ some components of the graphics subsystem are callable in user mode and other
+ components that are internal to the RTOS. This directory, nuttx/graphics,
+ contains only those components that are internal to the RTOS.
+
+ User callable functions must, instead, be part of a library that can be
+ linked against user applications. This user callable interfaces are
+ provided in sub-directories under nuttx/libnx.
+
+libnx/nx
+ Common callable interfaces that are, logically, part of both nxmu and nxsu.
+
graphics/nxglib
+libnx/nxglib
The NuttX tiny graphics library. The directory contains generic utilities
support operations on primitive graphics objects and logic to rasterize directly
into a framebuffer. It has no concept of windows (other than the one, framebuffer
@@ -71,7 +85,12 @@ graphics/nxsu
single user front-end is selected when CONFIG_NX_MULTIUSER is not defined in the
NuttX configuration file.
+ NOTE: There is no nxsu sub-directory in nuttx/libnx. That is because this
+ separation of interfaces is only required in the kernel build mode and
+ only the multi-user interfaces can be used with the kernel build.
+
graphics/nxmu
+libnx/nxmu
This is the NX multi user "front end". When combined with the generic "back-end"
(nxbe), it implements a multi-threaded, multi-user windowing system. The files
in this directory present the window APIs described in include/nuttx/nx/nx.h. The
diff --git a/graphics/nxglib/nxglib_copyrun.h b/graphics/nxglib/nxglib_copyrun.h
index a52af22463c..f0cb9097a2f 100644
--- a/graphics/nxglib/nxglib_copyrun.h
+++ b/graphics/nxglib/nxglib_copyrun.h
@@ -1,5 +1,5 @@
/****************************************************************************
- * graphics/nxglib/nxsglib_copyrun.h
+ * graphics/nxglib/nxglib_copyrun.h
*
* Copyright (C) 2010 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
diff --git a/graphics/nxglib/nxglib_fillrun.h b/graphics/nxglib/nxglib_fillrun.h
index 1dcf85dd977..074823b1f40 100644
--- a/graphics/nxglib/nxglib_fillrun.h
+++ b/graphics/nxglib/nxglib_fillrun.h
@@ -1,5 +1,5 @@
/****************************************************************************
- * graphics/nxglib/nxsglib_fullrun.h
+ * graphics/nxglib/nxglib_fullrun.h
*
* Copyright (C) 2010 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
diff --git a/libc/Makefile b/libc/Makefile
index 5573f98f0c1..94884bd80aa 100644
--- a/libc/Makefile
+++ b/libc/Makefile
@@ -65,9 +65,6 @@ include mqueue/Make.defs
include math/Make.defs
include fixedmath/Make.defs
include net/Make.defs
-include nxglib/Make.defs
-include nx/Make.defs
-include nxmu/Make.defs
include time/Make.defs
include libgen/Make.defs
include dirent/Make.defs
diff --git a/libc/lib_internal.h b/libc/lib_internal.h
index ee4d751e950..ae6ec7b0665 100644
--- a/libc/lib_internal.h
+++ b/libc/lib_internal.h
@@ -33,8 +33,8 @@
*
****************************************************************************/
-#ifndef __LIB_LIB_INTERNAL_H
-#define __LIB_LIB_INTERNAL_H
+#ifndef __LIBC_LIB_INTERNAL_H
+#define __LIBC_LIB_INTERNAL_H
/****************************************************************************
* Included Files
@@ -73,7 +73,7 @@
# define lib_give_semaphore(s)
#endif
-/* The NuttX C library an be build in two modes: (1) as a standard, C-libary
+/* The NuttX C library an be build in two modes: (1) as a standard, C-library
* that can be used by normal, user-space applications, or (2) as a special,
* kernel-mode C-library only used within the OS. If NuttX is not being
* built as separated kernel- and user-space modules, then only the first
@@ -237,4 +237,4 @@ float lib_sqrtapprox(float x);
}
#endif
-#endif /* __LIB_LIB_INTERNAL_H */
+#endif /* __LIBC_LIB_INTERNAL_H */
diff --git a/libnx/.gitignore b/libnx/.gitignore
new file mode 100644
index 00000000000..44efe433f00
--- /dev/null
+++ b/libnx/.gitignore
@@ -0,0 +1,6 @@
+/Make_bin.dep
+/Make_ubin.dep
+/Make_kbin.dep
+/.depend
+/*.lib
+
diff --git a/libnx/Makefile b/libnx/Makefile
new file mode 100644
index 00000000000..2c3e7893984
--- /dev/null
+++ b/libnx/Makefile
@@ -0,0 +1,143 @@
+############################################################################
+# libnx/Makefile
+#
+# Copyright (C) 2013 Gregory Nutt. All rights reserved.
+# Author: Gregory Nutt
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# 3. Neither the name NuttX nor the names of its contributors may be
+# used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+###########################################################################
+
+-include $(TOPDIR)/Make.defs
+
+# CFLAGS
+
+ifeq ($(CONFIG_NUTTX_KERNEL),y)
+ifeq ($(CONFIG_WINDOWS_NATIVE),y)
+ KDEFINE = ${shell $(TOPDIR)\tools\define.bat "$(CC)" __KERNEL__}
+else
+ KDEFINE = ${shell $(TOPDIR)/tools/define.sh "$(CC)" __KERNEL__}
+endif
+endif
+
+# Sources and paths
+
+ASRCS =
+CSRCS =
+
+DEPPATH := --dep-path .
+VPATH := .
+
+include nxglib/Make.defs
+include nx/Make.defs
+include nxmu/Make.defs
+
+BINDIR ?= bin
+
+AOBJS = $(patsubst %.S, $(BINDIR)$(DELIM)%$(OBJEXT), $(ASRCS))
+COBJS = $(patsubst %.c, $(BINDIR)$(DELIM)%$(OBJEXT), $(CSRCS))
+
+SRCS = $(ASRCS) $(CSRCS)
+OBJS = $(AOBJS) $(COBJS)
+
+UBIN = libunx$(LIBEXT)
+KBIN = libknx$(LIBEXT)
+BIN ?= libnx$(LIBEXT)
+
+all: $(BIN)
+.PHONY: clean distclean
+
+$(AOBJS): $(BINDIR)$(DELIM)%$(OBJEXT): %.S
+ $(call ASSEMBLE, $<, $@)
+ $(call MOVEOBJ,$(patsubst $(BINDIR)$(DELIM)%$(OBJEXT),%,$@),$(BINDIR))
+
+$(COBJS): $(BINDIR)$(DELIM)%$(OBJEXT): %.c
+ $(call COMPILE, $<, $@)
+ $(call MOVEOBJ,$(patsubst $(BINDIR)$(DELIM)%$(OBJEXT),%,$@),$(BINDIR))
+
+# NX library for the flat build
+
+$(BIN): $(OBJS)
+ $(call ARCHIVE, $@, $(OBJS))
+
+# NX library for the user phase of the two-pass kernel build
+
+ifneq ($(BIN),$(UBIN))
+$(UBIN):
+ $(Q) $(MAKE) $(UBIN) BIN=$(UBIN) BINDIR=ubin TOPDIR=$(TOPDIR) EXTRADEFINES=$(EXTRADEFINES)
+endif
+
+# NX library for the kernel phase of the two-pass kernel build
+
+ifneq ($(BIN),$(KBIN))
+$(KBIN):
+ $(Q) $(MAKE) $(KBIN) BIN=$(KBIN) BINDIR=kbin TOPDIR=$(TOPDIR) EXTRADEFINES=$(EXTRADEFINES)
+endif
+
+# Dependencies
+
+.depend: Makefile $(SRCS)
+ifeq ($(CONFIG_NUTTX_KERNEL),y)
+ $(Q) $(MKDEP) --obj-path ubin --obj-suffix $(OBJEXT) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make_ubin.dep
+ $(Q) $(MKDEP) --obj-path kbin --obj-suffix $(OBJEXT) $(DEPPATH) "$(CC)" -- $(CFLAGS) $(KDEFINE) -- $(SRCS) >Make_kbin.dep
+else
+ $(Q) $(MKDEP) --obj-path bin --obj-suffix $(OBJEXT) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make_bin.dep
+endif
+ $(Q) touch $@
+
+depend: .depend
+
+# Generate configuration context
+
+context:
+
+# Clean most derived files, retaining the configuration
+
+clean:
+ $(Q) $(MAKE) -C bin clean TOPDIR=$(TOPDIR)
+ $(Q) $(MAKE) -C ubin clean TOPDIR=$(TOPDIR)
+ $(Q) $(MAKE) -C kbin clean TOPDIR=$(TOPDIR)
+ $(call DELFILE, $(BIN))
+ $(call DELFILE, $(UBIN))
+ $(call DELFILE, $(KBIN))
+ $(call CLEAN)
+
+# Deep clean -- removes all traces of the configuration
+
+distclean: clean
+ $(Q) $(MAKE) -C bin distclean TOPDIR=$(TOPDIR)
+ $(Q) $(MAKE) -C ubin distclean TOPDIR=$(TOPDIR)
+ $(Q) $(MAKE) -C kbin distclean TOPDIR=$(TOPDIR)
+ $(call DELFILE, Make_bin.dep)
+ $(call DELFILE, Make_ubin.dep)
+ $(call DELFILE, Make_kbin.dep)
+ $(call DELFILE, .depend)
+
+-include Make_bin.dep
+-include Make_ubin.dep
+-include Make_kbin.dep
diff --git a/libnx/README.txt b/libnx/README.txt
new file mode 100755
index 00000000000..bb9121a5152
--- /dev/null
+++ b/libnx/README.txt
@@ -0,0 +1,11 @@
+README
+======
+
+ The graphics capability consist both of components internal to the RTOS
+ and of user-callable interfaces. In the NuttX kernel mode build there are
+ some components of the graphics subsystem are callable in user mode and
+ other components that are internal to the RTOS. This directory, libnx/,
+ contains only those user-callable components.
+
+ The RTOS internal functions are contained in the graphics/ directory.
+ Please refer to graphics/README.txt for more detailed information.
diff --git a/libnx/bin/.gitignore b/libnx/bin/.gitignore
new file mode 100644
index 00000000000..4e358a8c57c
--- /dev/null
+++ b/libnx/bin/.gitignore
@@ -0,0 +1,8 @@
+/*.asm
+/*.obj
+/*.rel
+/*.lst
+/*.sym
+/*.adb
+/*.lib
+/*.src
diff --git a/libnx/bin/Makefile b/libnx/bin/Makefile
new file mode 100644
index 00000000000..c544cb5465f
--- /dev/null
+++ b/libnx/bin/Makefile
@@ -0,0 +1,48 @@
+############################################################################
+# libnx/bin/Makefile
+#
+# Copyright (C) 2013 Gregory Nutt. All rights reserved.
+# Author: Gregory Nutt
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# 3. Neither the name NuttX nor the names of its contributors may be
+# used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+###########################################################################
+
+-include $(TOPDIR)/Make.defs
+
+all:
+.PHONY: clean distclean
+
+# Clean Targets:
+
+clean:
+ $(call CLEAN)
+
+# Deep clean -- removes all traces of the configuration
+
+distclean: clean
diff --git a/libnx/kbin/.gitignore b/libnx/kbin/.gitignore
new file mode 100644
index 00000000000..4e358a8c57c
--- /dev/null
+++ b/libnx/kbin/.gitignore
@@ -0,0 +1,8 @@
+/*.asm
+/*.obj
+/*.rel
+/*.lst
+/*.sym
+/*.adb
+/*.lib
+/*.src
diff --git a/libnx/kbin/Makefile b/libnx/kbin/Makefile
new file mode 100644
index 00000000000..07817985ea7
--- /dev/null
+++ b/libnx/kbin/Makefile
@@ -0,0 +1,48 @@
+############################################################################
+# libnx/kbin/Makefile
+#
+# Copyright (C) 2013 Gregory Nutt. All rights reserved.
+# Author: Gregory Nutt
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# 3. Neither the name NuttX nor the names of its contributors may be
+# used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+###########################################################################
+
+-include $(TOPDIR)/Make.defs
+
+all:
+.PHONY: clean distclean
+
+# Clean Targets:
+
+clean:
+ $(call CLEAN)
+
+# Deep clean -- removes all traces of the configuration
+
+distclean: clean
diff --git a/libc/nx/Make.defs b/libnx/nx/Make.defs
similarity index 95%
rename from libc/nx/Make.defs
rename to libnx/nx/Make.defs
index e4579f5f284..5af4adad8d9 100644
--- a/libc/nx/Make.defs
+++ b/libnx/nx/Make.defs
@@ -1,5 +1,5 @@
############################################################################
-# libc/nx/Make.defs
+# libnx/nx/Make.defs
#
# Copyright (C) 2013 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt
@@ -37,7 +37,7 @@
ifeq ($(CONFIG_NX),y)
-CSRCS += lib_nx_drawcircle.c lib_nx_drawline.c lib_nx_fillcircle.c
+CSRCS += nx_drawcircle.c nx_drawline.c nx_fillcircle.c
# Add the nx/ directory to the build
diff --git a/libc/nx/lib_nx_drawcircle.c b/libnx/nx/nx_drawcircle.c
similarity index 99%
rename from libc/nx/lib_nx_drawcircle.c
rename to libnx/nx/nx_drawcircle.c
index 2116a90b5ec..97f0a4e3f39 100644
--- a/libc/nx/lib_nx_drawcircle.c
+++ b/libnx/nx/nx_drawcircle.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * libc/nx/lib_nx_drawcircle.c
+ * libnx/nx/nx_drawcircle.c
*
* Copyright (C) 2011, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
diff --git a/libc/nx/lib_nx_drawline.c b/libnx/nx/nx_drawline.c
similarity index 99%
rename from libc/nx/lib_nx_drawline.c
rename to libnx/nx/nx_drawline.c
index 7d52ebeb9d7..ac47a441813 100644
--- a/libc/nx/lib_nx_drawline.c
+++ b/libnx/nx/nx_drawline.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * libc/nx/nx_drawline.c
+ * libnx/nx/nx_drawline.c
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
diff --git a/libc/nx/lib_nx_fillcircle.c b/libnx/nx/nx_fillcircle.c
similarity index 99%
rename from libc/nx/lib_nx_fillcircle.c
rename to libnx/nx/nx_fillcircle.c
index 9cfb108c5dc..aba0fd649a2 100644
--- a/libc/nx/lib_nx_fillcircle.c
+++ b/libnx/nx/nx_fillcircle.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * libc/nx/lib_nx_fillcircle.c
+ * libnx/nx/nx_fillcircle.c
*
* Copyright (C) 2011, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
diff --git a/libnx/nxcontext.h b/libnx/nxcontext.h
new file mode 100644
index 00000000000..ca5e6dcb174
--- /dev/null
+++ b/libnx/nxcontext.h
@@ -0,0 +1,127 @@
+/****************************************************************************
+ * libnx/nxcontext.h
+ *
+ * Copyright (C) 2013 Gregory Nutt. All rights reserved.
+ * Author: Gregory Nutt
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the name NuttX nor the names of its contributors may be
+ * used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ ****************************************************************************/
+
+#ifndef _LIBNX_NXCONTEXT_H
+#define _LIBNX_NXCONTEXT_H
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include
+
+#include
+#include
+#include
+#include
+#include
+
+#include
+
+/****************************************************************************
+ * Definitions
+ ****************************************************************************/
+
+/* The NuttX NX library an be build in two modes: (1) as a standard, C-library
+ * that can be used by normal, user-space applications, or (2) as a special,
+ * kernel-mode NX-library only used within the OS. If NuttX is not being
+ * built as separated kernel- and user-space modules, then only the first
+ * mode is supported.
+ */
+
+#if defined(CONFIG_NUTTX_KERNEL) && defined(__KERNEL__)
+# include
+
+ /* Domain-specific allocations */
+
+# define lib_malloc(s) kmalloc(s)
+# define lib_zalloc(s) kzalloc(s)
+# define lib_realloc(p,s) krealloc(p,s)
+# define lib_memalign(p,s) krealloc(p,s)
+# define lib_free(p) kfree(p)
+
+ /* User-accessible allocations */
+
+# define lib_umalloc(s) kumalloc(s)
+# define lib_uzalloc(s) kuzalloc(s)
+# define lib_urealloc(p,s) kurealloc(p,s)
+# define lib_ufree(p) kufree(p)
+
+#else
+# include
+
+ /* Domain-specific allocations */
+
+# define lib_malloc(s) malloc(s)
+# define lib_zalloc(s) zalloc(s)
+# define lib_realloc(p,s) realloc(p,s)
+# define lib_free(p) free(p)
+
+ /* User-accessible allocations */
+
+# define lib_umalloc(s) malloc(s)
+# define lib_uzalloc(s) zalloc(s)
+# define lib_urealloc(p,s) realloc(p,s)
+# define lib_ufree(p) free(p)
+
+#endif
+
+/****************************************************************************
+ * Public Types
+ ****************************************************************************/
+
+/****************************************************************************
+ * Public Variables
+ ****************************************************************************/
+
+#undef EXTERN
+#if defined(__cplusplus)
+#define EXTERN extern "C"
+extern "C"
+{
+#else
+#define EXTERN extern
+#endif
+
+/****************************************************************************
+ * Public Function Prototypes
+ ****************************************************************************/
+
+#undef EXTERN
+#if defined(__cplusplus)
+}
+#endif
+
+#endif /* _LIBNX_NXCONTEXT_H */
diff --git a/libc/nxglib/Make.defs b/libnx/nxglib/Make.defs
similarity index 74%
rename from libc/nxglib/Make.defs
rename to libnx/nxglib/Make.defs
index 7d6637a46e4..7aaff27f46c 100644
--- a/libc/nxglib/Make.defs
+++ b/libnx/nxglib/Make.defs
@@ -1,5 +1,5 @@
############################################################################
-# libc/nxglib/Make.defs
+# libnx/nxglib/Make.defs
#
# Copyright (C) 2013 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt
@@ -37,16 +37,14 @@
ifeq ($(CONFIG_NX),y)
-CSRCS += lib_nxglib_circlepts.c lib_nxglib_circletraps.c
-CSRCS += lib_nxglib_colorcopy.c lib_nxglib_intersecting.c
-CSRCS += lib_nxglib_nonintersecting.c lib_nxglib_nullrect.c
-CSRCS += lib_nxglib_rectadd.c lib_nxglib_rectcopy.c lib_nxglib_rectinside.c
-CSRCS += lib_nxglib_rectintersect.c lib_nxglib_rectoffset.c
-CSRCS += lib_nxglib_rectoverlap.c lib_nxglib_rectsize.c
-CSRCS += lib_nxglib_rectunion.c lib_nxglib_rgb2yuv.c lib_nxglib_runcopy.c
-CSRCS += lib_nxglib_runoffset.c lib_nxglib_splitline.c lib_nxglib_trapcopy.c
-CSRCS += lib_nxglib_trapoffset.c lib_nxglib_vectoradd.c
-CSRCS += lib_nxglib_vectsubtract.c lib_nxglib_yuv2rgb.c
+CSRCS += nxglib_circlepts.c nxglib_circletraps.c nxglib_colorcopy.c
+CSRCS += nxglib_intersecting.c nxglib_nonintersecting.c nxglib_nullrect.c
+CSRCS += nxglib_rectadd.c nxglib_rectcopy.c nxglib_rectinside.c
+CSRCS += nxglib_rectintersect.c nxglib_rectoffset.c nxglib_rectoverlap.c
+CSRCS += nxglib_rectsize.c nxglib_rectunion.c nxglib_rgb2yuv.c
+CSRCS += nxglib_runcopy.c nxglib_runoffset.c nxglib_splitline.c
+CSRCS += nxglib_trapcopy.c nxglib_trapoffset.c nxglib_vectoradd.c
+CSRCS += nxglib_vectsubtract.c nxglib_yuv2rgb.c
# Add the nxglib/ directory to the build
diff --git a/libc/nxglib/lib_nxglib_circlepts.c b/libnx/nxglib/nxglib_circlepts.c
similarity index 100%
rename from libc/nxglib/lib_nxglib_circlepts.c
rename to libnx/nxglib/nxglib_circlepts.c
diff --git a/libc/nxglib/lib_nxglib_circletraps.c b/libnx/nxglib/nxglib_circletraps.c
similarity index 100%
rename from libc/nxglib/lib_nxglib_circletraps.c
rename to libnx/nxglib/nxglib_circletraps.c
diff --git a/libc/nxglib/lib_nxglib_colorcopy.c b/libnx/nxglib/nxglib_colorcopy.c
similarity index 98%
rename from libc/nxglib/lib_nxglib_colorcopy.c
rename to libnx/nxglib/nxglib_colorcopy.c
index 6f6bbc434aa..494bafd84c4 100644
--- a/libc/nxglib/lib_nxglib_colorcopy.c
+++ b/libnx/nxglib/nxglib_colorcopy.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * libc/nxglib/lib_nxglib_colorcopy.c
+ * libnx/nxglib/nxglib_colorcopy.c
*
* Copyright (C) 2008-2011, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
diff --git a/libc/nxglib/lib_nxglib_intersecting.c b/libnx/nxglib/nxglib_intersecting.c
similarity index 98%
rename from libc/nxglib/lib_nxglib_intersecting.c
rename to libnx/nxglib/nxglib_intersecting.c
index 576d03678d9..26956d9c255 100644
--- a/libc/nxglib/lib_nxglib_intersecting.c
+++ b/libnx/nxglib/nxglib_intersecting.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * libc/nxglib/lib_nxglib_intersecting.c
+ * libnx/nxglib/nxglib_intersecting.c
*
* Copyright (C) 2011, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
diff --git a/libc/nxglib/lib_nxglib_nonintersecting.c b/libnx/nxglib/nxglib_nonintersecting.c
similarity index 99%
rename from libc/nxglib/lib_nxglib_nonintersecting.c
rename to libnx/nxglib/nxglib_nonintersecting.c
index f406b791fc5..02f31ef4638 100644
--- a/libc/nxglib/lib_nxglib_nonintersecting.c
+++ b/libnx/nxglib/nxglib_nonintersecting.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * libc/nxglib/lib_nxglib_rectnonintersecting.c
+ * libnx/nxglib/nxglib_rectnonintersecting.c
*
* Copyright (C) 2008-2011, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
diff --git a/libc/nxglib/lib_nxglib_nullrect.c b/libnx/nxglib/nxglib_nullrect.c
similarity index 98%
rename from libc/nxglib/lib_nxglib_nullrect.c
rename to libnx/nxglib/nxglib_nullrect.c
index 89fa23d9a24..052e822fe19 100644
--- a/libc/nxglib/lib_nxglib_nullrect.c
+++ b/libnx/nxglib/nxglib_nullrect.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * libc/nxglib/lib_nxglib_nullrect.c
+ * libnx/nxglib/nxglib_nullrect.c
*
* Copyright (C) 2008-2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
diff --git a/libc/nxglib/lib_nxglib_rectadd.c b/libnx/nxglib/nxglib_rectadd.c
similarity index 99%
rename from libc/nxglib/lib_nxglib_rectadd.c
rename to libnx/nxglib/nxglib_rectadd.c
index 2968055d084..dc23e86de0f 100644
--- a/libc/nxglib/lib_nxglib_rectadd.c
+++ b/libnx/nxglib/nxglib_rectadd.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * libc/nxglib/lib_nxsglib_rectadd.c
+ * libnx/nxglib/nxglib_rectadd.c
*
* Copyright (C) 2011, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
diff --git a/libc/nxglib/lib_nxglib_rectcopy.c b/libnx/nxglib/nxglib_rectcopy.c
similarity index 98%
rename from libc/nxglib/lib_nxglib_rectcopy.c
rename to libnx/nxglib/nxglib_rectcopy.c
index c464a3a28a5..f597ad27b48 100644
--- a/libc/nxglib/lib_nxglib_rectcopy.c
+++ b/libnx/nxglib/nxglib_rectcopy.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * libc/nxglib/lib_nxglib_rectcopy.c
+ * libnx/nxglib/nxglib_rectcopy.c
*
* Copyright (C) 2008-2011, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
diff --git a/libc/nxglib/lib_nxglib_rectinside.c b/libnx/nxglib/nxglib_rectinside.c
similarity index 99%
rename from libc/nxglib/lib_nxglib_rectinside.c
rename to libnx/nxglib/nxglib_rectinside.c
index 2c8f434f75d..1b093e1902a 100644
--- a/libc/nxglib/lib_nxglib_rectinside.c
+++ b/libnx/nxglib/nxglib_rectinside.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * libc/nxglib/nxglib_rectinside.c
+ * libnx/nxglib/nxglib_rectinside.c
*
* Copyright (C) 2008-2011, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
diff --git a/libc/nxglib/lib_nxglib_rectintersect.c b/libnx/nxglib/nxglib_rectintersect.c
similarity index 98%
rename from libc/nxglib/lib_nxglib_rectintersect.c
rename to libnx/nxglib/nxglib_rectintersect.c
index 4804c82d01a..05ffe6f2229 100644
--- a/libc/nxglib/lib_nxglib_rectintersect.c
+++ b/libnx/nxglib/nxglib_rectintersect.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * libc/nxglib/lib_nxglib_rectintersect.c
+ * libnx/nxglib/nxglib_rectintersect.c
*
* Copyright (C) 2008-2011, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
diff --git a/libc/nxglib/lib_nxglib_rectoffset.c b/libnx/nxglib/nxglib_rectoffset.c
similarity index 98%
rename from libc/nxglib/lib_nxglib_rectoffset.c
rename to libnx/nxglib/nxglib_rectoffset.c
index 82e2e43c842..27c6b67718b 100644
--- a/libc/nxglib/lib_nxglib_rectoffset.c
+++ b/libnx/nxglib/nxglib_rectoffset.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * lbic/nxglib/lib_nxsglib_rectoffset.c
+ * lbic/nxglib/nxglib_rectoffset.c
*
* Copyright (C) 2008-2011, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
diff --git a/libc/nxglib/lib_nxglib_rectoverlap.c b/libnx/nxglib/nxglib_rectoverlap.c
similarity index 98%
rename from libc/nxglib/lib_nxglib_rectoverlap.c
rename to libnx/nxglib/nxglib_rectoverlap.c
index f278b1e5e2e..092b3231f2d 100644
--- a/libc/nxglib/lib_nxglib_rectoverlap.c
+++ b/libnx/nxglib/nxglib_rectoverlap.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * libc/nxglib/lib_nxglib_nulloverlap.c
+ * libnx/nxglib/nxglib_nulloverlap.c
*
* Copyright (C) 2008-2011, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
diff --git a/libc/nxglib/lib_nxglib_rectsize.c b/libnx/nxglib/nxglib_rectsize.c
similarity index 98%
rename from libc/nxglib/lib_nxglib_rectsize.c
rename to libnx/nxglib/nxglib_rectsize.c
index 65342450a98..f4599e891ab 100644
--- a/libc/nxglib/lib_nxglib_rectsize.c
+++ b/libnx/nxglib/nxglib_rectsize.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * libc/nxglib/lib_nxglib_rectsize.c
+ * libnx/nxglib/nxglib_rectsize.c
*
* Copyright (C) 2008-2011, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
diff --git a/libc/nxglib/lib_nxglib_rectunion.c b/libnx/nxglib/nxglib_rectunion.c
similarity index 98%
rename from libc/nxglib/lib_nxglib_rectunion.c
rename to libnx/nxglib/nxglib_rectunion.c
index 9e3700c0d1a..9d805aad032 100644
--- a/libc/nxglib/lib_nxglib_rectunion.c
+++ b/libnx/nxglib/nxglib_rectunion.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * libc/nxglib/lib_nxsglib_rectunion.c
+ * libnx/nxglib/nxglib_rectunion.c
*
* Copyright (C) 2008-2011, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
diff --git a/libc/nxglib/lib_nxglib_rgb2yuv.c b/libnx/nxglib/nxglib_rgb2yuv.c
similarity index 99%
rename from libc/nxglib/lib_nxglib_rgb2yuv.c
rename to libnx/nxglib/nxglib_rgb2yuv.c
index 00b02c7a1a3..4a35c0e7be3 100644
--- a/libc/nxglib/lib_nxglib_rgb2yuv.c
+++ b/libnx/nxglib/nxglib_rgb2yuv.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * libc/nxglib/lib_nxglib_rgb2yuv.c
+ * libnx/nxglib/nxglib_rgb2yuv.c
*
* Copyright (C) 2008, 2011, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
diff --git a/libc/nxglib/lib_nxglib_runcopy.c b/libnx/nxglib/nxglib_runcopy.c
similarity index 98%
rename from libc/nxglib/lib_nxglib_runcopy.c
rename to libnx/nxglib/nxglib_runcopy.c
index fc9dd6c743c..5c5992591bd 100644
--- a/libc/nxglib/lib_nxglib_runcopy.c
+++ b/libnx/nxglib/nxglib_runcopy.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * libc/nxglib/lib_nxglib_runcopy.c
+ * libnx/nxglib/nxglib_runcopy.c
*
* Copyright (C) 2008-2011, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
diff --git a/libc/nxglib/lib_nxglib_runoffset.c b/libnx/nxglib/nxglib_runoffset.c
similarity index 98%
rename from libc/nxglib/lib_nxglib_runoffset.c
rename to libnx/nxglib/nxglib_runoffset.c
index 170f8d1dc8f..9f0ba880dae 100644
--- a/libc/nxglib/lib_nxglib_runoffset.c
+++ b/libnx/nxglib/nxglib_runoffset.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * libc/nxglib/lib_nxglib_runoffset.c
+ * libnx/nxglib/nxglib_runoffset.c
*
* Copyright (C) 2008-2009, 2011, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
diff --git a/libc/nxglib/lib_nxglib_splitline.c b/libnx/nxglib/nxglib_splitline.c
similarity index 100%
rename from libc/nxglib/lib_nxglib_splitline.c
rename to libnx/nxglib/nxglib_splitline.c
diff --git a/libc/nxglib/lib_nxglib_trapcopy.c b/libnx/nxglib/nxglib_trapcopy.c
similarity index 98%
rename from libc/nxglib/lib_nxglib_trapcopy.c
rename to libnx/nxglib/nxglib_trapcopy.c
index d99aa2faa51..398155c8ff0 100644
--- a/libc/nxglib/lib_nxglib_trapcopy.c
+++ b/libnx/nxglib/nxglib_trapcopy.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * libc/nxglib/lib_nxglib_trapcopy.c
+ * libnx/nxglib/nxglib_trapcopy.c
*
* Copyright (C) 2008-2011, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
diff --git a/libc/nxglib/lib_nxglib_trapoffset.c b/libnx/nxglib/nxglib_trapoffset.c
similarity index 98%
rename from libc/nxglib/lib_nxglib_trapoffset.c
rename to libnx/nxglib/nxglib_trapoffset.c
index dd2e74f3653..b905af1a026 100644
--- a/libc/nxglib/lib_nxglib_trapoffset.c
+++ b/libnx/nxglib/nxglib_trapoffset.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * libc/nxglib/lib_nxglib_trapoffset.c
+ * libnx/nxglib/nxglib_trapoffset.c
*
* Copyright (C) 2008-2009, 2011, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
diff --git a/libc/nxglib/lib_nxglib_vectoradd.c b/libnx/nxglib/nxglib_vectoradd.c
similarity index 98%
rename from libc/nxglib/lib_nxglib_vectoradd.c
rename to libnx/nxglib/nxglib_vectoradd.c
index 50e8cfae4c6..3b929ddd4a4 100644
--- a/libc/nxglib/lib_nxglib_vectoradd.c
+++ b/libnx/nxglib/nxglib_vectoradd.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * libc/nxglib/lib_nxsglib_vectoradd.c
+ * libnx/nxglib/nxglib_vectoradd.c
*
* Copyright (C) 2008-2011, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
diff --git a/libc/nxglib/lib_nxglib_vectsubtract.c b/libnx/nxglib/nxglib_vectsubtract.c
similarity index 98%
rename from libc/nxglib/lib_nxglib_vectsubtract.c
rename to libnx/nxglib/nxglib_vectsubtract.c
index 2780157d959..380a5dd3529 100644
--- a/libc/nxglib/lib_nxglib_vectsubtract.c
+++ b/libnx/nxglib/nxglib_vectsubtract.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * libc/nxglib/lib_nxglib_vectorsubtract.c
+ * libnx/nxglib/nxglib_vectorsubtract.c
*
* Copyright (C) 2008-2011, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
diff --git a/libc/nxglib/lib_nxglib_yuv2rgb.c b/libnx/nxglib/nxglib_yuv2rgb.c
similarity index 99%
rename from libc/nxglib/lib_nxglib_yuv2rgb.c
rename to libnx/nxglib/nxglib_yuv2rgb.c
index 0732d173e8d..ff55182cb2b 100644
--- a/libc/nxglib/lib_nxglib_yuv2rgb.c
+++ b/libnx/nxglib/nxglib_yuv2rgb.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * libc/nxglib/lib_nxglib_yuv2rgb.c
+ * libnx/nxglib/nxglib_yuv2rgb.c
*
* Copyright (C) 2008-2009, 2011, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
diff --git a/libc/nxmu/Make.defs b/libnx/nxmu/Make.defs
similarity index 78%
rename from libc/nxmu/Make.defs
rename to libnx/nxmu/Make.defs
index 376d0845d81..2b316e772b2 100644
--- a/libc/nxmu/Make.defs
+++ b/libnx/nxmu/Make.defs
@@ -1,5 +1,5 @@
############################################################################
-# libc/nxmu/Make.defs
+# libnx/nxmu/Make.defs
#
# Copyright (C) 2013 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt
@@ -40,15 +40,15 @@
ifeq ($(CONFIG_NX),y)
ifeq ($(CONFIG_NX_MULTIUSER),y)
-CSRCS += lib_nxmu_sendserver.c lib_nx_connect.c lib_nx_disconnect.c
-CSRCS += lib_nxmu_semtake.c lib_nx_block.c
-CSRCS += lib_nx_kbdchin.c lib_nx_kbdin.c lib_nx_mousein.c
-CSRCS += lib_nx_releasebkgd.c lib_nx_requestbkgd.c lib_nx_setbgcolor.c
+CSRCS += nxmu_sendserver.c nx_connect.c nx_disconnect.c
+CSRCS += nxmu_semtake.c nx_block.c
+CSRCS += nx_kbdchin.c nx_kbdin.c nx_mousein.c
+CSRCS += nx_releasebkgd.c nx_requestbkgd.c nx_setbgcolor.c
-CSRCS += lib_nxmu_sendwindow.c lib_nx_closewindow.c lib_nxmu_constructwindow.c
-CSRCS += lib_nx_bitmap.c lib_nx_fill.c lib_nx_filltrapezoid.c lib_nx_getposition.c
-CSRCS += lib_nx_getrectangle.c lib_nx_lower.c lib_nx_move.c lib_nx_openwindow.c
-CSRCS += lib_nx_raise.c lib_nx_setpixel.c lib_nx_setposition.c lib_nx_setsize.c
+CSRCS += nxmu_sendwindow.c nx_closewindow.c nxmu_constructwindow.c
+CSRCS += nx_bitmap.c nx_fill.c nx_filltrapezoid.c nx_getposition.c
+CSRCS += nx_getrectangle.c nx_lower.c nx_move.c nx_openwindow.c
+CSRCS += nx_raise.c nx_setpixel.c nx_setposition.c nx_setsize.c
# Add the nxmu/ directory to the build
diff --git a/libc/nxmu/lib_nx_bitmap.c b/libnx/nxmu/nx_bitmap.c
similarity index 99%
rename from libc/nxmu/lib_nx_bitmap.c
rename to libnx/nxmu/nx_bitmap.c
index 56486d1be66..8969f3e1105 100644
--- a/libc/nxmu/lib_nx_bitmap.c
+++ b/libnx/nxmu/nx_bitmap.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * libc/nxmu/lib_nx_bitmap.c
+ * libnx/nxmu/nx_bitmap.c
*
* Copyright (C) 2008-2009, 2011-2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
diff --git a/libc/nxmu/lib_nx_block.c b/libnx/nxmu/nx_block.c
similarity index 99%
rename from libc/nxmu/lib_nx_block.c
rename to libnx/nxmu/nx_block.c
index 7468ac6eb3d..56b66f23a9f 100644
--- a/libc/nxmu/lib_nx_block.c
+++ b/libnx/nxmu/nx_block.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * libc/lib/lib_nx_block.c
+ * libnx/nxmu/nx_block.c
*
* Copyright (C) 2012-2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
diff --git a/libc/nxmu/lib_nx_closewindow.c b/libnx/nxmu/nx_closewindow.c
similarity index 99%
rename from libc/nxmu/lib_nx_closewindow.c
rename to libnx/nxmu/nx_closewindow.c
index f38d20922e9..0ac19095837 100644
--- a/libc/nxmu/lib_nx_closewindow.c
+++ b/libnx/nxmu/nx_closewindow.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * libc/lib/lib_nx_closewindow.c
+ * libnx/nxmu/nx_closewindow.c
*
* Copyright (C) 2008-2009, 2011-2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
diff --git a/libc/nxmu/lib_nx_connect.c b/libnx/nxmu/nx_connect.c
similarity index 99%
rename from libc/nxmu/lib_nx_connect.c
rename to libnx/nxmu/nx_connect.c
index 39ed851f64e..7a9241f3be4 100644
--- a/libc/nxmu/lib_nx_connect.c
+++ b/libnx/nxmu/nx_connect.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * libc/lib/lib_nx_connect.c
+ * libnx/nxmu/nx_connect.c
*
* Copyright (C) 2008-2009, 2011-2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
@@ -50,7 +50,7 @@
#include
#include
-#include "lib_internal.h"
+#include "nxcontext.h"
/****************************************************************************
* Pre-Processor Definitions
diff --git a/libc/nxmu/lib_nx_disconnect.c b/libnx/nxmu/nx_disconnect.c
similarity index 99%
rename from libc/nxmu/lib_nx_disconnect.c
rename to libnx/nxmu/nx_disconnect.c
index 87d2f3b0c5c..323e414af70 100644
--- a/libc/nxmu/lib_nx_disconnect.c
+++ b/libnx/nxmu/nx_disconnect.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * libc/lib/lib_nx_disconnect.c
+ * libnx/nxmu/nx_disconnect.c
*
* Copyright (C) 2008-2009, 2011-2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
diff --git a/libc/nxmu/lib_nx_fill.c b/libnx/nxmu/nx_fill.c
similarity index 99%
rename from libc/nxmu/lib_nx_fill.c
rename to libnx/nxmu/nx_fill.c
index 9246bfe38a5..263431b064a 100644
--- a/libc/nxmu/lib_nx_fill.c
+++ b/libnx/nxmu/nx_fill.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * libc/nxmu/lib_nx_fill.c
+ * libnx/nxmu/nx_fill.c
*
* Copyright (C) 2008-2009, 2011-2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
diff --git a/libc/nxmu/lib_nx_filltrapezoid.c b/libnx/nxmu/nx_filltrapezoid.c
similarity index 99%
rename from libc/nxmu/lib_nx_filltrapezoid.c
rename to libnx/nxmu/nx_filltrapezoid.c
index 445891629d3..374d86614ed 100644
--- a/libc/nxmu/lib_nx_filltrapezoid.c
+++ b/libnx/nxmu/nx_filltrapezoid.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * libc/nxmu/lib_nx_filltrapezoid.c
+ * libnx/nxmu/nx_filltrapezoid.c
*
* Copyright (C) 2008-2009, 2011-2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
diff --git a/libc/nxmu/lib_nx_getposition.c b/libnx/nxmu/nx_getposition.c
similarity index 99%
rename from libc/nxmu/lib_nx_getposition.c
rename to libnx/nxmu/nx_getposition.c
index 0f901df0832..19fee248ff9 100644
--- a/libc/nxmu/lib_nx_getposition.c
+++ b/libnx/nxmu/nx_getposition.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * libc/nxmu/lib_nx_getposition.c
+ * libnx/nxmu/nx_getposition.c
*
* Copyright (C) 2008-2009, 2011-2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
diff --git a/libc/nxmu/lib_nx_getrectangle.c b/libnx/nxmu/nx_getrectangle.c
similarity index 99%
rename from libc/nxmu/lib_nx_getrectangle.c
rename to libnx/nxmu/nx_getrectangle.c
index 757b1c55b09..2adc719a7c1 100644
--- a/libc/nxmu/lib_nx_getrectangle.c
+++ b/libnx/nxmu/nx_getrectangle.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * libc/nxmu/lib_nx_getrectangle.c
+ * libnx/nxmu/nx_getrectangle.c
*
* Copyright (C) 2011-2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
diff --git a/libc/nxmu/lib_nx_kbdchin.c b/libnx/nxmu/nx_kbdchin.c
similarity index 99%
rename from libc/nxmu/lib_nx_kbdchin.c
rename to libnx/nxmu/nx_kbdchin.c
index 20d99c4b6c4..c94f6fd973a 100644
--- a/libc/nxmu/lib_nx_kbdchin.c
+++ b/libnx/nxmu/nx_kbdchin.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * libc/lib/lib_nx_kbdchin.c
+ * libnx/nxmu/nx_kbdchin.c
*
* Copyright (C) 2008-2009, 2011-2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
diff --git a/libc/nxmu/lib_nx_kbdin.c b/libnx/nxmu/nx_kbdin.c
similarity index 98%
rename from libc/nxmu/lib_nx_kbdin.c
rename to libnx/nxmu/nx_kbdin.c
index f8d266d981d..610792c5851 100644
--- a/libc/nxmu/lib_nx_kbdin.c
+++ b/libnx/nxmu/nx_kbdin.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * libc/lib/lib_nx_kbdin.c
+ * libnx/nxmu/nx_kbdin.c
*
* Copyright (C) 2008-2009, 2011-2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
@@ -45,7 +45,7 @@
#include
#include
-#include "lib_internal.h"
+#include "nxcontext.h"
#ifdef CONFIG_NX_KBD
diff --git a/libc/nxmu/lib_nx_lower.c b/libnx/nxmu/nx_lower.c
similarity index 99%
rename from libc/nxmu/lib_nx_lower.c
rename to libnx/nxmu/nx_lower.c
index 59c80087e93..347089cb074 100644
--- a/libc/nxmu/lib_nx_lower.c
+++ b/libnx/nxmu/nx_lower.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * libc/nxmu/lib_nx_lower.c
+ * libnx/nxmu/nx_lower.c
*
* Copyright (C) 2008-2009, 2011-2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
diff --git a/libc/nxmu/lib_nx_mousein.c b/libnx/nxmu/nx_mousein.c
similarity index 99%
rename from libc/nxmu/lib_nx_mousein.c
rename to libnx/nxmu/nx_mousein.c
index bff937daaa1..19ceb9cc244 100644
--- a/libc/nxmu/lib_nx_mousein.c
+++ b/libnx/nxmu/nx_mousein.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * libc/lib/lib_nx_mousein.c
+ * libnx/nxmu/nx_mousein.c
*
* Copyright (C) 2008-2009, 2011-2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
diff --git a/libc/nxmu/lib_nx_move.c b/libnx/nxmu/nx_move.c
similarity index 99%
rename from libc/nxmu/lib_nx_move.c
rename to libnx/nxmu/nx_move.c
index 2adc78ea34c..19d36703ecd 100644
--- a/libc/nxmu/lib_nx_move.c
+++ b/libnx/nxmu/nx_move.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * libc/nxmu/lib_nx_move.c
+ * libnx/nxmu/nx_move.c
*
* Copyright (C) 2008-2009, 2012-2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
diff --git a/libc/nxmu/lib_nx_openwindow.c b/libnx/nxmu/nx_openwindow.c
similarity index 98%
rename from libc/nxmu/lib_nx_openwindow.c
rename to libnx/nxmu/nx_openwindow.c
index 5b7c10c5560..c26a3808742 100644
--- a/libc/nxmu/lib_nx_openwindow.c
+++ b/libnx/nxmu/nx_openwindow.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * libc/nxmu/lib_nx_openwindow.c
+ * libnx/nxmu/nx_openwindow.c
*
* Copyright (C) 2008-2009, 2011-2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
@@ -46,7 +46,7 @@
#include
#include
-#include "lib_internal.h"
+#include "nxcontext.h"
/****************************************************************************
* Pre-Processor Definitions
diff --git a/libc/nxmu/lib_nx_raise.c b/libnx/nxmu/nx_raise.c
similarity index 99%
rename from libc/nxmu/lib_nx_raise.c
rename to libnx/nxmu/nx_raise.c
index 586b11c2417..9917d2748a0 100644
--- a/libc/nxmu/lib_nx_raise.c
+++ b/libnx/nxmu/nx_raise.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * libc/nxmu/lib_nx_raise.c
+ * libnx/nxmu/nx_raise.c
*
* Copyright (C) 2008-2009, 2011-2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
diff --git a/libc/nxmu/lib_nx_releasebkgd.c b/libnx/nxmu/nx_releasebkgd.c
similarity index 99%
rename from libc/nxmu/lib_nx_releasebkgd.c
rename to libnx/nxmu/nx_releasebkgd.c
index 2d2987eae48..3bad1b265da 100644
--- a/libc/nxmu/lib_nx_releasebkgd.c
+++ b/libnx/nxmu/nx_releasebkgd.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * libc/lib/lib_nx_releasebkgd.c
+ * libnx/nxmu/nx_releasebkgd.c
*
* Copyright (C) 2008-2009, 2011-2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
diff --git a/libc/nxmu/lib_nx_requestbkgd.c b/libnx/nxmu/nx_requestbkgd.c
similarity index 99%
rename from libc/nxmu/lib_nx_requestbkgd.c
rename to libnx/nxmu/nx_requestbkgd.c
index d61f3f9ad41..20f217d0849 100644
--- a/libc/nxmu/lib_nx_requestbkgd.c
+++ b/libnx/nxmu/nx_requestbkgd.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * libc/lib/lib_nx_requestbkgd.c
+ * libnx/nxmu/nx_requestbkgd.c
*
* Copyright (C) 2008-2009, 2011-2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
diff --git a/libc/nxmu/lib_nx_setbgcolor.c b/libnx/nxmu/nx_setbgcolor.c
similarity index 99%
rename from libc/nxmu/lib_nx_setbgcolor.c
rename to libnx/nxmu/nx_setbgcolor.c
index d8f0803d6cb..ac3afe48a29 100644
--- a/libc/nxmu/lib_nx_setbgcolor.c
+++ b/libnx/nxmu/nx_setbgcolor.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * libc/lib/lib_nx_setbgcolor.c
+ * libnx/nxmu/nx_setbgcolor.c
*
* Copyright (C) 2008-2009, 2011-2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
diff --git a/libc/nxmu/lib_nx_setpixel.c b/libnx/nxmu/nx_setpixel.c
similarity index 99%
rename from libc/nxmu/lib_nx_setpixel.c
rename to libnx/nxmu/nx_setpixel.c
index 107b0f20f1d..fef16c05357 100644
--- a/libc/nxmu/lib_nx_setpixel.c
+++ b/libnx/nxmu/nx_setpixel.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * libc/nxmu/lib_nx_setpixel.c
+ * libnx/nxmu/nx_setpixel.c
*
* Copyright (C) 2011-2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
diff --git a/libc/nxmu/lib_nx_setposition.c b/libnx/nxmu/nx_setposition.c
similarity index 99%
rename from libc/nxmu/lib_nx_setposition.c
rename to libnx/nxmu/nx_setposition.c
index 4e5bd9387c1..10568595a6c 100644
--- a/libc/nxmu/lib_nx_setposition.c
+++ b/libnx/nxmu/nx_setposition.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * libc/nxmu/lib_nx_setposition.c
+ * libnx/nxmu/nx_setposition.c
*
* Copyright (C) 2008-2009, 2011-2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
diff --git a/libc/nxmu/lib_nx_setsize.c b/libnx/nxmu/nx_setsize.c
similarity index 99%
rename from libc/nxmu/lib_nx_setsize.c
rename to libnx/nxmu/nx_setsize.c
index cb5e99dc7d7..948ace43077 100644
--- a/libc/nxmu/lib_nx_setsize.c
+++ b/libnx/nxmu/nx_setsize.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * libc/nxmu/lib_nx_setsize.c
+ * libnx/nxmu/nx_setsize.c
*
* Copyright (C) 2008-2009, 2011-2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
diff --git a/libc/nxmu/lib_nxmu_constructwindow.c b/libnx/nxmu/nxmu_constructwindow.c
similarity index 98%
rename from libc/nxmu/lib_nxmu_constructwindow.c
rename to libnx/nxmu/nxmu_constructwindow.c
index 70d951b4e49..e677c9eaa8d 100644
--- a/libc/nxmu/lib_nxmu_constructwindow.c
+++ b/libnx/nxmu/nxmu_constructwindow.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * libc/lib/lib_nx_openwindow.c
+ * libnx/nxmu/nx_openwindow.c
*
* Copyright (C) 2008, 2011-2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
@@ -47,7 +47,7 @@
#include
#include
-#include "lib_internal.h"
+#include "nxcontext.h"
/****************************************************************************
* Pre-Processor Definitions
diff --git a/libc/nxmu/lib_nxmu_semtake.c b/libnx/nxmu/nxmu_semtake.c
similarity index 99%
rename from libc/nxmu/lib_nxmu_semtake.c
rename to libnx/nxmu/nxmu_semtake.c
index 2d5ad181dab..9753e6e3b2e 100644
--- a/libc/nxmu/lib_nxmu_semtake.c
+++ b/libnx/nxmu/nxmu_semtake.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * graphics/nxmu/nxmu_semtake.c
+ * libnx/nxmu/nxmu_semtake.c
*
* Copyright (C) 2008-2009, 2011, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
diff --git a/libc/nxmu/lib_nxmu_sendserver.c b/libnx/nxmu/nxmu_sendserver.c
similarity index 99%
rename from libc/nxmu/lib_nxmu_sendserver.c
rename to libnx/nxmu/nxmu_sendserver.c
index 2a089aae21f..0281903980d 100644
--- a/libc/nxmu/lib_nxmu_sendserver.c
+++ b/libnx/nxmu/nxmu_sendserver.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * libc/nxmu/lib_nxmu_sendserver.c
+ * libnx/nxmu/nxmu_sendserver.c
*
* Copyright (C) 2012-2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
diff --git a/libc/nxmu/lib_nxmu_sendwindow.c b/libnx/nxmu/nxmu_sendwindow.c
similarity index 99%
rename from libc/nxmu/lib_nxmu_sendwindow.c
rename to libnx/nxmu/nxmu_sendwindow.c
index b841bcf2c80..71909e08921 100644
--- a/libc/nxmu/lib_nxmu_sendwindow.c
+++ b/libnx/nxmu/nxmu_sendwindow.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * libc/nxmu/lib_nxmu_sendserver.c
+ * libnx/nxmu/nxmu_sendserver.c
*
* Copyright (C) 2012-2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
diff --git a/libnx/ubin/.gitignore b/libnx/ubin/.gitignore
new file mode 100644
index 00000000000..4e358a8c57c
--- /dev/null
+++ b/libnx/ubin/.gitignore
@@ -0,0 +1,8 @@
+/*.asm
+/*.obj
+/*.rel
+/*.lst
+/*.sym
+/*.adb
+/*.lib
+/*.src
diff --git a/libnx/ubin/Makefile b/libnx/ubin/Makefile
new file mode 100644
index 00000000000..7cd2c3319cd
--- /dev/null
+++ b/libnx/ubin/Makefile
@@ -0,0 +1,48 @@
+############################################################################
+# libnx/ubin/Makefile
+#
+# Copyright (C) 2013 Gregory Nutt. All rights reserved.
+# Author: Gregory Nutt
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# 3. Neither the name NuttX nor the names of its contributors may be
+# used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+###########################################################################
+
+-include $(TOPDIR)/Make.defs
+
+all:
+.PHONY: clean distclean
+
+# Clean Targets:
+
+clean:
+ $(call CLEAN)
+
+# Deep clean -- removes all traces of the configuration
+
+distclean: clean