chain: Add DOS partition dumping routine for debugging
[hdt-cyring.git] / memdump / Makefile
blobe56c7bd4c4189110a570a4c9853c079b2a293f00
1 ## -----------------------------------------------------------------------
2 ##
3 ## Copyright 2001-2008 H. Peter Anvin - All Rights Reserved
4 ##
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
17 topdir = ..
18 include $(topdir)/MCONFIG.embedded
20 OPTFLAGS =
21 INCLUDES = -include code16.h -I.
22 LDFLAGS = -T com16.ld
24 SRCS = main.c serial.c ymsend.c srecsend.c
25 OBJS = crt0.o $(patsubst %.c,%.o,$(notdir $(SRCS)))
26 LIBOBJS = conio.o memcpy.o memset.o skipatou.o strtoul.o \
27 argv.o printf.o __divdi3.o __udivmoddi4.o
29 .SUFFIXES: .c .o .i .s .S .elf .com
31 TARGETS = memdump.com
33 all: $(TARGETS)
35 tidy dist:
36 -rm -f *.o *.i *.s *.a .*.d *.tmp *.elf
38 clean: tidy
40 spotless: clean
41 -rm -f *~ $(TARGETS)
43 installer:
45 memdump.elf: $(OBJS) libcom.a
46 $(LD) $(LDFLAGS) -o $@ $^
48 libcom.a: $(LIBOBJS)
49 -rm -f $@
50 $(AR) cq $@ $^
51 $(RANLIB) $@
53 memdump.com: memdump.elf
54 $(OBJCOPY) -O binary $< $@
56 %.o: %.c
57 $(CC) $(MAKEDEPS) $(CFLAGS) -c -o $@ $<
58 %.i: %.c
59 $(CC) $(MAKEDEPS) $(CFLAGS) -E -o $@ $<
60 %.s: %.c
61 $(CC) $(MAKEDEPS) $(CFLAGS) -S -o $@ $<
62 %.o: %.S
63 $(CC) $(MAKEDEPS) $(SFLAGS) -c -o $@ $<
64 %.s: %.S
65 $(CC) $(MAKEDEPS) $(SFLAGS) -E -o $@ $<
67 -include .*.d *.tmp