summaryrefslogtreecommitdiff
path: root/apps/lang/Makefile
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2008-02-17 23:12:54 +0000
committerDaniel Stenberg <daniel@haxx.se>2008-02-17 23:12:54 +0000
commit4a06c87e7869bb2703c0b0181d3816ba73dff9ff (patch)
tree5d9c1ea2e534337d548ec97568a23615a56e9d1b /apps/lang/Makefile
parent8c81e789cc7da214db5a5c1a3aa3698375a400e3 (diff)
downloadrockbox-4a06c87e7869bb2703c0b0181d3816ba73dff9ff.tar.gz
rockbox-4a06c87e7869bb2703c0b0181d3816ba73dff9ff.zip
FS#8482:
Build system tweak that builds all languages first, to make the system able to use a buffer size that fits the larger language only. Parts of this work done by Jonas Haggqvist, but all the mistakes are my own! git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16337 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/lang/Makefile')
-rw-r--r--apps/lang/Makefile37
1 files changed, 37 insertions, 0 deletions
diff --git a/apps/lang/Makefile b/apps/lang/Makefile
new file mode 100644
index 0000000000..31e839c1a1
--- /dev/null
+++ b/apps/lang/Makefile
@@ -0,0 +1,37 @@
1# __________ __ ___.
2# Open \______ \ ____ ____ | | _\_ |__ _______ ___
3# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
4# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
5# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
6# \/ \/ \/ \/ \/
7# $Id: Makefile 15615 2007-11-14 10:31:57Z jethead71 $
8#
9
10# the header we generate
11HEADER = $(BUILDDIR)/max_language_size.h
12
13# This sets up 'SRC' based on the files mentioned in SOURCES
14include $(TOOLSDIR)/makesrc.inc
15SOURCES=$(SRC)
16
17# OUTP is the list of files to depend upon
18OUTP = $(patsubst %.lang,$(OBJDIR)/%.lng, $(SOURCES))
19
20# the generated file with features specified genlang-style
21FEATS=$(BUILDDIR)/apps/genlang-features
22
23ifndef V
24SILENT=@
25endif
26PRINTS=$(SILENT)$(call info,$(1))
27
28all: $(HEADER)
29
30# generic rule for creating .lng from .lang
31$(OBJDIR)/%.lng : %.lang $(FEATS)
32 $(call PRINTS,GENLANG $<)
33 $(SILENT)$(TOOLSDIR)/genlang -e=$(APPSDIR)/lang/english.lang -t=$(ARCHOS)`cat $(FEATS)` -i=$(TARGET_ID) -b=$@ $<
34
35$(HEADER): $(OUTP)
36 $(call PRINTS,Make $(HEADER))
37 echo "#define MAX_LANGUAGE_SIZE `du -b $(OBJDIR)/* |sort -n |tail -n 1 |cut -f 1`" > $(HEADER)