2008-11-20 11:27:31 +00:00
|
|
|
# __________ __ ___.
|
|
|
|
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
|
|
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
|
|
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
|
|
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
|
|
# \/ \/ \/ \/ \/
|
2008-11-25 19:54:23 +00:00
|
|
|
# $Id$
|
2008-11-20 11:27:31 +00:00
|
|
|
#
|
|
|
|
|
2013-12-04 16:06:17 +00:00
|
|
|
INCLUDES += -I$(FIRMDIR) -I$(FIRMDIR)/export -I$(FIRMDIR)/drivers \
|
|
|
|
-I$(FIRMDIR)/include -I$(FIRMDIR)/kernel/include
|
2010-07-10 13:49:49 +00:00
|
|
|
ifndef APP_TYPE
|
2010-05-14 12:37:05 +00:00
|
|
|
INCLUDES += -I$(FIRMDIR)/libc/include
|
|
|
|
endif
|
2008-11-20 11:27:31 +00:00
|
|
|
|
2012-01-07 18:49:02 +00:00
|
|
|
include $(FIRMDIR)/asm/asm.make
|
|
|
|
|
2008-11-20 11:27:31 +00:00
|
|
|
FIRMLIB_SRC += $(call preprocess, $(FIRMDIR)/SOURCES)
|
|
|
|
FIRMLIB_OBJ := $(call c2obj, $(FIRMLIB_SRC))
|
2020-07-15 23:40:55 +00:00
|
|
|
FIRMLIB_OBJ += $(BUILDDIR)/sysfont.o
|
2008-11-20 11:27:31 +00:00
|
|
|
OTHER_SRC += $(FIRMLIB_SRC)
|
|
|
|
|
|
|
|
FIRMLIB = $(BUILDDIR)/firmware/libfirmware.a
|
|
|
|
|
2020-08-31 17:31:00 +00:00
|
|
|
ifeq ($(SYSFONT),)
|
|
|
|
SYSFONT = 08-Schumacher-Clean
|
|
|
|
endif
|
|
|
|
SYSFONTX = $(ROOTDIR)/fonts/$(SYSFONT).bdf
|
2008-11-20 11:27:31 +00:00
|
|
|
|
2010-05-27 09:41:46 +00:00
|
|
|
CLEANOBJS += $(BUILDDIR)/sysfont.* $(BUILDDIR)/version.*
|
2008-11-20 11:27:31 +00:00
|
|
|
|
|
|
|
# Limits for the built-in sysfont: ASCII for bootloaders, ISO8859-1 for normal builds
|
|
|
|
ifneq (,$(findstring -DBOOTLOADER,$(EXTRA_DEFINES)))
|
|
|
|
MAXCHAR = 127
|
|
|
|
else
|
|
|
|
MAXCHAR = 255
|
|
|
|
endif
|
|
|
|
|
|
|
|
$(FIRMLIB): $(FIRMLIB_OBJ)
|
2008-11-20 16:49:55 +00:00
|
|
|
$(SILENT)$(shell rm -f $@)
|
2009-03-01 09:04:15 +00:00
|
|
|
$(call PRINTS,AR $(@F))$(AR) rcs $@ $^ >/dev/null
|
2008-11-20 11:27:31 +00:00
|
|
|
|
2020-08-31 17:31:00 +00:00
|
|
|
$(BUILDDIR)/sysfont.h: $(SYSFONTX) $(TOOLS) $(BUILDDIR)/firmware/common/config.o
|
2008-11-20 11:27:31 +00:00
|
|
|
$(call PRINTS,CONVBDF $(subst $(ROOTDIR)/,,$<))$(TOOLSDIR)/convbdf -l $(MAXCHAR) -h -o $@ $<
|
|
|
|
|
2020-08-31 17:31:00 +00:00
|
|
|
$(BUILDDIR)/sysfont.o: $(SYSFONTX) $(BUILDDIR)/sysfont.h
|
2008-11-20 11:27:31 +00:00
|
|
|
$(call PRINTS,CONVBDF $(subst $(ROOTDIR)/,,$<))$(TOOLSDIR)/convbdf -l $(MAXCHAR) -c -o $(BUILDDIR)/sysfont.c $<
|
|
|
|
$(call PRINTS,CC $(subst $(ROOTDIR)/,,$(BUILDDIR)/sysfont.c))$(CC) $(CFLAGS) -c $(BUILDDIR)/sysfont.c -o $@
|
|
|
|
|
2016-09-23 20:51:28 +00:00
|
|
|
# GNU make (at least) has a bug/feature that exported variable are not available
|
|
|
|
# in the shell function (but are in recipe). Thus we need to explicitely pass
|
|
|
|
# the VERSION environement variable
|
|
|
|
SVNVERSION:=$(shell VERSION='$(VERSION)' $(TOOLSDIR)/version.sh $(ROOTDIR))
|
2014-08-28 00:47:46 +00:00
|
|
|
OLDSVNVERSION:=$(shell grep 'RBVERSION' $(BUILDDIR)/rbversion.h 2>/dev/null|cut -d '"' -f 2 || echo "NOREVISION")
|
2010-06-20 23:54:21 +00:00
|
|
|
|
2019-07-19 13:16:37 +00:00
|
|
|
CORE_LIBS:=$(FIRMLIB)
|
|
|
|
|
2010-06-20 23:54:21 +00:00
|
|
|
ifneq ($(SVNVERSION),$(OLDSVNVERSION))
|
2014-08-28 00:47:46 +00:00
|
|
|
.PHONY: $(BUILDDIR)/rbversion.h
|
2010-06-20 23:54:21 +00:00
|
|
|
endif
|
|
|
|
|
2014-08-28 00:47:46 +00:00
|
|
|
$(BUILDDIR)/rbversion.h:
|
2016-09-23 20:51:28 +00:00
|
|
|
$(call PRINTS,GEN $(@F))$(TOOLSDIR)/genversion.sh $(BUILDDIR) $(SVNVERSION)
|