as3514: mute headphones at the lowest volume
[kugel-rb.git] / firmware / test / kernel / Makefile
blobbe82abfcb9dfb034c6803ac77ed7d359df499f31
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
7 INCLUDES=-I../../ -I../../drivers
9 # Pick a target to build for
10 #TARGET = -DARCHOS_PLAYER=1
11 TARGET = -DARCHOS_PLAYER_OLD=1
12 #TARGET = -DARCHOS_RECORDER=1
14 CFLAGS = -g -Wall -m1 -save-temps -nostdlib -Wstrict-prototypes -fschedule-insns -fno-builtin $(INCLUDES) $(TARGET) -DDEBUG
15 AFLAGS += -small -relax
17 OBJS= ../../crt0.o ../../system.o main.o ../../panic.o ../../drivers/lcd.o \
18 thread.o ../../kernel.o ../../drivers/led.o \
19 ../../debug.o ../../common/sprintf.o
21 %.o: %.S
22 $(CC) -o $@ $(CFLAGS) $(INCLUDES) $(DEFS) -c $<
25 all : archos.mod
27 archos.elf : $(OBJS) app.lds
28 $(CC) -nostartfiles -o archos.elf $(OBJS) -lgcc -Tapp.lds -Wl,-Map,archos.map
30 archos.bin : archos.elf
31 $(OC) -O binary archos.elf archos.bin
33 archos.asm: archos.bin
34 sh2d -sh1 archos.bin > archos.asm
36 archos.mod : archos.bin
37 scramble archos.bin archos.mod
39 archos.mod.gz : archos.mod
40 gzip -f archos.mod
42 dist:
43 tar czvf dist.tar.gz Makefile main.c start.s app.lds
45 clean:
46 -rm -f $(OBJS) *.s *.x *.i *.o *.elf *.bin *.map *.mod *.bak *~
48 install:
49 mount /mnt/archos; cp archos.mod /mnt/archos; umount /mnt/archos
51 thread.o: ../../thread.c
52 $(CC) -O -fomit-frame-pointer -c $(CFLAGS) $<