General cruft removal
[uccvend-snackrom.git] / ROM2 / Makefile
index 38780bf..f3cfd3b 100644 (file)
@@ -3,7 +3,7 @@
 OBJS = \
        motors.o keypad.o display_basic.o coinmech.o chime.o \
        helpers.o main_basic.o sci.o \
-       vectors.o start.o romsrc.o xmodem.o
+       vectors.o start.o romsrc.o xmodem.o mic.o
 INCLUDES = vend.h keypad.h chime.h asm.h display_basic.h ports.h types.h
 # debugging doesn't get compiled into the ROM image
 CFLAGS = -m68hc11 -mshort -Wall -O1 \
@@ -11,6 +11,7 @@ CFLAGS = -m68hc11 -mshort -Wall -O1 \
 
 LDFLAGS = -m68hc11 -mshort -Wl,-m,m68hc11elfb \
          -nostartfiles \
+         -Wl,-defsym,_nvram=0x0800 \
          -Wl,-defsym,_io_ports=0x1000 \
          -Wl,-defsym,_switch_input=0x1800 \
          -Wl,-defsym,_misc_input=0x2000 \
@@ -36,9 +37,10 @@ LD = $(DEVC_PREFIX)ld
 
 all: rom2.b rom2.elf rom2.s19
 
-rom2.elf: $(OBJS) memory.x
+rom2.elf: $(OBJS) memory.x check-romsrc.pl
        $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBADD)
        $(SIZE) $@
+       @perl -w check-romsrc.pl
 
 clean:
        rm -f *.o *.elf *.s19 *.b *.a rom.tar.bz2 romsrc.s crctab.h m68hc11-gdb gencrctab
@@ -54,7 +56,7 @@ size:   rom2.s19
 
 rom.tar.bz2:
        rm -f romsrc.s crctab.h
-       tar cjf rom.tar.bz2 README Makefile gdbsimrc *.pl *.c *.h *.s *.x
+       tar c README Makefile gdbsimrc *.pl *.c *.h *.s *.x | bzip2 -c -9 > $@
 
 romsrc.s: rom.tar.bz2 src2asm.pl
        perl -w src2asm.pl < $< > $@
@@ -67,13 +69,6 @@ gencrctab: gencrctab.c
 crctab.h: gencrctab
        ./gencrctab > $@
 
-#
-# Implicit rules
-#
-# .elf is for the simulator and gdb
-# .s19 is for some downloader and the simulator
-# .b   is a binary dump
-#
 .SUFFIXES: .elf .s19 .b
 
 .elf.s19:

UCC git Repository :: git.ucc.asn.au