summaryrefslogtreecommitdiffstats
path: root/flash/minimon/Makefile
diff options
context:
space:
mode:
authorJörg Hohensohn <hohensoh@rockbox.org>2003-11-30 11:37:43 +0000
committerJörg Hohensohn <hohensoh@rockbox.org>2003-11-30 11:37:43 +0000
commit6a4e4c87c24455e18bbd77565cb3e993ee350618 (patch)
tree6f2ceac4da97aa63ff8deef939bd3cc2d56d3466 /flash/minimon/Makefile
parent014c4fa1f8d56850cfd504a90221c293e4a158f6 (diff)
downloadrockbox-6a4e4c87c24455e18bbd77565cb3e993ee350618.tar.gz
rockbox-6a4e4c87c24455e18bbd77565cb3e993ee350618.tar.bz2
rockbox-6a4e4c87c24455e18bbd77565cb3e993ee350618.zip
source code for all my flash stuff, now finally in cvs
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4083 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'flash/minimon/Makefile')
-rw-r--r--flash/minimon/Makefile53
1 files changed, 53 insertions, 0 deletions
diff --git a/flash/minimon/Makefile b/flash/minimon/Makefile
new file mode 100644
index 0000000000..57ae13e940
--- /dev/null
+++ b/flash/minimon/Makefile
@@ -0,0 +1,53 @@
+# __________ __ ___.
+# Open \______ \ ____ ____ | | _\_ |__ _______ ___
+# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
+# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
+# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
+# \/ \/ \/ \/ \/
+# $Id$
+#
+
+CC = sh-elf-gcc
+LD = sh-elf-ld
+AR = sh-elf-ar
+AS = sh-elf-as
+OC = sh-elf-objcopy
+
+FIRMWARE := ../../firmware
+TOOLSDIR=../../tools
+
+TARGET = minimon
+LDS := $(TARGET).lds
+
+INCLUDES= -I$(FIRMWARE)/export -I. -I$(OBJDIR)
+OBJDIR := .
+
+CFLAGS = -fpic -O -W -Wall -m1 -nostdlib -ffreestanding -Wstrict-prototypes -fomit-frame-pointer -fschedule-insns $(INCLUDES) $(DEFINES)
+AFLAGS += -small -relax
+
+
+ifdef DEBUG
+ DEFINES := -DDEBUG
+ CFLAGS += -g
+endif
+
+SRC := $(wildcard *.c)
+
+OBJS := $(SRC:%.c=$(OBJDIR)/%.o)
+
+LINKFILE = $(OBJDIR)/$(TARGET).lds
+
+
+$(OBJDIR)/$(TARGET).bin : $(OBJDIR)/$(TARGET).elf
+ $(OC) -O binary $(OBJDIR)/$(TARGET).elf $(OBJDIR)/$(TARGET).bin
+ $(TOOLSDIR)/sh2d $(OBJDIR)/$(TARGET).bin -o 0900000 > $(OBJDIR)/$(TARGET).asm
+
+$(OBJDIR)/$(TARGET).elf : $(OBJS)
+ $(CC) -Os -nostdlib -o $(OBJDIR)/$(TARGET).elf -L$(OBJDIR) -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/$(TARGET).map
+
+
+clean:
+ -rm -f $(OBJS) $(OBJDIR)/$(TARGET).asm \
+ $(OBJDIR)/$(TARGET).bin \
+ $(OBJDIR)/$(TARGET).elf \
+ $(OBJDIR)/$(TARGET).map