X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=ROM2%2FMakefile;h=e826b4f764bd72497269bdfdad9c67aedc0667d8;hb=ffa093e0175ab05ab7443754b3fc5894040a6006;hp=49c8f89e88999e9fc99cc92b31db6f7000625ce7;hpb=24f4e50d8f5671b40d2662bbcd50e3859bcd5205;p=uccvend-snackrom.git diff --git a/ROM2/Makefile b/ROM2/Makefile index 49c8f89..e826b4f 100644 --- a/ROM2/Makefile +++ b/ROM2/Makefile @@ -7,7 +7,7 @@ OBJS = \ 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 \ - -msoft-reg-count=0 -ffixed-z -g #-fomit-frame-pointer + -msoft-reg-count=0 -ffixed-z -g -fomit-frame-pointer LDFLAGS = -m68hc11 -mshort -Wl,-m,m68hc11elfb \ -nostartfiles \ @@ -35,7 +35,7 @@ OBJCOPY = $(DEVC_PREFIX)objcopy OBJDUMP = $(DEVC_PREFIX)objdump LD = $(DEVC_PREFIX)ld -all: rom2.b rom2.elf rom2.s19 +all: rom2.b rom2.elf rom2.s19 crctest rom2.elf: $(OBJS) memory.x check-romsrc.pl $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBADD) @@ -43,7 +43,10 @@ rom2.elf: $(OBJS) memory.x check-romsrc.pl @perl -w check-romsrc.pl clean: - rm -f *.o *.elf *.s19 *.b *.a rom.tar.bz2 romsrc.s crctab.h m68hc11-gdb gencrctab + rm -f *.o *.elf *.s19 *.b *.a rom.tar.bz2 romsrc.s crctab.h m68hc11-gdb gencrctab crctest + +crctest: crctest.c crctab.h + gcc -o $@ $< # # Some useful rules @@ -56,26 +59,19 @@ 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 < $< > $@ xmodem.c: crctab.h -gencrctab: gencrctab.c - gcc -o $@ $< - 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 -# +gencrctab: gencrctab.c + gcc -o $@ $< + .SUFFIXES: .elf .s19 .b .elf.s19: