summaryrefslogtreecommitdiff
path: root/nuttx/lib
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/lib')
-rw-r--r--nuttx/lib/Makefile27
-rw-r--r--nuttx/lib/libgen/Make.defs37
-rw-r--r--nuttx/lib/libgen/lib_basename.c (renamed from nuttx/lib/lib_basename.c)4
-rw-r--r--nuttx/lib/libgen/lib_dirname.c (renamed from nuttx/lib/lib_dirname.c)4
-rw-r--r--nuttx/lib/misc/Make.defs47
-rwxr-xr-xnuttx/lib/misc/lib_crc32.c (renamed from nuttx/lib/lib_crc32.c)4
-rw-r--r--nuttx/lib/misc/lib_dbg.c (renamed from nuttx/lib/lib_dbg.c)4
-rw-r--r--nuttx/lib/misc/lib_dumpbuffer.c (renamed from nuttx/lib/lib_dumpbuffer.c)4
-rw-r--r--nuttx/lib/misc/lib_match.c (renamed from nuttx/lib/lib_match.c)2
9 files changed, 104 insertions, 29 deletions
diff --git a/nuttx/lib/Makefile b/nuttx/lib/Makefile
index e33e9ddde..76bd1b74b 100644
--- a/nuttx/lib/Makefile
+++ b/nuttx/lib/Makefile
@@ -41,27 +41,16 @@ include string/Make.defs
include math/Make.defs
include net/Make.defs
include time/Make.defs
+include libgen/Make.defs
include queue/Make.defs
+include misc/Make.defs
ASRCS =
AOBJS = $(ASRCS:.S=$(OBJEXT))
-MISC_SRCS = lib_init.c lib_filesem.c
-ifneq ($(CONFIG_NFILE_STREAMS),0)
-MISC_SRCS += lib_streamsem.c
-endif
-
-LIBGEN_SRCS = lib_basename.c lib_dirname.c
-
-REGEX_SRCS = lib_match.c
-
-CRC_SRCS = lib_crc32.c
-
-DBG_SRCS = lib_dbg.c lib_dumpbuffer.c
-
-CSRCS = $(MISC_SRCS) $(CTYPE_SRCS) $(STDIO_SRCS) $(STDLIB_SRCS) $(UNISTD_SRCS) \
- $(STRING_SRCS) $(MATH_SRCS) $(NET_SRCS) $(TIME_SRCS) $(LIBGEN_SRCS) \
- $(REGEX_SRCS) $(CRC_SRCS) $(QUEUE_SRCS) $(DBG_SRCS)
+CSRCS = $(STDIO_SRCS) $(STDLIB_SRCS) $(UNISTD_SRCS) $(STRING_SRCS) \
+ $(MATH_SRCS) $(NET_SRCS) $(TIME_SRCS) $(LIBGEN_SRCS) \
+ $(QUEUE_SRCS) $(MISC_SRCS) $(REGEX_SRCS) $(CRC_SRCS) $(DBG_SRCS)
COBJS = $(CSRCS:.c=$(OBJEXT))
SRCS = $(ASRCS) $(CSRCS)
@@ -75,8 +64,10 @@ STRINGDEPPATH = --dep-path string
MATHDEPPATH = --dep-path math
NETDEPPATH = --dep-path net
TIMEDEPPATH = --dep-path time
+LIBGENDEPPATH = --dep-path libgen
QUEUEDEPPATH = --dep-path queue
-VPATH = stdio:stdlib:unistd:string:math:net:time:queue
+MISCDEPPATH = --dep-path misc
+VPATH = stdio:stdlib:unistd:string:math:net:time:libgen:queue:misc
BIN = liblib$(LIBEXT)
@@ -96,7 +87,7 @@ $(BIN): $(OBJS)
.depend: Makefile $(SRCS)
@$(MKDEP) $(ROOTDEPPATH) $(STDIODEPPATH) $(STDLIBDEPPATH) \
$(UNISTDDEPPATH) $(STRINGDEPPATH) $(MATHDEPPATH) $(NETDEPPATH) \
- $(TIMEDEPPATH) $(QUEUEDEPPATH) \
+ $(TIMEDEPPATH) $(LIBGENDEPPATH) $(QUEUEDEPPATH) $(MISCDEPPATH) \
$(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
@touch $@
diff --git a/nuttx/lib/libgen/Make.defs b/nuttx/lib/libgen/Make.defs
new file mode 100644
index 000000000..93214eadb
--- /dev/null
+++ b/nuttx/lib/libgen/Make.defs
@@ -0,0 +1,37 @@
+############################################################################
+# lib/libgen/Make.defs
+#
+# Copyright (C) 2011 Gregory Nutt. All rights reserved.
+# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+#
+# 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.
+#
+############################################################################
+
+LIBGEN_SRCS = lib_basename.c lib_dirname.c
+
diff --git a/nuttx/lib/lib_basename.c b/nuttx/lib/libgen/lib_basename.c
index 5bb711829..5741d976a 100644
--- a/nuttx/lib/lib_basename.c
+++ b/nuttx/lib/libgen/lib_basename.c
@@ -1,7 +1,7 @@
/****************************************************************************
- * lib/unistd/lib_basename.c
+ * lib/libgen/lib_basename.c
*
- * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
diff --git a/nuttx/lib/lib_dirname.c b/nuttx/lib/libgen/lib_dirname.c
index 7ed6c04c6..c416d8aca 100644
--- a/nuttx/lib/lib_dirname.c
+++ b/nuttx/lib/libgen/lib_dirname.c
@@ -1,7 +1,7 @@
/****************************************************************************
- * lib/unistd/lib_dirname.c
+ * lib/libgen/lib_dirname.c
*
- * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
diff --git a/nuttx/lib/misc/Make.defs b/nuttx/lib/misc/Make.defs
new file mode 100644
index 000000000..680180a95
--- /dev/null
+++ b/nuttx/lib/misc/Make.defs
@@ -0,0 +1,47 @@
+############################################################################
+# lib/misc/Make.defs
+#
+# Copyright (C) 2011 Gregory Nutt. All rights reserved.
+# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+#
+# 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.
+#
+############################################################################
+
+MISC_SRCS = lib_init.c lib_filesem.c
+ifneq ($(CONFIG_NFILE_STREAMS),0)
+MISC_SRCS += lib_streamsem.c
+endif
+
+REGEX_SRCS = lib_match.c
+
+CRC_SRCS = lib_crc32.c
+
+DBG_SRCS = lib_dbg.c lib_dumpbuffer.c
+
+
diff --git a/nuttx/lib/lib_crc32.c b/nuttx/lib/misc/lib_crc32.c
index 77c34558d..f851598e0 100755
--- a/nuttx/lib/lib_crc32.c
+++ b/nuttx/lib/misc/lib_crc32.c
@@ -1,9 +1,9 @@
/************************************************************************************************
- * lib/unistd/lib_crc32.c
+ * lib/misc/lib_crc32.c
*
* This file is a part of NuttX:
*
- * Copyright (C) 2010 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2010-2011 Gregory Nutt. All rights reserved.
*
* The logic in this file was developed by Gary S. Brown:
*
diff --git a/nuttx/lib/lib_dbg.c b/nuttx/lib/misc/lib_dbg.c
index 43feea8b1..e4b1071cd 100644
--- a/nuttx/lib/lib_dbg.c
+++ b/nuttx/lib/misc/lib_dbg.c
@@ -1,7 +1,7 @@
/****************************************************************************
- * lib/unistd/lib_dbg.c
+ * lib/misc/lib_dbg.c
*
- * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
diff --git a/nuttx/lib/lib_dumpbuffer.c b/nuttx/lib/misc/lib_dumpbuffer.c
index f3e1b5b2b..1f1f54e8d 100644
--- a/nuttx/lib/lib_dumpbuffer.c
+++ b/nuttx/lib/misc/lib_dumpbuffer.c
@@ -1,7 +1,7 @@
/****************************************************************************
- * lib/unistd/lib_dumpbuffer.c
+ * lib/misc/lib_dumpbuffer.c
*
- * Copyright (C) 2009 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
diff --git a/nuttx/lib/lib_match.c b/nuttx/lib/misc/lib_match.c
index e76e8b4ca..18e0632ec 100644
--- a/nuttx/lib/lib_match.c
+++ b/nuttx/lib/misc/lib_match.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * match.c - simple shell-style filename matcher
+ * lib/misc/lib_match.c - simple shell-style filename matcher
*
* Simple shell-style filename pattern matcher written by Jef Poskanzer
* This pattern matcher only handles '?', '*' and '**', and multiple