diff --git a/Makefile b/Makefile index 22102a91bf..9c20f4f26d 100644 --- a/Makefile +++ b/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/configs/README.txt b/configs/README.txt index ca14c42244..f7891dd08a 100644 --- a/configs/README.txt +++ b/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/configs/ea3131/locked/Makefile b/configs/ea3131/locked/Makefile index 26a62a683c..a6bae11a06 100755 --- a/configs/ea3131/locked/Makefile +++ b/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/configs/ea3131/src/Makefile b/configs/ea3131/src/Makefile index cb3cc3da8d..c97c4fecf0 100755 --- a/configs/ea3131/src/Makefile +++ b/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/configs/mbed/src/Makefile b/configs/mbed/src/Makefile index 98b824b66b..876f77b7df 100755 --- a/configs/mbed/src/Makefile +++ b/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/configs/mcu123-lpc214x/src/Makefile b/configs/mcu123-lpc214x/src/Makefile index e3f86453fd..a69beca5a0 100644 --- a/configs/mcu123-lpc214x/src/Makefile +++ b/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/configs/nucleus2g/src/Makefile b/configs/nucleus2g/src/Makefile index 36415136d1..7aca7b05e6 100755 --- a/configs/nucleus2g/src/Makefile +++ b/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/configs/olimex-lpc1766stk/src/Makefile b/configs/olimex-lpc1766stk/src/Makefile index ae53d08079..6898aac068 100755 --- a/configs/olimex-lpc1766stk/src/Makefile +++ b/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/configs/sam3u-ek/src/Makefile b/configs/sam3u-ek/src/Makefile index 9aa681b8b4..d40fd39269 100755 --- a/configs/sam3u-ek/src/Makefile +++ b/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/configs/sim/nx/defconfig-x11 b/configs/sim/nx/defconfig-x11 index 5d483ef0a2..d01f545228 100644 --- a/configs/sim/nx/defconfig-x11 +++ b/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/configs/stm3210e-eval/src/Makefile b/configs/stm3210e-eval/src/Makefile index 42839b0f47..09f0c518f4 100755 --- a/configs/stm3210e-eval/src/Makefile +++ b/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/configs/vsn/src/Makefile b/configs/vsn/src/Makefile index 6e55c30ca0..8b00da4a7a 100644 --- a/configs/vsn/src/Makefile +++ b/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/tools/zipme.sh b/tools/zipme.sh index c92f6b64e0..7c08bd2714 100755 --- a/tools/zipme.sh +++ b/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 || \