summaryrefslogtreecommitdiff
path: root/firmware/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/Makefile')
-rw-r--r--firmware/Makefile13
1 files changed, 11 insertions, 2 deletions
diff --git a/firmware/Makefile b/firmware/Makefile
index 69a27a1b40..eb173848f3 100644
--- a/firmware/Makefile
+++ b/firmware/Makefile
@@ -15,6 +15,8 @@ OC = sh-elf-objcopy
15 15
16INCLUDES=-Iinclude -I. -Icommon -Idrivers 16INCLUDES=-Iinclude -I. -Icommon -Idrivers
17 17
18SYSTEM_FONT = fonts/alt6x10.bdf
19
18# Pick a target to build for 20# Pick a target to build for
19TARGET = -DARCHOS_PLAYER=1 21TARGET = -DARCHOS_PLAYER=1
20#TARGET = -DARCHOS_PLAYER_OLD=1 22#TARGET = -DARCHOS_PLAYER_OLD=1
@@ -23,7 +25,7 @@ TARGET = -DARCHOS_PLAYER=1
23# store output files in this directory: 25# store output files in this directory:
24OBJDIR = . 26OBJDIR = .
25 27
26CFLAGS = -W -Wall -O -m1 -nostdlib -Wstrict-prototypes $(INCLUDES) $(TARGET) 28CFLAGS = -W -Wall -O -m1 -nostdlib -Wstrict-prototypes $(INCLUDES) $(TARGET) $(EXTRA_DEFINES)
27 29
28ifdef DEBUG 30ifdef DEBUG
29CFLAGS += -g -DDEBUG 31CFLAGS += -g -DDEBUG
@@ -39,7 +41,11 @@ DEPDIRS:=$(DEPS) $(DEPS)/drivers $(DEPS)/common $(DEPS)/malloc
39 41
40OUTPUT = $(OBJDIR)/librockbox.a 42OUTPUT = $(OBJDIR)/librockbox.a
41 43
42$(OUTPUT): $(OBJS) 44ifdef LOADABLE_FONTS
45 EXTRA_TARGETS = $(OBJDIR)/system.ajf
46endif
47
48$(OUTPUT): $(OBJS) $(EXTRA_TARGETS)
43 $(AR) ruv $@ $+ 49 $(AR) ruv $@ $+
44 50
45$(OBJDIR)/%.o: %.c 51$(OBJDIR)/%.o: %.c
@@ -50,6 +56,9 @@ $(OBJDIR)/%.o: %.S
50 @mkdir -p `dirname $@` 56 @mkdir -p `dirname $@`
51 $(CC) $(CFLAGS) -c $< -o $@ 57 $(CC) $(CFLAGS) -c $< -o $@
52 58
59$(OBJDIR)/system.ajf: ../tools/bdf2ajf $(SYSTEM_FONT)
60 ../tools/bdf2ajf -f $(SYSTEM_FONT) -o $(OBJDIR)/system.ajf
61
53clean: 62clean:
54 rm -f $(OBJS) $(OUTPUT) 63 rm -f $(OBJS) $(OUTPUT)
55 rm -rf $(OBJDIR)/$(DEPS) 64 rm -rf $(OBJDIR)/$(DEPS)