diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-03-24 00:28:50 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-03-24 00:28:50 +0000 |
commit | 1e10d8d0d3733432f69d86948645896295864d42 (patch) | |
tree | a678b793c7a420cedb58e9f99ca4b39fea502fd6 /apps | |
parent | fe55a3d3121630eda2b910bac6b051a38e3b5f60 (diff) | |
download | px4-nuttx-1e10d8d0d3733432f69d86948645896295864d42.tar.gz px4-nuttx-1e10d8d0d3733432f69d86948645896295864d42.tar.bz2 px4-nuttx-1e10d8d0d3733432f69d86948645896295864d42.zip |
apps/ initialization now occurs during the earlier context build phase
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3412 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'apps')
37 files changed, 144 insertions, 69 deletions
diff --git a/apps/ChangeLog.txt b/apps/ChangeLog.txt index 681802a56..8e3733a95 100755 --- a/apps/ChangeLog.txt +++ b/apps/ChangeLog.txt @@ -3,14 +3,19 @@ * Initial version of the apps/ directory was released as contributed by
Uros Platise.
-5.20 2011-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>
+6.0 2011-03-21 Gregory Nutt <spudmonkey@racsa.co.cr>
* README.txt -- README cosmetics
* hello/ -- hello world minor changes
* Makefile -- Makefile cosmetics (I am slowly adding the Darjeeling JVM)
* Make.defs -- New file adds common make definitions for applications.
* hello/Makefile -- Now uses new Make.defs definitions. Added README.txt.
- * apps/poweroff -- New application to turn off board power. - * Moved NSH library, netutils, and examples from the nuttx/ directory to - the apps/ directory - * Moved exec_nuttapp machinery into the nuttapp/ directory. + * apps/poweroff -- New application to turn off board power.
+ * Moved NSH library, netutils, and examples from the nuttx/ directory to
+ the apps/ directory
+ * Moved exec_nuttapp machinery into the nuttapp/ directory.
+
+6.0 2011-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>
+
+ * Creation of auto-generated header files now occurs during the context
+ build phase.
diff --git a/apps/Makefile b/apps/Makefile index 5c4e8dc09..2735759c9 100644 --- a/apps/Makefile +++ b/apps/Makefile @@ -91,7 +91,7 @@ BIN = libapps$(LIBEXT) # Build targets all: $(BIN) -.PHONY: $(BUILTIN_APPS_BUILT) .depend depend clean distclean +.PHONY: $(BUILTIN_APPS_BUILT) context depend clean distclean $(BUILTIN_APPS_BUILT): @for dir in $(BUILTIN_APPS_DIR) ; do \ @@ -103,7 +103,16 @@ $(BIN): $(BUILTIN_APPS_BUILT) $(call ARCHIVE, $@, $${obj}); \ done ; ) -.depend: Makefile $(SRCS) +.context: + @for dir in $(BUILTIN_APPS_DIR) ; do \ + rm -f $$dir/.context ; \ + $(MAKE) -C $$dir TOPDIR="$(TOPDIR)" APPDIR=$(APPDIR) context ; \ + done + @touch $@ + +context: .context + +.depend: context Makefile $(SRCS) @for dir in $(BUILTIN_APPS_DIR) ; do \ rm -f $$dir/.depend ; \ $(MAKE) -C $$dir TOPDIR="$(TOPDIR)" APPDIR=$(APPDIR) depend ; \ @@ -123,5 +132,5 @@ distclean: clean @for dir in $(SUBDIRS) ; do \ $(MAKE) -C $$dir distclean TOPDIR="$(TOPDIR)" APPDIR=$(APPDIR); \ done - @rm -f .config .depend + @rm -f .config .context .depend diff --git a/apps/README.txt b/apps/README.txt index b80393a03..7185d1371 100644 --- a/apps/README.txt +++ b/apps/README.txt @@ -9,7 +9,9 @@ in two files: - exec_nuttapp_proto.h Entry points, prototype function - exec_nuttapp_list.h Application specific information and requirements -Information is collected during the make .depend process. +The build occurs in several phases as different build targets are executed: +(1) contex, (2) depend, and (3) default (all). Application information is +collected during the make context build phase. To execute an application function: @@ -34,7 +36,7 @@ CONFIGURED_APPS list like: CONFIGURED_APPS += hello/.built_always poweroff/.built_always jvm/.built_always -The form of each entry is <dir>/<dependency> when: +The form of each entry is <dir>=<dependency> when: <dir> is the name of a subdirectory in the apps directory, and diff --git a/apps/examples/Makefile b/apps/examples/Makefile index 21c11a783..b20442d62 100644 --- a/apps/examples/Makefile +++ b/apps/examples/Makefile @@ -42,10 +42,12 @@ SUBDIRS = dhcpd hello helloxx hidkbd igmp mm mount nettest nsh null nx \ udp uip usbserial usbstorage wget wlan all: nothing -.PHONY: nothing depend clean distclean +.PHONY: nothing context depend clean distclean nothing: +context: + depend: @for dir in $(SUBDIRS) ; do \ $(MAKE) -C $$dir depend TOPDIR="$(TOPDIR)" APPDIR=$(APPDIR); \ diff --git a/apps/examples/dhcpd/Makefile b/apps/examples/dhcpd/Makefile index d4f03f74b..783418c66 100644 --- a/apps/examples/dhcpd/Makefile +++ b/apps/examples/dhcpd/Makefile @@ -70,7 +70,7 @@ $(BIN): $(OBJS) $(call ARCHIVE, $@, $${obj}); \ done ; ) @touch .built - + .built: $(BIN) .depend: Makefile $(SRCS) diff --git a/apps/examples/hello/Makefile b/apps/examples/hello/Makefile index c856f145f..11046dbeb 100644 --- a/apps/examples/hello/Makefile +++ b/apps/examples/hello/Makefile @@ -70,7 +70,7 @@ $(BIN): $(OBJS) $(call ARCHIVE, $@, $${obj}); \ done ; ) @touch .built - + .built: $(BIN) .depend: Makefile $(SRCS) diff --git a/apps/examples/helloxx/Makefile b/apps/examples/helloxx/Makefile index 5cbf55ef3..e4f58a4ea 100755 --- a/apps/examples/helloxx/Makefile +++ b/apps/examples/helloxx/Makefile @@ -87,7 +87,7 @@ $(BIN): chkcxx $(OBJS) $(call ARCHIVE, $@, $${obj}); \ done ; ) @touch .built - + .built: $(BIN) .depend: Makefile $(SRCS) diff --git a/apps/examples/hidkbd/Makefile b/apps/examples/hidkbd/Makefile index 48b0c90a2..9ea170b8e 100644 --- a/apps/examples/hidkbd/Makefile +++ b/apps/examples/hidkbd/Makefile @@ -70,7 +70,7 @@ $(BIN): $(OBJS) $(call ARCHIVE, $@, $${obj}); \ done ; ) @touch .built - + .built: $(BIN) .depend: Makefile $(SRCS) diff --git a/apps/examples/igmp/Makefile b/apps/examples/igmp/Makefile index d1362f0b8..947b95484 100755 --- a/apps/examples/igmp/Makefile +++ b/apps/examples/igmp/Makefile @@ -70,7 +70,7 @@ $(BIN): $(OBJS) $(call ARCHIVE, $@, $${obj}); \ done ; ) @touch .built - + .built: $(BIN) .depend: Makefile $(SRCS) diff --git a/apps/examples/mm/Makefile b/apps/examples/mm/Makefile index 747a1a1e2..30cfea32f 100644 --- a/apps/examples/mm/Makefile +++ b/apps/examples/mm/Makefile @@ -70,7 +70,7 @@ $(BIN): $(OBJS) $(call ARCHIVE, $@, $${obj}); \ done ; ) @touch .built - + .built: $(BIN) .depend: Makefile $(SRCS) diff --git a/apps/examples/mount/Makefile b/apps/examples/mount/Makefile index 04d2d21f6..3cfc2f35c 100644 --- a/apps/examples/mount/Makefile +++ b/apps/examples/mount/Makefile @@ -70,7 +70,7 @@ $(BIN): $(OBJS) $(call ARCHIVE, $@, $${obj}); \ done ; ) @touch .built - + .built: $(BIN) .depend: Makefile $(SRCS) diff --git a/apps/examples/nsh/Makefile b/apps/examples/nsh/Makefile index 1887d3bbe..d6d78bc00 100644 --- a/apps/examples/nsh/Makefile +++ b/apps/examples/nsh/Makefile @@ -70,7 +70,7 @@ $(BIN): $(OBJS) $(call ARCHIVE, $@, $${obj}); \ done ; ) @touch .built - + .built: $(BIN) .depend: Makefile $(SRCS) diff --git a/apps/examples/null/Makefile b/apps/examples/null/Makefile index 9d842638a..472b06289 100644 --- a/apps/examples/null/Makefile +++ b/apps/examples/null/Makefile @@ -70,7 +70,7 @@ $(BIN): $(OBJS) $(call ARCHIVE, $@, $${obj}); \ done ; ) @touch .built - + .built: $(BIN) .depend: Makefile $(SRCS) diff --git a/apps/examples/nx/Makefile b/apps/examples/nx/Makefile index 72ba1915f..1f543a34e 100644 --- a/apps/examples/nx/Makefile +++ b/apps/examples/nx/Makefile @@ -73,7 +73,7 @@ $(BIN): $(OBJS) $(call ARCHIVE, $@, $${obj}); \ done ; ) @touch .built - + .built: $(BIN) .depend: Makefile $(SRCS) diff --git a/apps/examples/nxflat/Makefile b/apps/examples/nxflat/Makefile index 73a5a95d1..570a059a8 100644 --- a/apps/examples/nxflat/Makefile +++ b/apps/examples/nxflat/Makefile @@ -73,7 +73,7 @@ $(BIN): $(OBJS) $(call ARCHIVE, $@, $${obj}); \ done ; ) @touch .built - + .built: $(BIN) # We can't make dependencies in this directory because the required diff --git a/apps/examples/ostest/Makefile b/apps/examples/ostest/Makefile index 469fe032a..3c0284d73 100644 --- a/apps/examples/ostest/Makefile +++ b/apps/examples/ostest/Makefile @@ -110,7 +110,7 @@ $(BIN): $(OBJS) $(call ARCHIVE, $@, $${obj}); \ done ; ) @touch .built - + .built: $(BIN) .depend: Makefile $(SRCS) diff --git a/apps/examples/pashello/Makefile b/apps/examples/pashello/Makefile index 6e2579191..11d99ce56 100644 --- a/apps/examples/pashello/Makefile +++ b/apps/examples/pashello/Makefile @@ -77,7 +77,7 @@ $(BIN): $(OBJS) $(call ARCHIVE, $@, $${obj}); \ done ; ) @touch .built - + .built: $(BIN) .depend: Makefile $(SRCS) diff --git a/apps/examples/pipe/Makefile b/apps/examples/pipe/Makefile index e46bbdd82..0f56c5553 100644 --- a/apps/examples/pipe/Makefile +++ b/apps/examples/pipe/Makefile @@ -70,7 +70,7 @@ $(BIN): $(OBJS) $(call ARCHIVE, $@, $${obj}); \ done ; ) @touch .built - + .built: $(BIN) .depend: Makefile $(SRCS) diff --git a/apps/examples/poll/Makefile b/apps/examples/poll/Makefile index e33e493f1..0a0e0e65d 100644 --- a/apps/examples/poll/Makefile +++ b/apps/examples/poll/Makefile @@ -70,7 +70,7 @@ $(BIN): $(OBJS) $(call ARCHIVE, $@, $${obj}); \ done ; ) @touch .built - + .built: $(BIN) .depend: Makefile $(SRCS) diff --git a/apps/examples/romfs/Makefile b/apps/examples/romfs/Makefile index 7e12866f8..764f70640 100644 --- a/apps/examples/romfs/Makefile +++ b/apps/examples/romfs/Makefile @@ -86,7 +86,7 @@ $(BIN): romfs_testdir.h $(OBJS) $(call ARCHIVE, $@, $${obj}); \ done ; ) @touch .built - + .built: $(BIN) .depend: Makefile $(SRCS) diff --git a/apps/examples/sendmail/Makefile b/apps/examples/sendmail/Makefile index 81aed5ca6..a3beb7059 100644 --- a/apps/examples/sendmail/Makefile +++ b/apps/examples/sendmail/Makefile @@ -70,7 +70,7 @@ $(BIN): $(OBJS) $(call ARCHIVE, $@, $${obj}); \ done ; ) @touch .built - + .built: $(BIN) .depend: Makefile $(SRCS) diff --git a/apps/examples/serloop/Makefile b/apps/examples/serloop/Makefile index c3c0274db..0366d6248 100644 --- a/apps/examples/serloop/Makefile +++ b/apps/examples/serloop/Makefile @@ -70,7 +70,7 @@ $(BIN): $(OBJS) $(call ARCHIVE, $@, $${obj}); \ done ; ) @touch .built - + .built: $(BIN) .depend: Makefile $(SRCS) diff --git a/apps/examples/thttpd/Makefile b/apps/examples/thttpd/Makefile index 91c8c19e1..2690e6297 100644 --- a/apps/examples/thttpd/Makefile +++ b/apps/examples/thttpd/Makefile @@ -73,7 +73,7 @@ $(BIN): headers $(OBJS) $(call ARCHIVE, $@, $${obj}); \ done ; ) @touch .built - + .built: $(BIN) .depend: Makefile $(SRCS) diff --git a/apps/examples/uip/Makefile b/apps/examples/uip/Makefile index 08abe15b0..59c5f76b4 100644 --- a/apps/examples/uip/Makefile +++ b/apps/examples/uip/Makefile @@ -70,7 +70,7 @@ $(BIN): $(OBJS) $(call ARCHIVE, $@, $${obj}); \ done ; ) @touch .built - + .built: $(BIN) .depend: Makefile $(SRCS) diff --git a/apps/examples/usbserial/Makefile b/apps/examples/usbserial/Makefile index 2ac0cb085..b4d51ab82 100644 --- a/apps/examples/usbserial/Makefile +++ b/apps/examples/usbserial/Makefile @@ -70,7 +70,7 @@ $(BIN): $(OBJS) $(call ARCHIVE, $@, $${obj}); \ done ; ) @touch .built - + .built: $(BIN) .depend: Makefile $(SRCS) diff --git a/apps/examples/usbstorage/Makefile b/apps/examples/usbstorage/Makefile index 5e8983f46..aa3512547 100644 --- a/apps/examples/usbstorage/Makefile +++ b/apps/examples/usbstorage/Makefile @@ -70,7 +70,7 @@ $(BIN): $(OBJS) $(call ARCHIVE, $@, $${obj}); \ done ; ) @touch .built - + .built: $(BIN) .depend: Makefile $(SRCS) diff --git a/apps/examples/wget/Makefile b/apps/examples/wget/Makefile index b9cc15510..f245bf5a4 100644 --- a/apps/examples/wget/Makefile +++ b/apps/examples/wget/Makefile @@ -70,7 +70,7 @@ $(BIN): $(OBJS) $(call ARCHIVE, $@, $${obj}); \ done ; ) @touch .built - + .built: $(BIN) .depend: Makefile $(SRCS) diff --git a/apps/examples/wlan/Makefile b/apps/examples/wlan/Makefile index 756389571..313436815 100755 --- a/apps/examples/wlan/Makefile +++ b/apps/examples/wlan/Makefile @@ -71,7 +71,7 @@ $(BIN): $(OBJS) $(call ARCHIVE, $@, $${obj}); \ done ; ) @touch .built - + .built: $(BIN) .depend: Makefile $(SRCS) diff --git a/apps/netutils/Makefile b/apps/netutils/Makefile index cf33cf0f9..d0268698f 100644 --- a/apps/netutils/Makefile +++ b/apps/netutils/Makefile @@ -42,10 +42,12 @@ SUBDIRS = uiplib dhcpc dhcpd resolv smtp telnetd webclient webserver tftpc thttp endif all: nothing -.PHONY: nothing depend clean distclean +.PHONY: nothing context depend clean distclean nothing: +context: + depend: @for dir in $(SUBDIRS) ; do \ $(MAKE) -C $$dir depend TOPDIR="$(TOPDIR)" APPDIR=$(APPDIR); \ diff --git a/apps/nshlib/Makefile b/apps/nshlib/Makefile index ecd2e5576..7074cd0cc 100644 --- a/apps/nshlib/Makefile +++ b/apps/nshlib/Makefile @@ -76,12 +76,12 @@ OBJS = $(AOBJS) $(COBJS) BIN = $(APPDIR)/libapps$(LIBEXT) ROOTDEPPATH = --dep-path . - -# Common build - VPATH = +# Build targets + all: .built +.PHONY: context .depend depend clean distclean $(AOBJS): %$(OBJEXT): %.S $(call ASSEMBLE, $<, $@) @@ -97,6 +97,8 @@ $(BIN): $(OBJS) .built: $(BIN) +context: + .depend: Makefile $(SRCS) @$(MKDEP) $(ROOTDEPPATH) \ $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep diff --git a/apps/nuttapp/Makefile b/apps/nuttapp/Makefile index 092236027..9cdb4ff5d 100644 --- a/apps/nuttapp/Makefile +++ b/apps/nuttapp/Makefile @@ -58,7 +58,7 @@ VPATH = # Build Targets all: .built -.PHONY: depend .depend clean distclean +.PHONY: .context context .depend depend clean distclean $(AOBJS): %$(OBJEXT): %.S $(call ASSEMBLE, $<, $@) @@ -74,9 +74,14 @@ $(BIN): $(OBJS) .built: $(BIN) +.context: + @echo "/* List of application requirements, generated during make context. */" > exec_nuttapp_list.h + @echo "/* List of application entry points, generated during make context. */" > exec_nuttapp_proto.h + @touch $@ + +context: .context + .depend: Makefile $(SRCS) - @echo "/* List of application requirements, generated during make depend. */" > exec_nuttapp_list.h - @echo "/* List of application entry points, generated during make depend. */" > exec_nuttapp_proto.h @$(MKDEP) $(ROOTDEPPATH) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep @touch $@ @@ -87,7 +92,7 @@ clean: $(call CLEAN) distclean: clean - @rm -f Make.dep .depend + @rm -f .context Make.dep .depend @rm -f exec_nuttapp_list.h @rm -f exec_nuttapp_proto.h diff --git a/apps/vsn/Makefile b/apps/vsn/Makefile index b3fed59c2..a2dab4dbc 100644 --- a/apps/vsn/Makefile +++ b/apps/vsn/Makefile @@ -40,10 +40,18 @@ SUBDIRS = free hello poweroff ramtron sdcard all: nothing -.PHONY: nothing depend clean distclean +.PHONY: nothing context depend clean distclean nothing: +.context: + @for dir in $(SUBDIRS) ; do \ + $(MAKE) -C $$dir context TOPDIR="$(TOPDIR)" APPDIR=$(APPDIR); \ + done + @touch $@ + +context: .context + depend: @for dir in $(SUBDIRS) ; do \ $(MAKE) -C $$dir depend TOPDIR="$(TOPDIR)" APPDIR=$(APPDIR); \ diff --git a/apps/vsn/free/Makefile b/apps/vsn/free/Makefile index 01545d06d..cac2b1d10 100644 --- a/apps/vsn/free/Makefile +++ b/apps/vsn/free/Makefile @@ -70,6 +70,7 @@ ROOTDEPPATH = --dep-path . VPATH = all: .built +.PHONY: .built context depend clean distclean $(AOBJS): %$(OBJEXT): %.S $(call ASSEMBLE, $<, $@) @@ -85,13 +86,20 @@ $(BIN): $(OBJS) .built: $(BIN) -.depend: Makefile $(SRCS) - @$(MKDEP) $(ROOTDEPPATH) \ - $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep +# Register application + +.context: $(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main) @touch $@ -# Register application +context: .context + +# Create dependencies + +.depend: Makefile $(SRCS) + @$(MKDEP) $(ROOTDEPPATH) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep + @touch $@ + depend: .depend clean: @@ -99,6 +107,6 @@ clean: $(call CLEAN) distclean: clean - @rm -f Make.dep .depend + @rm -f .context Make.dep .depend -include Make.dep diff --git a/apps/vsn/hello/Makefile b/apps/vsn/hello/Makefile index 45f60e9bd..23aba200c 100644 --- a/apps/vsn/hello/Makefile +++ b/apps/vsn/hello/Makefile @@ -70,6 +70,7 @@ ROOTDEPPATH = --dep-path . VPATH = all: .built +.PHONY: .built context depend clean distclean $(AOBJS): %$(OBJEXT): %.S $(call ASSEMBLE, $<, $@) @@ -85,13 +86,20 @@ $(BIN): $(OBJS) .built: $(BIN) -.depend: Makefile $(SRCS) - @$(MKDEP) $(ROOTDEPPATH) \ - $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep +# Register application + +.context: $(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main) @touch $@ -# Register application +context: .context + +# Create dependencies + +.depend: Makefile $(SRCS) + @$(MKDEP) $(ROOTDEPPATH) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep + @touch $@ + depend: .depend clean: @@ -99,6 +107,6 @@ clean: $(call CLEAN) distclean: clean - @rm -f Make.dep .depend + @rm -f .context Make.dep .depend -include Make.dep diff --git a/apps/vsn/poweroff/Makefile b/apps/vsn/poweroff/Makefile index d4fc2ed00..5337fd45b 100644 --- a/apps/vsn/poweroff/Makefile +++ b/apps/vsn/poweroff/Makefile @@ -70,6 +70,7 @@ ROOTDEPPATH = --dep-path . VPATH = all: .built +.PHONY: .built context depend clean distclean $(AOBJS): %$(OBJEXT): %.S $(call ASSEMBLE, $<, $@) @@ -85,13 +86,20 @@ $(BIN): $(OBJS) .built: $(BIN) -.depend: Makefile $(SRCS) - @$(MKDEP) $(ROOTDEPPATH) \ - $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep +# Register application + +.context: $(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main) @touch $@ -# Register application +context: .context + +# Create dependencies + +.depend: Makefile $(SRCS) + @$(MKDEP) $(ROOTDEPPATH) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep + @touch $@ + depend: .depend clean: @@ -99,6 +107,6 @@ clean: $(call CLEAN) distclean: clean - @rm -f Make.dep .depend + @rm -f .context Make.dep .depend -include Make.dep diff --git a/apps/vsn/ramtron/Makefile b/apps/vsn/ramtron/Makefile index c9aeae651..440af1ceb 100644 --- a/apps/vsn/ramtron/Makefile +++ b/apps/vsn/ramtron/Makefile @@ -70,6 +70,7 @@ ROOTDEPPATH = --dep-path . VPATH = all: .built +.PHONY: .built context depend clean distclean $(AOBJS): %$(OBJEXT): %.S $(call ASSEMBLE, $<, $@) @@ -85,13 +86,20 @@ $(BIN): $(OBJS) .built: $(BIN) -.depend: Makefile $(SRCS) - @$(MKDEP) $(ROOTDEPPATH) \ - $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep +# Register application + +.context: $(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main) @touch $@ -# Register application +context: .context + +# Create dependencies + +.depend: Makefile $(SRCS) + @$(MKDEP) $(ROOTDEPPATH) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep + @touch $@ + depend: .depend clean: @@ -99,6 +107,6 @@ clean: $(call CLEAN) distclean: clean - @rm -f Make.dep .depend + @rm -f .context Make.dep .depend -include Make.dep diff --git a/apps/vsn/sdcard/Makefile b/apps/vsn/sdcard/Makefile index ea0f51f35..3a7454140 100644 --- a/apps/vsn/sdcard/Makefile +++ b/apps/vsn/sdcard/Makefile @@ -70,6 +70,7 @@ ROOTDEPPATH = --dep-path . VPATH = all: .built +.PHONY: .built context depend clean distclean $(AOBJS): %$(OBJEXT): %.S $(call ASSEMBLE, $<, $@) @@ -85,13 +86,20 @@ $(BIN): $(OBJS) .built: $(BIN) -.depend: Makefile $(SRCS) - @$(MKDEP) $(ROOTDEPPATH) \ - $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep +# Register application + +.context: $(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main) @touch $@ -# Register application +context: .context + +# Create dependencies + +.depend: Makefile $(SRCS) + @$(MKDEP) $(ROOTDEPPATH) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep + @touch $@ + depend: .depend clean: @@ -99,6 +107,6 @@ clean: $(call CLEAN) distclean: clean - @rm -f Make.dep .depend + @rm -f .context Make.dep .depend -include Make.dep |