From f6f8f750c7a25d123dc6f20902b38bcda1c95963 Mon Sep 17 00:00:00 2001 From: patacongo Date: Sun, 20 Mar 2011 19:30:39 +0000 Subject: More build fixes git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3406 42af7a65-404d-4744-a932-0658087f49c3 --- apps/examples/usbserial/Makefile.host | 2 +- nuttx/Makefile | 17 ++++++++++++++--- nuttx/configs/README.txt | 11 ++++------- nuttx/configs/ea3131/locked/Makefile | 9 +++++++++ nuttx/configs/ea3131/src/Makefile | 2 +- nuttx/configs/mbed/src/Makefile | 2 +- nuttx/configs/mcu123-lpc214x/src/Makefile | 2 +- nuttx/configs/nucleus2g/src/Makefile | 2 +- nuttx/configs/olimex-lpc1766stk/src/Makefile | 2 +- nuttx/configs/sam3u-ek/src/Makefile | 2 +- nuttx/configs/sim/nx/defconfig-x11 | 2 +- nuttx/configs/stm3210e-eval/src/Makefile | 2 +- nuttx/configs/vsn/src/Makefile | 2 +- nuttx/tools/zipme.sh | 4 ++++ 14 files changed, 41 insertions(+), 20 deletions(-) diff --git a/apps/examples/usbserial/Makefile.host b/apps/examples/usbserial/Makefile.host index eeac5334c..8c8884b42 100644 --- a/apps/examples/usbserial/Makefile.host +++ b/apps/examples/usbserial/Makefile.host @@ -58,7 +58,7 @@ endif all: $(BIN)$(EXEEXT) $(BIN)$(EXEEXT): $(SRC) - $(HOSTCC) $(HOSTCFLAGS) $(DEFINES) $^ -o $@ + @$(HOSTCC) $(HOSTCFLAGS) $(DEFINES) $^ -o $@ clean: @rm -f $(BIN) *~ .*.swp *.o diff --git a/nuttx/Makefile b/nuttx/Makefile index 22102a91b..9c20f4f26 100644 --- a/nuttx/Makefile +++ b/nuttx/Makefile @@ -80,6 +80,7 @@ ADDON_DIRS := $(PCODE_DIR) $(NX_DIR) $(APPDIR) NONFSDIRS = sched lib $(ARCH_SRC) mm $(ADDON_DIRS) FSDIRS = fs drivers binfmt +NETFSDIRS = fs drivers CONTEXTDIRS = ifeq ($(CONFIG_NX),y) @@ -98,17 +99,26 @@ endif CLEANDIRS = $(NONFSDIRS) $(FSDIRS) MAKEDIRS = $(NONFSDIRS) +# Add file system directories to MAKEDIRS (they are already in CLEANDIRS) + ifeq ($(CONFIG_NFILE_DESCRIPTORS),0) +ifeq ($(CONFIG_NET),y) ifneq ($(CONFIG_NSOCKET_DESCRIPTORS),0) MAKEDIRS += fs endif -ifeq ($(CONFIG_NET),y) -MAKEDIRS += net +MAKEDIRS += drivers endif else MAKEDIRS += $(FSDIRS) endif +# Add networking directories to MAKEDIRS and CLEANDIRS + +ifeq ($(CONFIG_NET),y) +MAKEDIRS += net +endif +CLEANDIRS += net + # # Extra objects used in the final link. # @@ -367,7 +377,8 @@ subdir_distclean: done distclean: clean subdir_distclean clean_context - @rm -f Make.defs setenv.sh .config ifeq ($(CONFIG_BUILD_2PASS),y) @$(MAKE) -C $(CONFIG_PASS1_BUILDIR) TOPDIR="$(TOPDIR)" distclean endif + @rm -f Make.defs setenv.sh .config + diff --git a/nuttx/configs/README.txt b/nuttx/configs/README.txt index ca14c4224..f7891dd08 100644 --- a/nuttx/configs/README.txt +++ b/nuttx/configs/README.txt @@ -171,12 +171,9 @@ defconfig -- This is a configuration file similar to the Linux CONFIG_APP_DIR - Identifies the directory that builds the application to link with NuttX. This symbol must be assigned to the path to the application build directory *relative* to - the NuttX top build direcory. As an an example, there are - several example applicatins in the NuttX examples/ sub-directory. - To use one of these example applications, say nsh, you would - set CONFIG_APP_DIR=examples/nsh. If you had an application - directory and the NuttX directory both within another directory - like this: + the NuttX top build direcory. If you had an application + directory and the NuttX directory each in separate directory + trees like this: build |-nuttx @@ -202,7 +199,7 @@ defconfig -- This is a configuration file similar to the Linux This is only done when you change the NuttX configuration. - depend. Make or update the application build dependencies. - When this application is invoked it will receive the setting TOPDIR< like: + When this application is invoked it will receive the setting TOPDIR like: $(MAKE) -C $(CONFIG_APP_DIR) TOPDIR="$(TOPDIR)" diff --git a/nuttx/configs/ea3131/locked/Makefile b/nuttx/configs/ea3131/locked/Makefile index 26a62a683..a6bae11a0 100755 --- a/nuttx/configs/ea3131/locked/Makefile +++ b/nuttx/configs/ea3131/locked/Makefile @@ -41,7 +41,16 @@ PASS1_SRCDIR = arch/$(CONFIG_ARCH)/src PASS1_BOARDDIR = $(PASS1_SRCDIR)/board PASS1_LIBBOARD = $(PASS1_BOARDDIR)/libboard$(LIBEXT) + +# Where is the application library? + +ifneq ($(CONFIG_APP_DIR),) PASS1_LIBAPP = $(CONFIG_APP_DIR)/libapp$(LIBEXT) +else +ifneq ($(APPDIR),) +PASS1_LIBAPP = $(APPDIR)/libapps$(LIBEXT) +endif +endif # Remove the application library (libapp) from the list of libraries. Add # the boad library (liboard) diff --git a/nuttx/configs/ea3131/src/Makefile b/nuttx/configs/ea3131/src/Makefile index cb3cc3da8..c97c4fecf 100755 --- a/nuttx/configs/ea3131/src/Makefile +++ b/nuttx/configs/ea3131/src/Makefile @@ -59,7 +59,7 @@ endif ifeq ($(CONFIG_PAGING),y) CSRCS += up_fillpage.c endif -ifeq ($(CONFIG_APP_DIR),examples/usbstorage) +ifeq ($(CONFIG_USBSTRG),y) CSRCS += up_usbstrg.c endif COBJS = $(CSRCS:.c=$(OBJEXT)) diff --git a/nuttx/configs/mbed/src/Makefile b/nuttx/configs/mbed/src/Makefile index 98b824b66..876f77b7d 100755 --- a/nuttx/configs/mbed/src/Makefile +++ b/nuttx/configs/mbed/src/Makefile @@ -42,7 +42,7 @@ CSRCS = up_boot.c up_leds.c ifeq ($(CONFIG_NSH_ARCHINIT),y) CSRCS += up_nsh.c endif -ifeq ($(CONFIG_APP_DIR),examples/usbstorage) +ifeq ($(CONFIG_USBSTRG),y) CSRCS += up_usbstrg.c endif diff --git a/nuttx/configs/mcu123-lpc214x/src/Makefile b/nuttx/configs/mcu123-lpc214x/src/Makefile index e3f86453f..a69beca5a 100644 --- a/nuttx/configs/mcu123-lpc214x/src/Makefile +++ b/nuttx/configs/mcu123-lpc214x/src/Makefile @@ -51,7 +51,7 @@ CSRCS = up_spi.c up_leds.c ifeq ($(CONFIG_NSH_ARCHINIT),y) CSRCS += up_nsh.c endif -ifeq ($(CONFIG_APP_DIR),examples/usbstorage) +ifeq ($(CONFIG_USBSTRG),y) CSRCS += up_usbstrg.c endif diff --git a/nuttx/configs/nucleus2g/src/Makefile b/nuttx/configs/nucleus2g/src/Makefile index 36415136d..7aca7b05e 100755 --- a/nuttx/configs/nucleus2g/src/Makefile +++ b/nuttx/configs/nucleus2g/src/Makefile @@ -42,7 +42,7 @@ CSRCS = up_boot.c up_leds.c up_ssp.c ifeq ($(CONFIG_NSH_ARCHINIT),y) CSRCS += up_nsh.c endif -ifeq ($(CONFIG_APP_DIR),examples/usbstorage) +ifeq ($(CONFIG_USBSTRG),y) CSRCS += up_usbstrg.c endif diff --git a/nuttx/configs/olimex-lpc1766stk/src/Makefile b/nuttx/configs/olimex-lpc1766stk/src/Makefile index ae53d0807..6898aac06 100755 --- a/nuttx/configs/olimex-lpc1766stk/src/Makefile +++ b/nuttx/configs/olimex-lpc1766stk/src/Makefile @@ -42,7 +42,7 @@ CSRCS = up_boot.c up_leds.c up_ssp.c ifeq ($(CONFIG_NSH_ARCHINIT),y) CSRCS += up_nsh.c endif -ifeq ($(CONFIG_APP_DIR),examples/usbstorage) +ifeq ($(CONFIG_USBSTRG),y) CSRCS += up_usbstrg.c endif ifeq ($(CONFIG_NX_LCDDRIVER),y) diff --git a/nuttx/configs/sam3u-ek/src/Makefile b/nuttx/configs/sam3u-ek/src/Makefile index 9aa681b8b..d40fd3926 100755 --- a/nuttx/configs/sam3u-ek/src/Makefile +++ b/nuttx/configs/sam3u-ek/src/Makefile @@ -47,7 +47,7 @@ endif ifeq ($(CONFIG_SAM3U_HSMCI),y) CSRCS += up_mmcsd.c endif -ifeq ($(CONFIG_APP_DIR),examples/usbstorage) +ifeq ($(CONFIG_USBSTRG),y) CSRCS += up_usbstrg.c endif COBJS = $(CSRCS:.c=$(OBJEXT)) diff --git a/nuttx/configs/sim/nx/defconfig-x11 b/nuttx/configs/sim/nx/defconfig-x11 index 5d483ef0a..d01f54522 100644 --- a/nuttx/configs/sim/nx/defconfig-x11 +++ b/nuttx/configs/sim/nx/defconfig-x11 @@ -121,7 +121,7 @@ CONFIG_SIM_FBBPP=32 # desciptors by task_create() when a new task is started. If # set, all sockets will appear to be closed in the new task. # -CONFIG_APP_DIR=examples/nx +#CONFIG_APP_DIR= CONFIG_DEBUG=y CONFIG_DEBUG_VERBOSE=y CONFIG_DEBUG_SYMBOLS=n diff --git a/nuttx/configs/stm3210e-eval/src/Makefile b/nuttx/configs/stm3210e-eval/src/Makefile index 42839b0f4..09f0c518f 100755 --- a/nuttx/configs/stm3210e-eval/src/Makefile +++ b/nuttx/configs/stm3210e-eval/src/Makefile @@ -46,7 +46,7 @@ CSRCS = up_boot.c up_leds.c up_buttons.c up_spi.c up_usbdev.c \ ifeq ($(CONFIG_NSH_ARCHINIT),y) CSRCS += up_nsh.c endif -ifeq ($(CONFIG_APP_DIR),examples/usbstorage) +ifeq ($(CONFIG_USBSTRG),y) CSRCS += up_usbstrg.c endif COBJS = $(CSRCS:.c=$(OBJEXT)) diff --git a/nuttx/configs/vsn/src/Makefile b/nuttx/configs/vsn/src/Makefile index 6e55c30ca..8b00da4a7 100644 --- a/nuttx/configs/vsn/src/Makefile +++ b/nuttx/configs/vsn/src/Makefile @@ -49,7 +49,7 @@ CSRCS = sysclock.c boot.c leds.c buttons.c spi.c \ ifeq ($(CONFIG_NSH_ARCHINIT),y) CSRCS += nsh.c endif -ifeq ($(CONFIG_APP_DIR),examples/usbstorage) +ifeq ($(CONFIG_USBSTRG),y) CSRCS += usbstrg.c endif COBJS = $(CSRCS:.c=$(OBJEXT)) diff --git a/nuttx/tools/zipme.sh b/nuttx/tools/zipme.sh index c92f6b64e..7c08bd271 100755 --- a/nuttx/tools/zipme.sh +++ b/nuttx/tools/zipme.sh @@ -132,6 +132,10 @@ if [ -f ${ZIP_NAME} ] ; then { echo "rm ${ZIP_NAME} failed!" ; exit 1 ; } fi +# Write a version file + +echo "CONFIG_NUTTX_VERSION=\"${VERSION}\" >${NUTTX}/.version + # Then zip it ${TAR} ${TAR_NAME} nuttx-${VERSION}/nuttx nuttx-${VERSION}/apps || \ -- cgit v1.2.3