From 1979ecdbc0a52e63d6b249edbc92aed095e005d7 Mon Sep 17 00:00:00 2001 From: patacongo Date: Wed, 26 Nov 2008 15:46:12 +0000 Subject: [PATCH] graphics dir now has its own makefile git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1308 42af7a65-404d-4744-a932-0658087f49c3 --- Documentation/NuttxPortingGuide.html | 280 ++++++++++++++++++--------- Makefile | 12 +- graphics/{nxglib => }/Makefile | 26 ++- graphics/nxglib/Make.defs | 38 ++++ 4 files changed, 251 insertions(+), 105 deletions(-) rename graphics/{nxglib => }/Makefile (79%) create mode 100644 graphics/nxglib/Make.defs diff --git a/Documentation/NuttxPortingGuide.html b/Documentation/NuttxPortingGuide.html index 992548fafd..52ca0cf9b4 100644 --- a/Documentation/NuttxPortingGuide.html +++ b/Documentation/NuttxPortingGuide.html @@ -16,7 +16,7 @@

by

Gregory Nutt

-

Last Update: November 14, 2008

+

Last Update: November 26, 2008

Table of Contents

@@ -43,14 +43,15 @@
  • 2.4 drivers/
  • 2.5 examples/
  • 2.6 fs/
  • -
  • 2.7 include/
  • -
  • 2.8 lib/
  • -
  • 2.9 mm/
  • -
  • 2.10 net
  • -
  • 2.11 netutils
  • -
  • 2.12 sched/
  • -
  • 2.13 tools/
  • -
  • 2.14 Makefile
  • +
  • 2.7 graphics/
  • +
  • 2.8 include/
  • +
  • 2.9 lib/
  • +
  • 2.10 mm/
  • +
  • 2.11 net
  • +
  • 2.12 netutils
  • +
  • 2.13 sched/
  • +
  • 2.14 tools/
  • +
  • 2.15 Makefile
  • 3.0 Configuring and Building
  • @@ -262,21 +248,21 @@ under arch/ with the following characteristics:

    2.2.2 Summary of Files

    @@ -498,24 +484,23 @@ provide a subdirectory <board-name> under configs/ with the following characteristics:

    2.3.2 Summary of Files

    @@ -706,6 +691,23 @@

    This directory holds architecture-independent device drivers.

    +

    2.5 examples

    @@ -719,53 +721,147 @@ This directory contains the NuttX file system. This file system is described below.

    + -

    2.7 include

    +

    2.7 graphics

    + +

    + This directory contains files for graphics/video support under NuttX. +

    + + +

    2.8 include

    This directory holds NuttX header files. Standard header files file retained in can be included in the normal fashion:

    +

    + Directory structure: +

    + -

    2.8 lib

    +

    2.9 lib

    This directory holds a collection of standard libc-like functions with custom interfaces into Nuttx.

    -

    2.9 mm

    +

    2.10 mm

    This is the NuttX memory manager.

    -

    2.10 net

    +

    2.11 net

    This directory contains the implementation of the socket APIs. The subdirectory, uip contians the uIP port.

    -

    2.11 netutils

    +

    2.12 netutils

    - This directory contains most of the network applications contained under the uIP-1.0 apps directory. - As the uIP apps/README says, these applications "are not all heavily tested." + This directory contains most of the network applications. + Some of these are original with NuttX (like tftpc) and others were leveraged from the uIP-1.0 apps directory. + As the uIP apps/README says, these applications "are not all heavily tested."

    + -

    2.12 sched

    +

    2.13 sched

    The files forming core of the NuttX RTOS reside here.

    -

    2.13 tools

    +

    2.14 tools

    This directory holds a collection of tools and scripts to simplify - configuring and building NuttX. + configuring, building and maintaining NuttX.

    + -

    2.14 Makefile

    +

    2.15 Makefile

    The top-level Makefile in the ${TOPDIR} directory contains all of the top-level control logic to build NuttX. diff --git a/Makefile b/Makefile index de2dec084b..eafdc5e01c 100644 --- a/Makefile +++ b/Makefile @@ -55,14 +55,13 @@ BOARD_DIR = configs/$(CONFIG_ARCH_BOARD) # NuttX source tree (they must be specifically installed) PCODE_DIR := ${shell if [ -r pcode/Makefile ]; then echo "pcode"; fi} -NX_DIR := ${shell if [ -r graphics/nx/Makefile ]; then echo "graphics/nx"; fi} ADDON_DIRS := $(PCODE_DIR) $(NX_DIR) # FSDIRS depend on file descriptor support; NONFSDIRS do not # (except for parts of FSDIRS). We will exclude FSDIRS # from the build if file descriptor support is disabled -NONFSDIRS = sched lib $(ARCH_SRC) mm examples/$(CONFIG_EXAMPLE) $(ADDON_DIRS) graphics/nxglib +NONFSDIRS = sched lib $(ARCH_SRC) mm examples/$(CONFIG_EXAMPLE) $(ADDON_DIRS) graphics FSDIRS = fs drivers ifeq ($(CONFIG_NET),y) @@ -94,7 +93,7 @@ endif LINKLIBS = sched/libsched$(LIBEXT) $(ARCH_SRC)/libarch$(LIBEXT) mm/libmm$(LIBEXT) \ lib/liblib$(LIBEXT) examples/$(CONFIG_EXAMPLE)/lib$(CONFIG_EXAMPLE)$(LIBEXT) \ - graphics/nxglib/libnxglib$(LIBEXT) + graphics/libgraphics$(LIBEXT) ifeq ($(CONFIG_NET),y) LINKLIBS += net/libnet$(LIBEXT) netutils/libnetutils$(LIBEXT) @@ -203,11 +202,8 @@ drivers/libdrivers$(LIBEXT): context pcode/libpcode$(LIBEXT): context @$(MAKE) -C pcode TOPDIR="$(TOPDIR)" libpcode$(LIBEXT) -graphics/nxglib/libnxglib$(LIBEXT): context - @$(MAKE) -C graphics/nxglib TOPDIR="$(TOPDIR)" libnxglib$(LIBEXT) - -graphics/nx/libnx$(LIBEXT): context - @$(MAKE) -C graphics/nx TOPDIR="$(TOPDIR)" libnx$(LIBEXT) +graphics/libgraphics$(LIBEXT): context + @$(MAKE) -C graphics TOPDIR="$(TOPDIR)" libgraphics$(LIBEXT) examples/$(CONFIG_EXAMPLE)/lib$(CONFIG_EXAMPLE)$(LIBEXT): context @$(MAKE) -C examples/$(CONFIG_EXAMPLE) TOPDIR="$(TOPDIR)" lib$(CONFIG_EXAMPLE)$(LIBEXT) diff --git a/graphics/nxglib/Makefile b/graphics/Makefile similarity index 79% rename from graphics/nxglib/Makefile rename to graphics/Makefile index 04ba1358c8..6b39cd6764 100644 --- a/graphics/nxglib/Makefile +++ b/graphics/Makefile @@ -1,5 +1,5 @@ ############################################################################ -# grapics/nxglib/Makefile +# graphics/Makefile # # Copyright (C) 2008 Gregory Nutt. All rights reserved. # Author: Gregory Nutt @@ -33,18 +33,34 @@ # ############################################################################ +-include $(TOPDIR)/.config -include $(TOPDIR)/Make.defs -ASRCS = +DEPPATH = --dep-path . + +include nxglib/Make.defs +DEPPATH += --dep-path nxglib +CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh "$(CC)" $(TOPDIR)/graphics/nxglib} + +HAVENX = `if [ -d nx ]; then echo "y"; else echo "n";fi` +ifeq ($(HAVENX),y) +include nx/Make.defs +DEPPATH += --dep-path nx +CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh "$(CC)" $(TOPDIR)/graphics/nx} +endif + +ASRCS = $(NXGLIB_ASRCS) $(NX_ASRCS) AOBJS = $(ASRCS:.S=$(OBJEXT)) -CSRCS = nxglib_rgb2yuv.c nxglib_yuv2rgb.c +CSRCS = $(NXGLIB_CSRCS) $(NX_CSRCS) COBJS = $(CSRCS:.c=$(OBJEXT)) SRCS = $(ASRCS) $(CSRCS) OBJS = $(AOBJS) $(COBJS) -BIN = libnxglib$(LIBEXT) +BIN = libgraphics$(LIBEXT) + +VPATH = nxglib:nx all: $(BIN) @@ -60,7 +76,7 @@ $(BIN): $(OBJS) done ; ) .depend: Makefile $(SRCS) - @$(MKDEP) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep + @$(MKDEP) $(DEPPATH) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep @touch $@ depend: .depend diff --git a/graphics/nxglib/Make.defs b/graphics/nxglib/Make.defs new file mode 100644 index 0000000000..274e1a1ac6 --- /dev/null +++ b/graphics/nxglib/Make.defs @@ -0,0 +1,38 @@ +############################################################################ +# graphics/nxglib/Make.defs +# +# Copyright (C) 2008 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. +# +############################################################################ + +NXGLIB_ASRCS = +NXGLIB_CSRCS = nxglib_rgb2yuv.c nxglib_yuv2rgb.c +