diff options
Diffstat (limited to 'firmware/test/kernel/Makefile')
-rw-r--r-- | firmware/test/kernel/Makefile | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/firmware/test/kernel/Makefile b/firmware/test/kernel/Makefile new file mode 100644 index 0000000000..fdeb9b159b --- /dev/null +++ b/firmware/test/kernel/Makefile | |||
@@ -0,0 +1,42 @@ | |||
1 | CC = sh-elf-gcc | ||
2 | LD = sh-elf-ld | ||
3 | AR = sh-elf-ar | ||
4 | AS = sh-elf-as | ||
5 | OC = sh-elf-objcopy | ||
6 | |||
7 | INCLUDES=-I../../ | ||
8 | |||
9 | CFLAGS = -O -Wall -m1 -save-temps -nostdlib -Wstrict-prototypes -fomit-frame-pointer -fschedule-insns -fno-builtin $(INCLUDES) | ||
10 | AFLAGS += -small -relax | ||
11 | |||
12 | OBJS= crt0.o main.o ../../thread.o ../../debug.o | ||
13 | |||
14 | %.o: %.S | ||
15 | $(CC) -o $@ $(CFLAGS) $(INCLUDES) $(DEFS) -c $< | ||
16 | |||
17 | |||
18 | all : archos.mod | ||
19 | |||
20 | archos.elf : $(OBJS) app.lds | ||
21 | $(CC) -nostartfiles -o archos.elf $(OBJS) -lgcc -Tapp.lds -Wl,-Map,archos.map | ||
22 | |||
23 | archos.bin : archos.elf | ||
24 | $(OC) -O binary archos.elf archos.bin | ||
25 | |||
26 | archos.asm: archos.bin | ||
27 | sh2d -sh1 archos.bin > archos.asm | ||
28 | |||
29 | archos.mod : archos.bin | ||
30 | scramble archos.bin archos.mod | ||
31 | |||
32 | archos.mod.gz : archos.mod | ||
33 | gzip -f archos.mod | ||
34 | |||
35 | dist: | ||
36 | tar czvf dist.tar.gz Makefile main.c start.s app.lds | ||
37 | |||
38 | clean: | ||
39 | -rm -f *.x *.i *.o *.elf *.bin *.map *.mod *.bak *~ | ||
40 | |||
41 | install: | ||
42 | mount /mnt/archos; cp archos.mod /mnt/archos; umount /mnt/archos | ||