]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - support/make/pxa27x/pxa27x.rules
Merge over into the trunk.
[tinyos-2.x.git] / support / make / pxa27x / pxa27x.rules
index 11b08f1f70f5ac324fcf022e731c09d14ff6428e..2a9751797cea5323274b6e89ae895990c6ba7cff 100644 (file)
@@ -49,6 +49,16 @@ BUILDLESS_DEPS += bytes
 # out with call in there.  I don't know why.
 $(if $(PROGRAM),,$(call TOSMake_include,pxa27x/$(DEFAULT_PROGRAM).extra))
 
+# Build storage file if volumes.xml present
+ifneq ($(wildcard $(VOLUME_FILE)), )
+exe0: $(BUILDDIR)/StorageVolumes.h
+
+$(BUILDDIR)/StorageVolumes.h: $(VOLUME_FILE)
+       $(VOLUME_ALLOCATOR) <$(VOLUME_FILE) >$@
+
+PFLAGS += -I$(BUILDDIR)
+endif
+
 ifndef BUILD_DEPS
   ifeq ($(filter $(BUILDLESS_DEPS),$(GOALS)),)
     BUILD_DEPS = bin bytes $(POST_BUILD_EXTRA_DEPS)
@@ -77,7 +87,7 @@ builddir: FORCE
        mkdir -p $(BUILDDIR)
 
 bytes: FORCE
-       @objdump -h $(MAIN_EXE) | perl -ne '$$b{$$1}=hex $$2 if /^\s*\d+\s*\.(text|data|bss)\s+(\S+)/; END { printf("%16d bytes in ROM\n%16d bytes in RAM\n",$$b{text}+$$b{data},$$b{data}+$$b{bss}); }'
+       @$(OBJDUMP) -h $(MAIN_EXE) | perl -ne '$$b{$$1}=hex $$2 if /^\s*\d+\s*\.(text|data|bss)\s+(\S+)/; END { printf("%16d bytes in ROM\n%16d bytes in RAM\n",$$b{text}+$$b{data},$$b{data}+$$b{bss}); }'
 
 asms: 
        $(GAS) $(ASSEMBLY_FILES) -o $(BUILDDIR)/asms.o