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
22 $(CC
) -o
$@
$(CFLAGS
) $(INCLUDES
) $(DEFS
) $(ASMFLAGS
) -c
$<
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
43 tar czvf
dist.
tar.gz Makefile main.c start.s app.lds
46 -rm -f
$(OBJS
) *.s
*.x
*.i
*.o
*.elf
*.bin
*.map
*.mod
*.bak
*~
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
) $<