]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - support/make/pxa27x/pxa27x.rules
added one more level of redirection for building the StorageVolume.h file. This...
[tinyos-2.x.git] / support / make / pxa27x / pxa27x.rules
index eea096cb79637870893c08bc0b679e1a2e8dc644..c40d39d1cee025d7f94b6e9de31a2a485e03bd07 100644 (file)
@@ -54,12 +54,19 @@ $(if $(PROGRAM),,$(call TOSMake_include,pxa27x/$(DEFAULT_PROGRAM).extra))
 
 # Build storage file if volumes.xml present
 ifneq ($(wildcard $(VOLUME_FILE)), )
-exe0: $(BUILDDIR)/StorageVolumes.h
+build_storage: $(BUILDDIR)/StorageVolumes.h
 
-$(BUILDDIR)/StorageVolumes.h: $(VOLUME_FILE)
-       $(VOLUME_ALLOCATOR) <$(VOLUME_FILE) >$@
+exe0: build_storage
+
+VOLUME_ALLOCATOR_FLAGS ?= 
+$(BUILDDIR)/StorageVolumes.h: $(VOLUMEFILE)
+       $(VOLUME_ALLOCATOR) $(VOLUME_ALLOCATOR_FLAGS) $(PLATFORMDIR) <$(VOLUMEFILE) >$@ || rm -f $@
 
 PFLAGS += -I$(BUILDDIR)
+else
+
+build_storage: 
+
 endif
 
 ifndef BUILD_DEPS