Handle mid-track resumes in RM.
[kugel-rb.git] / flash / minimon / Makefile
blob16b6c2724eabba414a6b4e6c73286fb7a5bf347c
1 # __________ __ ___.
2 # Open \______ \ ____ ____ | | _\_ |__ _______ ___
3 # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
4 # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
5 # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
6 # \/ \/ \/ \/ \/
7 # $Id$
10 CC = sh-elf-gcc
11 LD = sh-elf-ld
12 AR = sh-elf-ar
13 AS = sh-elf-as
14 OC = sh-elf-objcopy
16 FIRMWARE := ../../firmware
17 TOOLSDIR=../../tools
19 TARGET = minimon
20 LDS := $(TARGET).lds
22 INCLUDES= -I$(FIRMWARE)/export -I. -I$(OBJDIR)
23 OBJDIR := .
25 CFLAGS = -fpic -O -W -Wall -m1 -nostdlib -ffreestanding -Wstrict-prototypes -fomit-frame-pointer -fschedule-insns $(INCLUDES) $(DEFINES)
26 AFLAGS += -small -relax
29 ifdef DEBUG
30 DEFINES := -DDEBUG
31 CFLAGS += -g
32 endif
34 SRC := $(wildcard *.c)
36 OBJS := $(SRC:%.c=$(OBJDIR)/%.o)
38 LINKFILE = $(OBJDIR)/$(TARGET).lds
41 $(OBJDIR)/$(TARGET).bin : $(OBJDIR)/$(TARGET).elf
42 $(OC) -O binary $(OBJDIR)/$(TARGET).elf $(OBJDIR)/$(TARGET).bin
43 $(TOOLSDIR)/sh2d $(OBJDIR)/$(TARGET).bin -o 0x0ffff000 > $(OBJDIR)/$(TARGET).asm
45 $(OBJDIR)/$(TARGET).elf : $(OBJS)
46 $(CC) -Os -nostdlib -o $(OBJDIR)/$(TARGET).elf -L$(OBJDIR) -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/$(TARGET).map
49 clean:
50 -rm -f $(OBJS) $(OBJDIR)/$(TARGET).asm \
51 $(OBJDIR)/$(TARGET).bin \
52 $(OBJDIR)/$(TARGET).elf \
53 $(OBJDIR)/$(TARGET).map