blob: 9866796a5c6392084be163eddf88f856108f4a61 [file] [log] [blame]
Linus Nielsen Feltzing257d17d2002-04-20 23:18:14 +00001CC = sh-elf-gcc
2LD = sh-elf-ld
3AR = sh-elf-ar
4AS = sh-elf-as
5OC = sh-elf-objcopy
6
7INCLUDES=-I../../
8
9CFLAGS = -g -Wall -m1 -nostdlib -Wstrict-prototypes -fomit-frame-pointer -fschedule-insns -fno-builtin $(INCLUDES)
10AFLAGS += -small -relax
11
Linus Nielsen Feltzing75039572002-04-22 11:54:50 +000012OBJS= crt0.o main.o ../../i2c.o ../../mas.o ../../debug.o
Linus Nielsen Feltzing257d17d2002-04-20 23:18:14 +000013
14%.o: %.S
15 $(CC) -o $@ $(CFLAGS) $(INCLUDES) $(DEFS) -c $<
16
17
18all : archos.mod
19
20main.o: main.c
21
22archos.elf : $(OBJS) app.lds
23 $(CC) -nostartfiles -o archos.elf $(OBJS) -lgcc -Tapp.lds -Wl,-Map,archos.map
24
25archos.bin : archos.elf
26 $(OC) -O binary archos.elf archos.bin
27
28archos.asm: archos.bin
29 sh2d -sh1 archos.bin > archos.asm
30
31archos.mod : archos.bin
32 scramble archos.bin archos.mod
33
34archos.mod.gz : archos.mod
35 gzip -f archos.mod
36
37dist:
38 tar czvf dist.tar.gz Makefile main.c start.s app.lds
39
40clean:
41 -rm -f *.x *.i *.o *.elf *.bin *.map *.mod *.bak *~
42
43install:
44 mount /mnt/archos; cp archos.mod /mnt/archos; umount /mnt/archos