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