build: Remove 'u' prefix from userspace library

so user needn't link the different library because the build type change

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2020-05-02 03:23:04 +08:00 committed by patacongo
parent 673640b313
commit f2aba8d9b7
26 changed files with 93 additions and 316 deletions

View File

@ -1358,7 +1358,7 @@ include/
<p>
Normally the logic in this file builds to a single library (<code>libc.a</code>).
However, if NuttX is built as a separately compiled kernel (with <code>CONFIG_BUILD_PROTECTED=y</code> or <code>CONFIG_BUILD_KERNEL=y</code>), then the contents of this directory are built as two libraries:
One for use by user programs (<code>libuc.a</code>) and one for use only within the &lt;kernel&gt; space (<code>libkc.a</code>).
One for use by user programs (<code>libc.a</code>) and one for use only within the &lt;kernel&gt; space (<code>libkc.a</code>).
</p>
<p>
These user/kernel space libraries (along with the sycalls of <a href="#DirStructSyscall"><code>nuttx/syscall</code></a>) are needed to support the two differing protection domains.

View File

@ -107,7 +107,6 @@ USRCS = $(UASRCS) $(UCSRCS)
UOBJS = $(UAOBJS) $(UCOBJS)
KBIN = libkarch$(LIBEXT)
UBIN = libuarch$(LIBEXT)
BIN = libarch$(LIBEXT)
LDFLAGS += $(ARCHSCRIPT)
@ -173,11 +172,16 @@ $(AOBJS) $(UAOBJS) $(HEAD_OBJ): %$(OBJEXT): %.S
$(COBJS) $(UCOBJS): %$(OBJEXT): %.c
$(call COMPILE, $<, $@)
$(BIN) $(KBIN): $(OBJS)
ifeq ($(CONFIG_BUILD_FLAT),y)
$(BIN): $(OBJS)
$(call ARCHIVE, $@, $(OBJS))
$(UBIN): $(UOBJS)
else
$(BIN): $(UOBJS)
$(call ARCHIVE, $@, $(UOBJS))
endif
$(KBIN): $(OBJS)
$(call ARCHIVE, $@, $(OBJS))
board$(DELIM)libboard$(LIBEXT):
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" libboard$(LIBEXT) EXTRAFLAGS="$(EXTRAFLAGS)"
@ -224,7 +228,6 @@ ifeq ($(BOARDMAKE),y)
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" clean
endif
$(call DELFILE, $(KBIN))
$(call DELFILE, $(UBIN))
$(call DELFILE, $(BIN))
$(call CLEAN)

View File

@ -98,7 +98,6 @@ USRCS = $(UASRCS) $(UCSRCS)
UOBJS = $(UAOBJS) $(UCOBJS)
KBIN = libkarch$(LIBEXT)
UBIN = libuarch$(LIBEXT)
BIN = libarch$(LIBEXT)
LDFLAGS += $(ARCHSCRIPT)
@ -166,11 +165,16 @@ $(AOBJS) $(UAOBJS) $(HEAD_OBJ): %$(OBJEXT): %.S
$(COBJS) $(UCOBJS): %$(OBJEXT): %.c
$(call COMPILE, $<, $@)
$(BIN) $(KBIN): $(OBJS)
ifeq ($(CONFIG_BUILD_FLAT),y)
$(BIN): $(OBJS)
$(call ARCHIVE, $@, $(OBJS))
$(UBIN): $(UOBJS)
else
$(BIN): $(UOBJS)
$(call ARCHIVE, $@, $(UOBJS))
endif
$(KBIN): $(OBJS)
$(call ARCHIVE, $@, $(OBJS))
board$(DELIM)libboard$(LIBEXT):
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" libboard$(LIBEXT) EXTRAFLAGS="$(EXTRAFLAGS)"
@ -217,7 +221,6 @@ ifeq ($(BOARDMAKE),y)
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" clean
endif
$(call DELFILE, $(KBIN))
$(call DELFILE, $(UBIN))
$(call DELFILE, $(BIN))
$(call CLEAN)

View File

@ -104,7 +104,6 @@ USRCS = $(UASRCS) $(UCSRCS)
UOBJS = $(UAOBJS) $(UCOBJS)
KBIN = libkarch$(LIBEXT)
UBIN = libuarch$(LIBEXT)
BIN = libarch$(LIBEXT)
LDFLAGS += $(ARCHSCRIPT)
@ -165,12 +164,16 @@ $(AOBJS) $(UAOBJS) $(HEAD_OBJ): %$(OBJEXT): %.S
$(COBJS) $(UCOBJS): %$(OBJEXT): %.c
$(call COMPILE, $<, $@)
$(BIN) $(KBIN): $(OBJS)
ifeq ($(CONFIG_BUILD_FLAT),y)
$(BIN): $(OBJS)
$(call ARCHIVE, $@, $(OBJS))
@$(MAKE) depend
$(UBIN): $(UOBJS)
else
$(BIN): $(UOBJS)
$(call ARCHIVE, $@, $(UOBJS))
endif
$(KBIN): $(OBJS)
$(call ARCHIVE, $@, $(OBJS))
board/libboard$(LIBEXT):
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" libboard$(LIBEXT) EXTRAFLAGS="$(EXTRAFLAGS)"
@ -217,7 +220,6 @@ ifeq ($(BOARDMAKE),y)
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" clean
endif
$(call DELFILE, $(KBIN))
$(call DELFILE, $(UBIN))
$(call DELFILE, $(BIN))
$(call DELFILE, $(HEAD_OBJ))
$(call CLEAN)

View File

@ -64,7 +64,6 @@ SRCS = $(ASRCS) $(CSRCS)
OBJS = $(AOBJS) $(COBJS)
KBIN = libkarch$(LIBEXT)
UBIN = libuarch$(LIBEXT)
BIN = libarch$(LIBEXT)
# Override in Make.defs if linker is not 'ld'
@ -126,11 +125,16 @@ $(AOBJS): %$(OBJEXT): %.S
$(COBJS): %$(OBJEXT): %.c
$(call COMPILE, $<, $@)
$(BIN) $(KBIN): $(OBJS)
ifeq ($(CONFIG_BUILD_FLAT),y)
$(BIN): $(OBJS)
$(call ARCHIVE, $@, $(OBJS))
$(UBIN): $(UOBJS)
else
$(BIN): $(UOBJS)
$(call ARCHIVE, $@, $(UOBJS))
endif
$(KBIN): $(OBJS)
$(call ARCHIVE, $@, $(OBJS))
board/libboard$(LIBEXT):
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" libboard$(LIBEXT) EXTRAFLAGS="$(EXTRAFLAGS)"

View File

@ -54,7 +54,7 @@
*
* This is only important when compiling libraries (libc or libnx) that are
* used both by the OS (libkc.a and libknx.a) or by the applications
* (libuc.a and libunx.a). In that case, the correct interface must be
* (libc.a and libnx.a). In that case, the correct interface must be
* used for the build context.
*
* REVISIT: In the flat build, the same functions must be used both by

View File

@ -65,7 +65,7 @@
*
* This is only important when compiling libraries (libc or libnx) that are
* used both by the OS (libkc.a and libknx.a) or by the applications
* (libuc.a and libunx.a). In that case, the correct interface must be
* (libc.a and libnx.a). In that case, the correct interface must be
* used for the build context.
*
* REVISIT: In the flat build, the same functions must be used both by
@ -179,7 +179,7 @@ struct task_group_s; /* Forward reference */
*
****************************************************************************/
int nxmq_send(mqd_t mqdes, FAR const char *msg, size_t msglen,\
int nxmq_send(mqd_t mqdes, FAR const char *msg, size_t msglen,
unsigned int prio);
/****************************************************************************

View File

@ -51,7 +51,7 @@
*
* This is only important when compiling libraries (libc or libnx) that are
* used both by the OS (libkc.a and libknx.a) or by the applications
* (libuc.a and libunx.a). In that case, the correct interface must be
* (libc.a and libnx.a). In that case, the correct interface must be
* used for the build context.
*
* REVISIT: In the flat build, the same functions must be used both by

View File

@ -141,7 +141,7 @@
*
* This is only important when compiling libraries (libc or libnx) that are
* used both by the OS (libkc.a and libknx.a) or by the applications
* (libuc.a and libunx.a). In that case, the correct interface must be
* (libc.a and libnx.a). In that case, the correct interface must be
* used for the build context.
*
* REVISIT: In the flat build, the same functions must be used both by

View File

@ -50,7 +50,7 @@
*
* This is only important when compiling libraries (libc or libnx) that are
* used both by the OS (libkc.a and libknx.a) or by the applications
* (libuc.a and libunx.a). In that case, the correct interface must be
* (libc.a and libnx.a). In that case, the correct interface must be
* used for the build context.
*
* REVISIT: In the flat build, the same functions must be used both by

View File

@ -66,7 +66,7 @@ struct sigwork_s
*
* This is only important when compiling libraries (libc or libnx) that are
* used both by the OS (libkc.a and libknx.a) or by the applications
* (libuc.a and libunx.a). In that case, the correct interface must be
* (libc.a and libnx.a). In that case, the correct interface must be
* used for the build context.
*
* REVISIT: In the flat build, the same functions must be used both by

View File

@ -1,5 +1,4 @@
/Make_bin.dep
/Make_ubin.dep
/Make_kbin.dep
/exec_symtab.c
/modlib_symtab.c

View File

@ -143,7 +143,6 @@ COBJS = $(patsubst %.c, $(BINDIR)$(DELIM)%$(OBJEXT), $(CSRCS))
SRCS = $(ASRCS) $(CSRCS)
OBJS = $(AOBJS) $(COBJS)
UBIN = libuc$(LIBEXT)
KBIN = libkc$(LIBEXT)
BIN ?= libc$(LIBEXT)
@ -156,7 +155,8 @@ $(AOBJS): $(BINDIR)$(DELIM)%$(OBJEXT): %.S
$(COBJS): $(BINDIR)$(DELIM)%$(OBJEXT): %.c
$(call COMPILE, $<, $@)
# C library for the flat build
# C library for the flat build and
# the user phase of the two-pass kernel build
$(BIN): $(OBJS)
$(call ARCHIVE, $@, $(OBJS))
@ -164,13 +164,6 @@ ifeq ($(CONFIG_LIB_ZONEINFO_ROMFS),y)
$(Q) $(MAKE) -C zoneinfo all TOPDIR=$(TOPDIR) BIN=$(BIN)
endif
# C library for the user phase of the two-pass kernel build
ifneq ($(BIN),$(UBIN))
$(UBIN):
$(Q) $(MAKE) $(UBIN) BIN=$(UBIN) BINDIR=ubin TOPDIR=$(TOPDIR) EXTRAFLAGS="$(EXTRAFLAGS)"
endif
# C library for the kernel phase of the two-pass kernel build
ifneq ($(BIN),$(KBIN))
@ -188,10 +181,8 @@ endif
# Dependencies
.depend: Makefile $(SRCS)
ifeq ($(CONFIG_BUILD_FLAT),y)
$(Q) $(MKDEP) --obj-path bin --obj-suffix $(OBJEXT) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >bin/Make.dep
else
$(Q) $(MKDEP) --obj-path ubin --obj-suffix $(OBJEXT) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >ubin/Make.dep
ifneq ($(CONFIG_BUILD_FLAT),y)
$(Q) $(MKDEP) --obj-path kbin --obj-suffix $(OBJEXT) $(DEPPATH) "$(CC)" -- $(CFLAGS) $(KDEFINE) -- $(SRCS) >kbin/Make.dep
endif
ifeq ($(CONFIG_LIB_ZONEINFO_ROMFS),y)
@ -205,11 +196,9 @@ depend: .depend
clean:
$(Q) $(MAKE) -C bin clean TOPDIR=$(TOPDIR)
$(Q) $(MAKE) -C ubin clean TOPDIR=$(TOPDIR)
$(Q) $(MAKE) -C kbin clean TOPDIR=$(TOPDIR)
$(Q) $(MAKE) -C zoneinfo clean TOPDIR=$(TOPDIR) BIN=$(BIN)
$(call DELFILE, $(BIN))
$(call DELFILE, $(UBIN))
$(call DELFILE, $(KBIN))
$(call CLEAN)
@ -217,15 +206,12 @@ clean:
distclean: clean
$(Q) $(MAKE) -C bin distclean TOPDIR=$(TOPDIR)
$(Q) $(MAKE) -C ubin distclean TOPDIR=$(TOPDIR)
$(Q) $(MAKE) -C kbin distclean TOPDIR=$(TOPDIR)
$(Q) $(MAKE) -C zoneinfo distclean TOPDIR=$(TOPDIR) BIN=$(BIN)
$(call DELFILE, exec_symtab.c)
$(call DELFILE, bin/Make.dep)
$(call DELFILE, ubin/Make.dep)
$(call DELFILE, kbin/Make.dep)
$(call DELFILE, .depend)
-include bin/Make.dep
-include ubin/Make.dep
-include kbin/Make.dep

View File

@ -1,8 +0,0 @@
/*.asm
/*.obj
/*.rel
/*.lst
/*.sym
/*.adb
/*.lib
/*.src

View File

@ -1,48 +0,0 @@
############################################################################
# libs/libc/ubin/Makefile
#
# Copyright (C) 2013 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# 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

View File

@ -1,5 +1,4 @@
/Make_bin.dep
/Make_ubin.dep
/Make_kbin.dep
/.depend
/*.lib

View File

@ -63,7 +63,6 @@ COBJS = $(patsubst %.c, $(BINDIR)$(DELIM)%$(OBJEXT), $(CSRCS))
SRCS = $(ASRCS) $(CSRCS)
OBJS = $(AOBJS) $(COBJS)
UBIN = libunx$(LIBEXT)
KBIN = libknx$(LIBEXT)
BIN ?= libnx$(LIBEXT)
@ -233,18 +232,12 @@ $(AOBJS): $(BINDIR)$(DELIM)%$(OBJEXT): %.S
$(COBJS): $(BINDIR)$(DELIM)%$(OBJEXT): %.c
$(call COMPILE, $<, $@)
# NX library for the flat build
# NX library for the flat build and
# the user phase of the two-pass kernel 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) EXTRAFLAGS="$(EXTRAFLAGS)"
endif
# NX library for the kernel phase of the two-pass kernel build
ifneq ($(BIN),$(KBIN))
@ -255,10 +248,8 @@ endif
# Dependencies
.depend: Makefile gensources $(SRCS)
ifeq ($(CONFIG_BUILD_FLAT),y)
$(Q) $(MKDEP) --obj-path bin --obj-suffix $(OBJEXT) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >bin/Make.dep
else
$(Q) $(MKDEP) --obj-path ubin --obj-suffix $(OBJEXT) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >ubin/Make.dep
ifneq ($(CONFIG_BUILD_FLAT),y)
$(Q) $(MKDEP) --obj-path kbin --obj-suffix $(OBJEXT) $(DEPPATH) "$(CC)" -- $(CFLAGS) $(KDEFINE) -- $(SRCS) >kbin/Make.dep
endif
$(Q) touch $@
@ -273,11 +264,9 @@ context: gensources
clean:
$(Q) $(MAKE) -C bin clean TOPDIR=$(TOPDIR)
$(Q) $(MAKE) -C ubin clean TOPDIR=$(TOPDIR)
$(Q) $(MAKE) -C kbin clean TOPDIR=$(TOPDIR)
$(Q) $(MAKE) -C nxfonts -f Makefile.sources clean TOPDIR=$(TOPDIR) EXTRAFLAGS="$(EXTRAFLAGS)"
$(call DELFILE, $(BIN))
$(call DELFILE, $(UBIN))
$(call DELFILE, $(KBIN))
$(call CLEAN)
@ -285,14 +274,11 @@ clean:
distclean: clean
$(Q) $(MAKE) -C bin distclean TOPDIR=$(TOPDIR)
$(Q) $(MAKE) -C ubin distclean TOPDIR=$(TOPDIR)
$(Q) $(MAKE) -C kbin distclean TOPDIR=$(TOPDIR)
$(Q) $(MAKE) -C nxfonts -f Makefile.sources distclean TOPDIR=$(TOPDIR) EXTRAFLAGS="$(EXTRAFLAGS)"
$(call DELFILE, bin/Make.dep)
$(call DELFILE, ubin/Make.dep)
$(call DELFILE, kbin/Make.dep)
$(call DELFILE, .depend)
-include bin/Make.dep
-include ubin/Make.dep
-include kbin/Make.dep

View File

@ -1,8 +0,0 @@
/*.asm
/*.obj
/*.rel
/*.lst
/*.sym
/*.adb
/*.lib
/*.src

View File

@ -1,48 +0,0 @@
############################################################################
# libs/libnx/ubin/Makefile
#
# Copyright (C) 2013 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# 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

1
mm/.gitignore vendored
View File

@ -1,5 +1,4 @@
/Make_bin.dep
/Make_ubin.dep
/Make_kbin.dep
/.depend
/*.lib

View File

@ -67,7 +67,6 @@ COBJS = $(patsubst %.c, $(BINDIR)$(DELIM)%$(OBJEXT), $(CSRCS))
SRCS = $(ASRCS) $(CSRCS)
OBJS = $(AOBJS) $(COBJS)
UBIN = libumm$(LIBEXT)
KBIN = libkmm$(LIBEXT)
BIN ?= libmm$(LIBEXT)
@ -80,18 +79,12 @@ $(AOBJS): $(BINDIR)$(DELIM)%$(OBJEXT): %.S
$(COBJS): $(BINDIR)$(DELIM)%$(OBJEXT): %.c
$(call COMPILE, $<, $@)
# Memory manager for the flat build
# Memory manager for the flat build and
# the user phase of the two-pass kernel build
$(BIN): $(OBJS)
$(call ARCHIVE, $@, $(OBJS))
# Memory manager for the user phase of the two-pass kernel build
ifneq ($(BIN),$(UBIN))
$(UBIN):
$(Q) $(MAKE) $(UBIN) BIN=$(UBIN) BINDIR=ubin TOPDIR=$(TOPDIR) EXTRAFLAGS="$(EXTRAFLAGS)"
endif
# Memory manager for the kernel phase of the two-pass kernel build
ifneq ($(BIN),$(KBIN))
@ -102,10 +95,8 @@ endif
# Dependencies
.depend: Makefile $(SRCS)
ifeq ($(CONFIG_BUILD_FLAT),y)
$(Q) $(MKDEP) --obj-path bin --obj-suffix $(OBJEXT) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >bin/Make.dep
else
$(Q) $(MKDEP) --obj-path ubin --obj-suffix $(OBJEXT) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >ubin/Make.dep
ifneq ($(CONFIG_BUILD_FLAT),y)
$(Q) $(MKDEP) --obj-path kbin --obj-suffix $(OBJEXT) $(DEPPATH) "$(CC)" -- $(CFLAGS) $(KDEFINE) -- $(SRCS) >kbin/Make.dep
endif
$(Q) touch $@
@ -116,10 +107,8 @@ depend: .depend
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)
@ -127,13 +116,10 @@ clean:
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, bin/Make.dep)
$(call DELFILE, ubin/Make.dep)
$(call DELFILE, kbin/Make.dep)
$(call DELFILE, .depend)
-include bin/Make.dep
-include ubin/Make.dep
-include kbin/Make.dep

8
mm/ubin/.gitignore vendored
View File

@ -1,8 +0,0 @@
/*.asm
/*.obj
/*.rel
/*.lst
/*.sym
/*.adb
/*.lib
/*.src

View File

@ -1,48 +0,0 @@
############################################################################
# mm/ubin/Makefile
#
# Copyright (C) 2013 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# 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

View File

@ -56,8 +56,8 @@ NUTTXLIBS += staging$(DELIM)libboards$(LIBEXT)
NUTTXLIBS += staging$(DELIM)libstubs$(LIBEXT) staging$(DELIM)libkc$(LIBEXT)
NUTTXLIBS += staging$(DELIM)libkmm$(LIBEXT) staging$(DELIM)libkarch$(LIBEXT)
USERLIBS += staging$(DELIM)libproxies$(LIBEXT) staging$(DELIM)libuc$(LIBEXT)
USERLIBS += staging$(DELIM)libumm$(LIBEXT) staging$(DELIM)libuarch$(LIBEXT)
USERLIBS += staging$(DELIM)libproxies$(LIBEXT) staging$(DELIM)libc$(LIBEXT)
USERLIBS += staging$(DELIM)libmm$(LIBEXT) staging$(DELIM)libarch$(LIBEXT)
# Add libraries for C++ support. CXX, CXXFLAGS, and COMPILEXX must
# be defined in Make.defs for this to work!
@ -87,10 +87,10 @@ NUTTXLIBS += staging$(DELIM)libfs$(LIBEXT) staging$(DELIM)libbinfmt$(LIBEXT)
ifeq ($(CONFIG_NX),y)
NUTTXLIBS += staging$(DELIM)libgraphics$(LIBEXT)
NUTTXLIBS += staging$(DELIM)libknx$(LIBEXT)
USERLIBS += staging$(DELIM)libunx$(LIBEXT)
USERLIBS += staging$(DELIM)libnx$(LIBEXT)
else ifeq ($(CONFIG_NXFONTS),y)
NUTTXLIBS += staging$(DELIM)libknx$(LIBEXT)
USERLIBS += staging$(DELIM)libunx$(LIBEXT)
USERLIBS += staging$(DELIM)libnx$(LIBEXT)
endif
# Add libraries for the Audio sub-system

View File

@ -136,78 +136,32 @@ wireless$(DELIM)libwireless$(LIBEXT): context
staging$(DELIM)libwireless$(LIBEXT): wireless$(DELIM)libwireless$(LIBEXT)
$(Q) $(call INSTALL_LIB,$<,$@)
$(ARCH_SRC)$(DELIM)libarch$(LIBEXT): context
$(Q) $(MAKE) -C $(ARCH_SRC) TOPDIR="$(TOPDIR)" libarch$(LIBEXT) EXTRAFLAGS="$(KDEFINE) $(EXTRAFLAGS)"
staging$(DELIM)libarch$(LIBEXT): $(ARCH_SRC)$(DELIM)libarch$(LIBEXT)
$(Q) $(call INSTALL_LIB,$<,$@)
libs$(DELIM)libdsp$(DELIM)libdsp$(LIBEXT): context
$(Q) $(MAKE) -C libs$(DELIM)libdsp TOPDIR="$(TOPDIR)" libdsp$(LIBEXT) EXTRAFLAGS="$(KDEFINE) $(EXTRAFLAGS)"
staging$(DELIM)libdsp$(LIBEXT): libs$(DELIM)libdsp$(DELIM)libdsp$(LIBEXT)
$(Q) $(call INSTALL_LIB,$<,$@)
openamp$(DELIM)libopenamp$(LIBEXT): context
$(Q) $(MAKE) -C openamp TOPDIR="$(TOPDIR)" libopenamp$(LIBEXT) EXTRAFLAGS="$(KDEFINE) $(EXTRAFLAGS)"
staging$(DELIM)libopenamp$(LIBEXT): openamp$(DELIM)libopenamp$(LIBEXT)
$(Q) $(call INSTALL_LIB,$<,$@)
# Special case
syscall$(DELIM)libstubs$(LIBEXT): context
$(Q) $(MAKE) -C syscall TOPDIR="$(TOPDIR)" libstubs$(LIBEXT) # EXTRAFLAGS="$(KDEFINE) $(EXTRAFLAGS)"
staging$(DELIM)libstubs$(LIBEXT): syscall$(DELIM)libstubs$(LIBEXT)
$(Q) $(call INSTALL_LIB,$<,$@)
# Special case
$(ARCH_SRC)$(DELIM)libarch$(LIBEXT): context
ifeq ($(CONFIG_BUILD_FLAT),y)
$(Q) $(MAKE) -C $(ARCH_SRC) TOPDIR="$(TOPDIR)" libarch$(LIBEXT) EXTRAFLAGS="$(KDEFINE) $(EXTRAFLAGS)"
else
$(Q) $(MAKE) -C $(ARCH_SRC) TOPDIR="$(TOPDIR)" libarch$(LIBEXT) EXTRAFLAGS="$(EXTRAFLAGS)"
endif
staging$(DELIM)libarch$(LIBEXT): $(ARCH_SRC)$(DELIM)libarch$(LIBEXT)
$(Q) $(call INSTALL_LIB,$<,$@)
# Possible user-mode builds
libs$(DELIM)libc$(DELIM)libuc$(LIBEXT): context
$(Q) $(MAKE) -C libs$(DELIM)libc TOPDIR="$(TOPDIR)" libuc$(LIBEXT)
staging$(DELIM)libuc$(LIBEXT): libs$(DELIM)libc$(DELIM)libuc$(LIBEXT)
$(Q) $(call INSTALL_LIB,$<,$@)
libs$(DELIM)libnx$(DELIM)libunx$(LIBEXT): context
$(Q) $(MAKE) -C libs$(DELIM)libnx TOPDIR="$(TOPDIR)" libunx$(LIBEXT)
staging$(DELIM)libunx$(LIBEXT): libs$(DELIM)libnx$(DELIM)libunx$(LIBEXT)
$(Q) $(call INSTALL_LIB,$<,$@)
mm$(DELIM)libumm$(LIBEXT): context
$(Q) $(MAKE) -C mm TOPDIR="$(TOPDIR)" libumm$(LIBEXT)
staging$(DELIM)libumm$(LIBEXT): mm$(DELIM)libumm$(LIBEXT)
$(Q) $(call INSTALL_LIB,$<,$@)
$(ARCH_SRC)$(DELIM)libuarch$(LIBEXT): context
$(Q) $(MAKE) -C $(ARCH_SRC) TOPDIR="$(TOPDIR)" libuarch$(LIBEXT)
staging$(DELIM)libuarch$(LIBEXT): $(ARCH_SRC)$(DELIM)libuarch$(LIBEXT)
$(Q) $(call INSTALL_LIB,$<,$@)
libs$(DELIM)libxx$(DELIM)libxx$(LIBEXT): context
$(Q) $(MAKE) -C libs$(DELIM)libxx TOPDIR="$(TOPDIR)" libxx$(LIBEXT)
staging$(DELIM)libxx$(LIBEXT): libs$(DELIM)libxx$(DELIM)libxx$(LIBEXT)
$(Q) $(call INSTALL_LIB,$<,$@)
$(APPDIR)$(DELIM)libapps$(LIBEXT): context
$(Q) $(MAKE) -C $(APPDIR) TOPDIR="$(TOPDIR)"
staging$(DELIM)libapps$(LIBEXT): $(APPDIR)$(DELIM)libapps$(LIBEXT)
$(Q) $(call INSTALL_LIB,$<,$@)
syscall$(DELIM)libproxies$(LIBEXT): context
$(Q) $(MAKE) -C syscall TOPDIR="$(TOPDIR)" libproxies$(LIBEXT)
staging$(DELIM)libproxies$(LIBEXT): syscall$(DELIM)libproxies$(LIBEXT)
$(Q) $(call INSTALL_LIB,$<,$@)
# Possible non-kernel builds
libs$(DELIM)libc$(DELIM)libc$(LIBEXT): context
$(Q) $(MAKE) -C libs$(DELIM)libc TOPDIR="$(TOPDIR)" libc$(LIBEXT)
@ -225,3 +179,27 @@ mm$(DELIM)libmm$(LIBEXT): context
staging$(DELIM)libmm$(LIBEXT): mm$(DELIM)libmm$(LIBEXT)
$(Q) $(call INSTALL_LIB,$<,$@)
libs$(DELIM)libxx$(DELIM)libxx$(LIBEXT): context
$(Q) $(MAKE) -C libs$(DELIM)libxx TOPDIR="$(TOPDIR)" libxx$(LIBEXT)
staging$(DELIM)libxx$(LIBEXT): libs$(DELIM)libxx$(DELIM)libxx$(LIBEXT)
$(Q) $(call INSTALL_LIB,$<,$@)
libs$(DELIM)libdsp$(DELIM)libdsp$(LIBEXT): context
$(Q) $(MAKE) -C libs$(DELIM)libdsp TOPDIR="$(TOPDIR)" libdsp$(LIBEXT) EXTRAFLAGS="$(EXTRAFLAGS)"
staging$(DELIM)libdsp$(LIBEXT): libs$(DELIM)libdsp$(DELIM)libdsp$(LIBEXT)
$(Q) $(call INSTALL_LIB,$<,$@)
$(APPDIR)$(DELIM)libapps$(LIBEXT): context
$(Q) $(MAKE) -C $(APPDIR) TOPDIR="$(TOPDIR)"
staging$(DELIM)libapps$(LIBEXT): $(APPDIR)$(DELIM)libapps$(LIBEXT)
$(Q) $(call INSTALL_LIB,$<,$@)
syscall$(DELIM)libproxies$(LIBEXT): context
$(Q) $(MAKE) -C syscall TOPDIR="$(TOPDIR)" libproxies$(LIBEXT)
staging$(DELIM)libproxies$(LIBEXT): syscall$(DELIM)libproxies$(LIBEXT)
$(Q) $(call INSTALL_LIB,$<,$@)

View File

@ -57,8 +57,8 @@ NUTTXLIBS += staging$(DELIM)libboards$(LIBEXT)
NUTTXLIBS += staging$(DELIM)libstubs$(LIBEXT) staging$(DELIM)libkc$(LIBEXT)
NUTTXLIBS += staging$(DELIM)libkmm$(LIBEXT) staging$(DELIM)libkarch$(LIBEXT)
USERLIBS += staging$(DELIM)libproxies$(LIBEXT) staging$(DELIM)libuc$(LIBEXT)
USERLIBS += staging$(DELIM)libumm$(LIBEXT) staging$(DELIM)libuarch$(LIBEXT)
USERLIBS += staging$(DELIM)libproxies$(LIBEXT) staging$(DELIM)libc$(LIBEXT)
USERLIBS += staging$(DELIM)libmm$(LIBEXT) staging$(DELIM)libarch$(LIBEXT)
# Add libraries for two pass build support. The special directory pass1
# may be populated so that application generated logic can be included into
@ -102,10 +102,10 @@ NUTTXLIBS += staging$(DELIM)libfs$(LIBEXT) staging$(DELIM)libbinfmt$(LIBEXT)
ifeq ($(CONFIG_NX),y)
NUTTXLIBS += staging$(DELIM)libgraphics$(LIBEXT)
NUTTXLIBS += staging$(DELIM)libknx$(LIBEXT)
USERLIBS += staging$(DELIM)libunx$(LIBEXT)
USERLIBS += staging$(DELIM)libnx$(LIBEXT)
else ifeq ($(CONFIG_NXFONTS),y)
NUTTXLIBS += staging$(DELIM)libknx$(LIBEXT)
USERLIBS += staging$(DELIM)libunx$(LIBEXT)
USERLIBS += staging$(DELIM)libnx$(LIBEXT)
endif
# Add libraries for the Audio sub-system