1 ## -----------------------------------------------------------------------
3 ## Copyright 2001-2008 H. Peter Anvin - All Rights Reserved
5 ## This program is free software; you can redistribute it and/or modify
6 ## it under the terms of the GNU General Public License as published by
7 ## the Free Software Foundation, Inc., 53 Temple Place Ste 330,
8 ## Boston MA 02111-1307, USA; either version 2 of the License, or
9 ## (at your option) any later version; incorporated herein by reference.
11 ## -----------------------------------------------------------------------
14 ## memory dump utility
18 MAKEDIR = $(topdir)/mk
19 include $(MAKEDIR)/embedded.mk
22 INCLUDES = -include code16.h -I.
25 SRCS = main.c serial.c ymsend.c srecsend.c
26 OBJS = crt0.o $(patsubst %.c,%.o,$(notdir $(SRCS)))
27 LIBOBJS = conio.o memcpy.o memset.o skipatou.o strtoul.o \
28 argv.o printf.o __divdi3.o __udivmoddi4.o
30 .SUFFIXES: .c .o .i .s .S .elf .com
37 -rm -f *.o *.i *.s *.a .*.d *.tmp *.elf
46 memdump.elf: $(OBJS) libcom.a
47 $(LD) $(LDFLAGS) -o $@ $^
54 memdump.com: memdump.elf
55 $(OBJCOPY) -O binary $< $@
58 $(CC) $(MAKEDEPS) $(CFLAGS) -c -o $@ $<
60 $(CC) $(MAKEDEPS) $(CFLAGS) -E -o $@ $<
62 $(CC) $(MAKEDEPS) $(CFLAGS) -S -o $@ $<
64 $(CC) $(MAKEDEPS) $(SFLAGS) -c -o $@ $<
66 $(CC) $(MAKEDEPS) $(SFLAGS) -E -o $@ $<