summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/apps.make1
-rw-r--r--apps/lang/lang.make10
-rw-r--r--tools/functions.make4
-rwxr-xr-xtools/genlang10
-rw-r--r--tools/make.inc4
-rw-r--r--tools/root.make6
6 files changed, 18 insertions, 17 deletions
diff --git a/apps/apps.make b/apps/apps.make
index 4df3e12d04..bd675578e5 100644
--- a/apps/apps.make
+++ b/apps/apps.make
@@ -17,6 +17,7 @@ SRC += $(call preprocess, $(APPSDIR)/SOURCES)
17# 17#
18features $(BUILDDIR)/apps/features $(BUILDDIR)/apps/genlang-features: $(APPSDIR)/features.txt 18features $(BUILDDIR)/apps/features $(BUILDDIR)/apps/genlang-features: $(APPSDIR)/features.txt
19 $(SILENT)mkdir -p $(BUILDDIR)/apps 19 $(SILENT)mkdir -p $(BUILDDIR)/apps
20 $(SILENT)mkdir -p $(BUILDDIR)/lang
20 $(call PRINTS,PP $(<F)) 21 $(call PRINTS,PP $(<F))
21 $(SILENT)$(CC) $(PPCFLAGS) \ 22 $(SILENT)$(CC) $(PPCFLAGS) \
22 -E -P -imacros "config.h" -imacros "button.h" -x c $< | \ 23 -E -P -imacros "config.h" -imacros "button.h" -x c $< | \
diff --git a/apps/lang/lang.make b/apps/lang/lang.make
index 01a8d10ba3..e32f084a29 100644
--- a/apps/lang/lang.make
+++ b/apps/lang/lang.make
@@ -9,23 +9,23 @@
9 9
10LANGS := $(call preprocess, $(APPSDIR)/lang/SOURCES) 10LANGS := $(call preprocess, $(APPSDIR)/lang/SOURCES)
11LANGOBJ := $(LANGS:$(ROOTDIR)/%.lang=$(BUILDDIR)/%.lng) 11LANGOBJ := $(LANGS:$(ROOTDIR)/%.lang=$(BUILDDIR)/%.lng)
12LANG_O = $(BUILDDIR)/lang.o 12LANG_O = $(BUILDDIR)/lang/lang_core.o
13 13
14CLEANOBJS += $(BUILDDIR)/max_language_size.h $(BUILDDIR)/lang.* 14CLEANOBJS += $(BUILDDIR)/lang/max_language_size.h $(BUILDDIR)/lang/lang*
15 15
16# $(BUILDDIR)/apps/lang must exist before we create dependencies on it, 16# $(BUILDDIR)/apps/lang must exist before we create dependencies on it,
17# otherwise make will simply ignore those dependencies. 17# otherwise make will simply ignore those dependencies.
18# Therefore we create it here. 18# Therefore we create it here.
19#DUMMY := $(shell mkdir -p $(BUILDDIR)/apps/lang) 19#DUMMY := $(shell mkdir -p $(BUILDDIR)/apps/lang)
20 20
21$(BUILDDIR)/max_language_size.h: $(LANGOBJ) 21$(BUILDDIR)/lang/max_language_size.h: $(LANGOBJ)
22 $(call PRINTS,Create $(notdir $@)) 22 $(call PRINTS,Create $(notdir $@))
23 $(SILENT)echo "#define MAX_LANGUAGE_SIZE `ls -ln $(BUILDDIR)/apps/lang/* | awk '{print $$5}' | sort -n | tail -1`" > $@ 23 $(SILENT)echo "#define MAX_LANGUAGE_SIZE `ls -ln $(BUILDDIR)/apps/lang/* | awk '{print $$5}' | sort -n | tail -1`" > $@
24 24
25$(BUILDDIR)/lang.o: $(APPSDIR)/lang/$(LANGUAGE).lang $(BUILDDIR)/apps/features 25$(BUILDDIR)/lang/lang_core.o: $(APPSDIR)/lang/$(LANGUAGE).lang $(BUILDDIR)/apps/features
26 $(SILENT)for f in `cat $(BUILDDIR)/apps/features`; do feat="$$feat:$$f" ; done; \ 26 $(SILENT)for f in `cat $(BUILDDIR)/apps/features`; do feat="$$feat:$$f" ; done; \
27 perl -s $(TOOLSDIR)/genlang -p=$(BUILDDIR)/lang -t=$(MODELNAME)$$feat $< 27 perl -s $(TOOLSDIR)/genlang -p=$(BUILDDIR)/lang -t=$(MODELNAME)$$feat $<
28 $(call PRINTS,CC lang.c)$(CC) $(CFLAGS) -c $(BUILDDIR)/lang.c -o $@ 28 $(call PRINTS,CC lang_core.c)$(CC) $(CFLAGS) -c $(BUILDDIR)/lang/lang_core.c -o $@
29 29
30$(BUILDDIR)/%.lng : $(ROOTDIR)/%.lang $(BUILDDIR)/apps/genlang-features 30$(BUILDDIR)/%.lng : $(ROOTDIR)/%.lang $(BUILDDIR)/apps/genlang-features
31 $(call PRINTS,GENLANG $(subst $(ROOTDIR)/,,$<)) 31 $(call PRINTS,GENLANG $(subst $(ROOTDIR)/,,$<))
diff --git a/tools/functions.make b/tools/functions.make
index b16bce3088..6748962d6a 100644
--- a/tools/functions.make
+++ b/tools/functions.make
@@ -32,9 +32,9 @@ c2obj = $(addsuffix .o,$(basename $(subst $(ROOTDIR),$(BUILDDIR),$(1))))
32mkdepfile = $(shell \ 32mkdepfile = $(shell \
33 $(CC) $(PPCFLAGS) $(OTHER_INC) -MG -MM -include config.h $(2) | \ 33 $(CC) $(PPCFLAGS) $(OTHER_INC) -MG -MM -include config.h $(2) | \
34 $(TOOLSDIR)/addtargetdir.pl $(ROOTDIR) $(BUILDDIR) | \ 34 $(TOOLSDIR)/addtargetdir.pl $(ROOTDIR) $(BUILDDIR) | \
35 sed -e "s: lang.h: $(BUILDDIR)/lang.o:" \ 35 sed -e "s: lang.h: $(BUILDDIR)/lang/lang_core.o:" \
36 -e "s: sysfont.h: $(BUILDDIR)/sysfont.h:" \ 36 -e "s: sysfont.h: $(BUILDDIR)/sysfont.h:" \
37 -e "s: max_language_size.h: $(BUILDDIR)/max_language_size.h:" \ 37 -e "s: max_language_size.h: $(BUILDDIR)/lang/max_language_size.h:" \
38 -e "s: bitmaps/: $(BUILDDIR)/bitmaps/:g" \ 38 -e "s: bitmaps/: $(BUILDDIR)/bitmaps/:g" \
39 -e "s: pluginbitmaps/: $(BUILDDIR)/pluginbitmaps/:g" \ 39 -e "s: pluginbitmaps/: $(BUILDDIR)/pluginbitmaps/:g" \
40 -e "s: lib/: $(APPSDIR)/plugins/lib/:g" \ 40 -e "s: lib/: $(APPSDIR)/plugins/lib/:g" \
diff --git a/tools/genlang b/tools/genlang
index 9f9e904312..05183b8d67 100755
--- a/tools/genlang
+++ b/tools/genlang
@@ -535,13 +535,13 @@ if ($sortfile) {
535if($prefix) { 535if($prefix) {
536 # We create a .c and .h file 536 # We create a .c and .h file
537 537
538 open(HFILE, ">$prefix.h") || 538 open(HFILE, ">$prefix/lang.h") ||
539 die "Error: couldn't create file $prefix.h\n"; 539 die "Error: couldn't create file $prefix/lang.h\n";
540 open(CFILE, ">$prefix.c") || 540 open(CFILE, ">$prefix/lang_core.c") ||
541 die "Error: couldn't create file $prefix.c\n"; 541 die "Error: couldn't create file $prefix/lang_core.c\n";
542 542
543 # get header file name 543 # get header file name
544 $headername = "$prefix.h"; 544 $headername = "$prefix/lang.h";
545 $headername =~ s/(.*\/)*//; 545 $headername =~ s/(.*\/)*//;
546 546
547 print HFILE <<MOO 547 print HFILE <<MOO
diff --git a/tools/make.inc b/tools/make.inc
index 7d97efdbc6..601b892bfc 100644
--- a/tools/make.inc
+++ b/tools/make.inc
@@ -17,7 +17,7 @@ $(OBJDIR)/%.o: %.S
17# errors/warnings to cause an error code to get returned and thus stop the 17# errors/warnings to cause an error code to get returned and thus stop the
18# build 18# build
19# 19#
20# This script checks for the presence of $(BUILDDIR)/lang.h and if it doesn't 20# This script checks for the presence of $(BUILDDIR)/lang/lang.h and if it doesn't
21# alreay exist, it is created. This is because lots of files include this 21# alreay exist, it is created. This is because lots of files include this
22# *generated* file and if it doesn't exist when we generate the deps it is no 22# *generated* file and if it doesn't exist when we generate the deps it is no
23# good. There's a -MG compiler option to cover for this case, but it doesn't 23# good. There's a -MG compiler option to cover for this case, but it doesn't
@@ -45,7 +45,7 @@ $(DEPFILE): $(SOURCES)
45 rm $$del; \ 45 rm $$del; \
46 del=""; \ 46 del=""; \
47 fi \ 47 fi \
48 done | sed -e "s:[^[:space:]]*lang.h:$(OBJDIR)/lang.o:" \ 48 done | sed -e "s:[^[:space:]]*lang.h:$(OBJDIR)/lang/lang_core.o:" \
49 -e "s:[^[:space:]]*sysfont.h:$(BUILDDIR)/sysfont.h:" \ 49 -e "s:[^[:space:]]*sysfont.h:$(BUILDDIR)/sysfont.h:" \
50 -e "s:[^[:space:]]*max_language_size.h:$(BUILDDIR)/max_language_size.h:" \ 50 -e "s:[^[:space:]]*max_language_size.h:$(BUILDDIR)/max_language_size.h:" \
51 -e "s: bitmaps/: $(BUILDDIR)/bitmaps/:g" \ 51 -e "s: bitmaps/: $(BUILDDIR)/bitmaps/:g" \
diff --git a/tools/root.make b/tools/root.make
index af098c0610..9dc2937439 100644
--- a/tools/root.make
+++ b/tools/root.make
@@ -13,7 +13,7 @@ DEFINES = -DROCKBOX -DMEMORYSIZE=$(MEMORYSIZE) -DMEM=$(MEMORYSIZE) $(TARGET) \
13 -DTARGET_ID=$(TARGET_ID) -DTARGET_NAME=\"$(MODELNAME)\" \ 13 -DTARGET_ID=$(TARGET_ID) -DTARGET_NAME=\"$(MODELNAME)\" \
14 -DAPPSVERSION=\"$(VERSION)\" $(BUILDDATE) \ 14 -DAPPSVERSION=\"$(VERSION)\" $(BUILDDATE) \
15 $(EXTRA_DEFINES) # <-- -DSIMULATOR or not 15 $(EXTRA_DEFINES) # <-- -DSIMULATOR or not
16INCLUDES = -I$(BUILDDIR) $(TARGET_INC) 16INCLUDES = -I$(BUILDDIR) -I$(BUILDDIR)/lang $(TARGET_INC)
17 17
18CFLAGS = $(INCLUDES) $(DEFINES) $(GCCOPTS) 18CFLAGS = $(INCLUDES) $(DEFINES) $(GCCOPTS)
19PPCFLAGS = $(filter-out -Dmain=SDL_main,$(CFLAGS)) # cygwin sdl-config fix 19PPCFLAGS = $(filter-out -Dmain=SDL_main,$(CFLAGS)) # cygwin sdl-config fix
@@ -97,11 +97,11 @@ veryclean: clean
97clean: 97clean:
98 $(SILENT)echo Cleaning build directory 98 $(SILENT)echo Cleaning build directory
99 $(SILENT)rm -rf rockbox.zip rockbox.7z rockbox.tar rockbox.tar.gz \ 99 $(SILENT)rm -rf rockbox.zip rockbox.7z rockbox.tar rockbox.tar.gz \
100 rockbox.tar.bz2 TAGS apps firmware comsim sim lang.[ch] \ 100 rockbox.tar.bz2 TAGS apps firmware comsim sim lang \
101 manual *.pdf *.a credits.raw rockbox.ipod bitmaps \ 101 manual *.pdf *.a credits.raw rockbox.ipod bitmaps \
102 pluginbitmaps UI256.bmp rockbox-full.zip html txt \ 102 pluginbitmaps UI256.bmp rockbox-full.zip html txt \
103 rockbox-manual*.zip sysfont.h rockbox-info.txt voicefontids \ 103 rockbox-manual*.zip sysfont.h rockbox-info.txt voicefontids \
104 *.wav *.mp3 *.voice max_language_size.h $(CLEANOBJS) \ 104 *.wav *.mp3 *.voice $(CLEANOBJS) \
105 $(LINKRAM) $(LINKROM) rockbox.elf rockbox.map rockbox.bin \ 105 $(LINKRAM) $(LINKROM) rockbox.elf rockbox.map rockbox.bin \
106 make.dep rombox.elf rombox.map rombox.bin rombox.ucl romstart.txt \ 106 make.dep rombox.elf rombox.map rombox.bin rombox.ucl romstart.txt \
107 $(BINARY) $(FLASHFILE) uisimulator bootloader flash $(BOOTLINK) 107 $(BINARY) $(FLASHFILE) uisimulator bootloader flash $(BOOTLINK)