summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/win32.mak59
1 files changed, 59 insertions, 0 deletions
diff --git a/firmware/win32.mak b/firmware/win32.mak
new file mode 100644
index 0000000000..12f145c899
--- /dev/null
+++ b/firmware/win32.mak
@@ -0,0 +1,59 @@
1# __________ __ ___.
2# Open \______ \ ____ ____ | | _\_ |__ _______ ___
3# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
4# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
5# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
6# \/ \/ \/ \/ \/
7# $Id$
8#
9
10CC = sh-elf-gcc
11LD = sh-elf-ld
12AR = sh-elf-ar
13AS = sh-elf-as
14OC = sh-elf-objcopy
15
16INCLUDES=-Iinclude -I. -Icommon -Idrivers
17
18# Pick a target to build for
19#TARGET = -DARCHOS_PLAYER=1
20#TARGET = -DARCHOS_PLAYER_OLD=1
21TARGET = -DARCHOS_RECORDER=1
22
23# store output files in this directory:
24OBJDIR = .
25
26CFLAGS = -W -Wall -O -m1 -nostdlib -Wstrict-prototypes $(INCLUDES) $(TARGET) -DLCD_PROPFONTS
27
28ifdef DEBUG
29CFLAGS += -g -DDEBUG
30else
31CFLAGS += -fomit-frame-pointer -fschedule-insns
32endif
33
34SRC := $(wildcard drivers/*.c common/*.c malloc/*.c *.c)
35
36OBJS := $(SRC:%.c=$(OBJDIR)/%.o) $(OBJDIR)/crt0.o
37DEPS:=.deps
38DEPDIRS:=$(DEPS) $(DEPS)/drivers $(DEPS)/common $(DEPS)/malloc
39
40OUTPUT = $(OBJDIR)/librockbox.a
41
42$(OUTPUT): $(OBJS)
43 $(AR) ruv $@ $+
44
45$(OBJDIR)/%.o: %.c
46 $(CC) $(CFLAGS) -c $< -o $@
47
48$(OBJDIR)/%.o: %.S
49 $(CC) $(CFLAGS) -c $< -o $@
50
51clean:
52 rm -f $(OBJS) $(OUTPUT)
53 rm -rf $(OBJDIR)/$(DEPS)
54
55# Special targets
56$(OBJDIR)/thread.o: thread.c thread.h
57 $(CC) -c -O -fomit-frame-pointer $(CFLAGS) $< -o $@
58
59-include $(SRC:%.c=$(OBJDIR)/$(DEPS)/%.d)