make all the RTC tokens in the skins be useable in conditionals (I dare anyone to...
[kugel-rb.git] / firmware / firmware.make
blobec24b4ebeeae978f910aeb985a53d8e96d0beb43
1 # __________ __ ___.
2 # Open \______ \ ____ ____ | | _\_ |__ _______ ___
3 # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
4 # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
5 # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
6 # \/ \/ \/ \/ \/
7 # $Id$
10 INCLUDES += -I$(FIRMDIR) -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers
12 FIRMLIB_SRC += $(call preprocess, $(FIRMDIR)/SOURCES)
13 FIRMLIB_OBJ := $(call c2obj, $(FIRMLIB_SRC))
14 ifeq (,$(findstring -DARCHOS_PLAYER,$(TARGET)))
15 FIRMLIB_OBJ += $(BUILDDIR)/sysfont.o
16 endif
17 OTHER_SRC += $(FIRMLIB_SRC)
19 FIRMLIB = $(BUILDDIR)/firmware/libfirmware.a
21 SYSFONT = $(ROOTDIR)/fonts/08-Schumacher-Clean.bdf
23 CLEANOBJS += $(BUILDDIR)/sysfont.*
25 # Limits for the built-in sysfont: ASCII for bootloaders, ISO8859-1 for normal builds
26 ifneq (,$(findstring -DBOOTLOADER,$(EXTRA_DEFINES)))
27 MAXCHAR = 127
28 else
29 MAXCHAR = 255
30 endif
32 $(FIRMLIB): $(FIRMLIB_OBJ)
33 $(SILENT)$(shell rm -f $@)
34 $(call PRINTS,AR $(@F))$(AR) rcs $@ $^ >/dev/null
36 $(BUILDDIR)/sysfont.h: $(SYSFONT) $(TOOLS)
37 $(call PRINTS,CONVBDF $(subst $(ROOTDIR)/,,$<))$(TOOLSDIR)/convbdf -l $(MAXCHAR) -h -o $@ $<
39 $(BUILDDIR)/sysfont.o: $(SYSFONT) $(BUILDDIR)/sysfont.h
40 $(call PRINTS,CONVBDF $(subst $(ROOTDIR)/,,$<))$(TOOLSDIR)/convbdf -l $(MAXCHAR) -c -o $(BUILDDIR)/sysfont.c $<
41 $(call PRINTS,CC $(subst $(ROOTDIR)/,,$(BUILDDIR)/sysfont.c))$(CC) $(CFLAGS) -c $(BUILDDIR)/sysfont.c -o $@