diff options
Diffstat (limited to 'firmware/win32.mak')
-rw-r--r-- | firmware/win32.mak | 59 |
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 | |||
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 | ||
15 | |||
16 | INCLUDES=-Iinclude -I. -Icommon -Idrivers | ||
17 | |||
18 | # Pick a target to build for | ||
19 | #TARGET = -DARCHOS_PLAYER=1 | ||
20 | #TARGET = -DARCHOS_PLAYER_OLD=1 | ||
21 | TARGET = -DARCHOS_RECORDER=1 | ||
22 | |||
23 | # store output files in this directory: | ||
24 | OBJDIR = . | ||
25 | |||
26 | CFLAGS = -W -Wall -O -m1 -nostdlib -Wstrict-prototypes $(INCLUDES) $(TARGET) -DLCD_PROPFONTS | ||
27 | |||
28 | ifdef DEBUG | ||
29 | CFLAGS += -g -DDEBUG | ||
30 | else | ||
31 | CFLAGS += -fomit-frame-pointer -fschedule-insns | ||
32 | endif | ||
33 | |||
34 | SRC := $(wildcard drivers/*.c common/*.c malloc/*.c *.c) | ||
35 | |||
36 | OBJS := $(SRC:%.c=$(OBJDIR)/%.o) $(OBJDIR)/crt0.o | ||
37 | DEPS:=.deps | ||
38 | DEPDIRS:=$(DEPS) $(DEPS)/drivers $(DEPS)/common $(DEPS)/malloc | ||
39 | |||
40 | OUTPUT = $(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 | |||
51 | clean: | ||
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) | ||