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 include $(MAKEDIR
)/embedded.mk
20 CFLAGS
+= -mregparm
=3 -DREGPARM
=3
23 INCLUDES
= -include $(SRC
)/code16.h
-I
$(SRC
)
24 LDFLAGS
= -T
$(SRC
)/com16.
ld
26 SRCS
= main.c serial.c ymsend.c srecsend.c
27 OBJS
= crt0.o
$(patsubst %.c
,%.o
,$(notdir $(SRCS
)))
28 LIBOBJS
= conio.o memcpy.o memset.o skipatou.o strtoul.o \
29 argv.o printf.o __divdi3.o __udivmoddi4.o
31 .SUFFIXES
: .c .o .i .s .S .elf .com
38 -rm -f
*.o
*.i
*.s
*.a .
*.d
*.tmp
*.elf
47 memdump.elf
: $(OBJS
) libcom.a
48 $(LD
) $(LDFLAGS
) -o
$@
$^
55 memdump.com
: memdump.elf
56 $(OBJCOPY
) -O binary
$< $@
59 $(CC
) $(MAKEDEPS
) $(CFLAGS
) -c
-o
$@
$<
61 $(CC
) $(MAKEDEPS
) $(CFLAGS
) -E
-o
$@
$<
63 $(CC
) $(MAKEDEPS
) $(CFLAGS
) -S
-o
$@
$<
65 $(CC
) $(MAKEDEPS
) $(SFLAGS
) -c
-o
$@
$<
67 $(CC
) $(MAKEDEPS
) $(SFLAGS
) -E
-o
$@
$<