Prepend user to subject string
[kugel-rb.git] / firmware / win32.mak
blob80165c2c81e017e2f3da19fb4709132df26b3ac5
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
15 TOOLSDIR = ../tools
17 INCLUDES=-Iinclude -I. -Icommon -Idrivers -Iexport
19 # Pick a target to build for
20 TARGET=-DARCHOS_RECORDER=1
21 ifdef RECORDER
22 TARGET=-DARCHOS_RECORDER=1
23 else
24 ifdef PLAYER
25 TARGET=-DARCHOS_PLAYER=1
26 else
27 ifdef PLAYER_OLD
28 TARGET=-DARCHOS_PLAYER_OLD=1
29 endif
30 endif
31 endif
33 # store output files in this directory:
34 OBJDIR = .
36 # use propfonts?
37 ifdef PROPFONTS
38 CFLAGS = -W -Wall -O -m1 -nostdlib -Wstrict-prototypes $(INCLUDES) $(TARGET) -DLCD_PROPFONTS
39 else
40 CFLAGS = -W -Wall -O -m1 -nostdlib -Wstrict-prototypes $(INCLUDES) $(TARGET)
41 endif
43 ifdef DEBUG
44 CFLAGS += -g -DDEBUG
45 else
46 CFLAGS += -fomit-frame-pointer -fschedule-insns
47 endif
49 SRC := $(wildcard drivers/*.c common/*.c malloc/*.c *.c)
51 OBJS := $(SRC:%.c=$(OBJDIR)/%.o) $(OBJDIR)/crt0.o $(OBJDIR)/bitswap.o
52 DEPS:=.deps
53 DEPDIRS:=$(DEPS) $(DEPS)/drivers $(DEPS)/common $(DEPS)/malloc
55 ifndef PLAYER
56 ifndef PLAYER_OLD
57 OBJS += $(OBJDIR)/sysfont.o
58 endif
59 endif
61 OUTPUT = $(OBJDIR)/librockbox.a
63 $(OUTPUT): $(OBJS)
64 $(AR) ruv $@ $+
66 $(OBJDIR)/%.o: %.c
67 $(CC) $(CFLAGS) -c $< -o $@
69 $(OBJDIR)/%.o: %.S
70 $(CC) $(CFLAGS) -c $< -o $@
72 $(OBJDIR)/sysfont.o: fonts/clR6x8.bdf
73 $(TOOLSDIR)/convbdf -c -o $(OBJDIR)/sysfont.c $<
74 $(CC) $(CFLAGS) -c $(OBJDIR)/sysfont.c -o $@
76 clean:
77 -rm -f $(OBJS) $(OUTPUT) sysfont.c
79 # Special targets
80 $(OBJDIR)/thread.o: thread.c export/thread.h
81 $(CC) -c -O -fomit-frame-pointer $(CFLAGS) $< -o $@
83 -include $(SRC:%.c=$(OBJDIR)/$(DEPS)/%.d)