# Build storage file if volumes.xml present
ifneq ($(wildcard $(VOLUMEFILE)), )
-exe0: $(BUILDDIR)/StorageVolumes.h
+build_storage: $(BUILDDIR)/StorageVolumes.h
+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
clean: FORCE
rm -rf build $(CLEAN_EXTRA) pp
- rm -rf _TOSSIMmodule.so TOSSIM.pyc TOSSIM.py
+ rm -rf _TOSSIMmodule.so TOSSIM.pyc TOSSIM.py app.xml simbuild
+ rm -rf VolumeMapC.nc
# Build storage file if volumes.xml present
ifneq ($(wildcard $(VOLUME_FILE)), )
-exe0: $(BUILDDIR)/StorageVolumes.h
+build_storage: $(BUILDDIR)/StorageVolumes.h
+
+exe0: build_storage
VOLUME_ALLOCATOR_FLAGS ?=
$(BUILDDIR)/StorageVolumes.h: $(VOLUME_FILE)
$(VOLUME_ALLOCATOR) $(VOLUME_ALLOCATOR_FLAGS) $(PLATFORMDIR) <$(VOLUME_FILE) >$@ || rm -f $@
PFLAGS += -I$(BUILDDIR)
+else
+
+build_storage:
+
endif
ifndef BUILD_DEPS
# Build storage file if volumes.xml present
# We "steal" the at45db storage spec
ifneq ($(wildcard $(VOLUMEFILE)), )
-exe0: $(BUILDDIR)/StorageVolumes.h
+build_storage: $(BUILDDIR)/StorageVolumes.h
+
+exe0: build_storage
$(BUILDDIR)/StorageVolumes.h: $(VOLUMEFILE)
$(VOLUME_ALLOCATOR) $(VOLUME_ALLOCATOR_FLAGS) <$(VOLUMEFILE) >$@
PFLAGS += -I$(BUILDDIR)
+else
+
+build_storage:
+
endif
ifndef BUILD_DEPS
# 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