Merging upstream version 6.00~pre5+dfsg.
[syslinux-debian/hramrach.git] / memdump / Makefile
blobae2b3f0eaf6beb0d4d03f085a87095f8bbcc49eb
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 VPATH = $(SRC)
18 include $(MAKEDIR)/embedded.mk
20 CFLAGS += -mregparm=3 -DREGPARM=3
22 OPTFLAGS =
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
33 TARGETS = memdump.com
35 all: $(TARGETS)
37 tidy dist:
38 -rm -f *.o *.i *.s *.a .*.d *.tmp *.elf
40 clean: tidy
42 spotless: clean
43 -rm -f *~ $(TARGETS)
45 installer:
47 memdump.elf: $(OBJS) libcom.a
48 $(LD) $(LDFLAGS) -o $@ $^
50 libcom.a: $(LIBOBJS)
51 -rm -f $@
52 $(AR) cq $@ $^
53 $(RANLIB) $@
55 memdump.com: memdump.elf
56 $(OBJCOPY) -O binary $< $@
58 %.o: %.c
59 $(CC) $(MAKEDEPS) $(CFLAGS) -c -o $@ $<
60 %.i: %.c
61 $(CC) $(MAKEDEPS) $(CFLAGS) -E -o $@ $<
62 %.s: %.c
63 $(CC) $(MAKEDEPS) $(CFLAGS) -S -o $@ $<
64 %.o: %.S
65 $(CC) $(MAKEDEPS) $(SFLAGS) -c -o $@ $<
66 %.s: %.S
67 $(CC) $(MAKEDEPS) $(SFLAGS) -E -o $@ $<
69 -include .*.d *.tmp