X-Git-Url: https://oss.titaniummirror.com/gitweb?a=blobdiff_plain;f=support%2Fmake%2Fnull%2Fnull.rules;h=58632258ea1efb344dcd616778fc1f48fa131586;hb=409a3bb13dabe16fbe0600a8127358e7e6b1b7a3;hp=d4313119002a2fd8899766b3c1b90e103c5a11ce;hpb=6aa36e3ec8bad9d8762e447d648cdbc25f31d6a4;p=tinyos-2.x.git diff --git a/support/make/null/null.rules b/support/make/null/null.rules index d4313119..58632258 100644 --- a/support/make/null/null.rules +++ b/support/make/null/null.rules @@ -15,12 +15,13 @@ OBJDUMP = objdump NCC = ncc LIBS = -lm -BUILDDIR = build/$(PLATFORM) +BUILDDIR ?= build/$(PLATFORM) MAIN_EXE = $(BUILDDIR)/main.exe MAIN_SREC = $(BUILDDIR)/main.srec MAIN_IHEX = $(BUILDDIR)/main.ihex INSTALL_SREC = $(MAIN_SREC).out$(if $(NODEID),-$(NODEID),) VOLUMEFILE = volumes-at45db.xml +VOLUME_ALLOCATOR ?= tos-storage-at45db PFLAGS += -Wall -Wshadow $(NESC_FLAGS) PFLAGS += -target=$(PLATFORM) -fnesc-cfile=$(BUILDDIR)/app.c @@ -36,12 +37,18 @@ BUILDLESS_DEPS += bytes # 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) - tos-storage-at45db <$(VOLUMEFILE) >$@ + $(VOLUME_ALLOCATOR) $(VOLUME_ALLOCATOR_FLAGS) <$(VOLUMEFILE) >$@ PFLAGS += -I$(BUILDDIR) +else + +build_storage: + endif ifndef BUILD_DEPS