Merge branch 'master' of git://git.gag.com/fw/altos
[fw/altos] / src / Makefile.proto
index 4f4252ad2848d5cb1043baf2db36246ea21b4a8a..b23eb2571255cdfea257e88c386393b0869a4ab7 100644 (file)
@@ -10,7 +10,7 @@ vpath ao-make-product.5c ..
 CC=sdcc
 
 ifndef VERSION
-VERSION=$(shell git describe)
+include ../Version
 endif
 
 CFLAGS=--model-small --debug --opt-code-speed
@@ -35,6 +35,7 @@ ALTOS_SRC = \
        ao_panic.c \
        ao_task.c \
        ao_timer.c \
+       ao_romconfig.c \
        _bp.c
 
 #
@@ -207,14 +208,14 @@ quiet ?= $($1)
 all: ../$(PROG)
 
 ../$(PROG): $(REL) Makefile Makefile.defs ../Makefile.proto
-       $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(REL) && mv $(PROG) ..
-       $(call quiet,CHECK_STACK) ../ao.h $(@F:.ihx=.mem)
+       $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(REL) && cp $(PROG) $(PMAP) ..
+       $(call quiet,CHECK_STACK) ../ao.h $(PMEM)
 
 ../altitude.h: make-altitude
        nickle $< > $@
 
-ao_product.h: ao-make-product.5c
-       $(call quiet,NICKLE,$<) $< -m altusmetrum.org -p $(PRODUCT) -v $(VERSION) > $@
+ao_product.h: ao-make-product.5c ../Version
+       $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@
 
 ao_product.rel: ao_product.c ao_product.h
        $(call quiet,CC) -c $(CFLAGS) -D PRODUCT_DEFS='\"ao_product.h\"' -o$@ $<