summaryrefslogtreecommitdiff
path: root/gdb/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/Makefile')
-rw-r--r--gdb/Makefile24
1 files changed, 18 insertions, 6 deletions
diff --git a/gdb/Makefile b/gdb/Makefile
index 518217fc70..21c0cf8341 100644
--- a/gdb/Makefile
+++ b/gdb/Makefile
@@ -6,25 +6,37 @@
6# \/ \/ \/ \/ \/ 6# \/ \/ \/ \/ \/
7# $Id$ 7# $Id$
8# 8#
9
10ifdef RECORDER
11EXTRA = -DRECORDER
12EXT = ajz
13else
14EXT = mod
15endif
16
9TARGET = stub 17TARGET = stub
10OBJS = start.o sh-stub.o 18OBJS = start.o sh-stub.o setjmp.o
11LIBS = -lgcc 19LIBS = -lgcc
12 20
13.s.o: 21.s.o:
14 sh-elf-as -o $@ $< 22 sh-elf-as -o $@ $<
15 23
16.c.o: 24.c.o:
17 sh-elf-gcc -O -I../firmware/drivers -m1 -Wall -Wstrict-prototypes -c -o $@ $< 25 sh-elf-gcc -O $(EXTRA) -I../firmware/export -I../firmware/include -m1 -Wall -Wstrict-prototypes -c -o $@ $<
26
27.S.o:
28 sh-elf-gcc -O -I../firmware/export -I../firmware/include -m1 -Wall -Wstrict-prototypes -c -o $@ $<
18 29
19archos.mod: $(TARGET).elf 30$(TARGET).$(EXT): $(TARGET).elf
20 sh-elf-objcopy -O binary $(TARGET).elf $(TARGET).out 31 sh-elf-objcopy -O binary $(TARGET).elf $(TARGET).out
21 ../tools/scramble $(TARGET).out archos.mod 32 ../tools/scramble $(TARGET).out $(TARGET).$(EXT)
22 33
23$(TARGET).elf: $(OBJS) 34$(TARGET).elf: $(OBJS)
24 sh-elf-gcc -nostartfiles $(OBJS) -lgcc -Wl,-Map,$(TARGET).map -o $(TARGET).elf -Tlinker.cfg 35 sh-elf-gcc -nostartfiles $(OBJS) -nostdlib -Wl,-Map,$(TARGET).map -o $(TARGET).elf -Tlinker.cfg
25 36
26clean: 37clean:
27 rm $(OBJS) $(TARGET).map $(TARGET).elf $(TARGET).out archos.mod 38 rm $(OBJS) $(TARGET).map $(TARGET).elf $(TARGET).out $(TARGET).mod $(TARGET).ajz
28 39
29start.o: start.s 40start.o: start.s
30sh-stub.o: sh-stub.c 41sh-stub.o: sh-stub.c
42setjmp.o: setjmp.S