diff options
Diffstat (limited to 'gdb/Makefile')
-rw-r--r-- | gdb/Makefile | 24 |
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 | |||
10 | ifdef RECORDER | ||
11 | EXTRA = -DRECORDER | ||
12 | EXT = ajz | ||
13 | else | ||
14 | EXT = mod | ||
15 | endif | ||
16 | |||
9 | TARGET = stub | 17 | TARGET = stub |
10 | OBJS = start.o sh-stub.o | 18 | OBJS = start.o sh-stub.o setjmp.o |
11 | LIBS = -lgcc | 19 | LIBS = -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 | ||
19 | archos.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 | ||
26 | clean: | 37 | clean: |
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 | ||
29 | start.o: start.s | 40 | start.o: start.s |
30 | sh-stub.o: sh-stub.c | 41 | sh-stub.o: sh-stub.c |
42 | setjmp.o: setjmp.S | ||