diff options
-rw-r--r-- | apps/apps.make | 1 | ||||
-rw-r--r-- | apps/lang/lang.make | 10 | ||||
-rw-r--r-- | tools/functions.make | 4 | ||||
-rwxr-xr-x | tools/genlang | 10 | ||||
-rw-r--r-- | tools/make.inc | 4 | ||||
-rw-r--r-- | tools/root.make | 6 |
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) # features $(BUILDDIR)/apps/features $(BUILDDIR)/apps/genlang-features: $(APPSDIR)/features.txt $(SILENT)mkdir -p $(BUILDDIR)/apps + $(SILENT)mkdir -p $(BUILDDIR)/lang $(call PRINTS,PP $(<F)) $(SILENT)$(CC) $(PPCFLAGS) \ -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 @@ LANGS := $(call preprocess, $(APPSDIR)/lang/SOURCES) LANGOBJ := $(LANGS:$(ROOTDIR)/%.lang=$(BUILDDIR)/%.lng) -LANG_O = $(BUILDDIR)/lang.o +LANG_O = $(BUILDDIR)/lang/lang_core.o -CLEANOBJS += $(BUILDDIR)/max_language_size.h $(BUILDDIR)/lang.* +CLEANOBJS += $(BUILDDIR)/lang/max_language_size.h $(BUILDDIR)/lang/lang* # $(BUILDDIR)/apps/lang must exist before we create dependencies on it, # otherwise make will simply ignore those dependencies. # Therefore we create it here. #DUMMY := $(shell mkdir -p $(BUILDDIR)/apps/lang) -$(BUILDDIR)/max_language_size.h: $(LANGOBJ) +$(BUILDDIR)/lang/max_language_size.h: $(LANGOBJ) $(call PRINTS,Create $(notdir $@)) $(SILENT)echo "#define MAX_LANGUAGE_SIZE `ls -ln $(BUILDDIR)/apps/lang/* | awk '{print $$5}' | sort -n | tail -1`" > $@ -$(BUILDDIR)/lang.o: $(APPSDIR)/lang/$(LANGUAGE).lang $(BUILDDIR)/apps/features +$(BUILDDIR)/lang/lang_core.o: $(APPSDIR)/lang/$(LANGUAGE).lang $(BUILDDIR)/apps/features $(SILENT)for f in `cat $(BUILDDIR)/apps/features`; do feat="$$feat:$$f" ; done; \ perl -s $(TOOLSDIR)/genlang -p=$(BUILDDIR)/lang -t=$(MODELNAME)$$feat $< - $(call PRINTS,CC lang.c)$(CC) $(CFLAGS) -c $(BUILDDIR)/lang.c -o $@ + $(call PRINTS,CC lang_core.c)$(CC) $(CFLAGS) -c $(BUILDDIR)/lang/lang_core.c -o $@ $(BUILDDIR)/%.lng : $(ROOTDIR)/%.lang $(BUILDDIR)/apps/genlang-features $(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)))) mkdepfile = $(shell \ $(CC) $(PPCFLAGS) $(OTHER_INC) -MG -MM -include config.h $(2) | \ $(TOOLSDIR)/addtargetdir.pl $(ROOTDIR) $(BUILDDIR) | \ - sed -e "s: lang.h: $(BUILDDIR)/lang.o:" \ + sed -e "s: lang.h: $(BUILDDIR)/lang/lang_core.o:" \ -e "s: sysfont.h: $(BUILDDIR)/sysfont.h:" \ - -e "s: max_language_size.h: $(BUILDDIR)/max_language_size.h:" \ + -e "s: max_language_size.h: $(BUILDDIR)/lang/max_language_size.h:" \ -e "s: bitmaps/: $(BUILDDIR)/bitmaps/:g" \ -e "s: pluginbitmaps/: $(BUILDDIR)/pluginbitmaps/:g" \ -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) { if($prefix) { # We create a .c and .h file - open(HFILE, ">$prefix.h") || - die "Error: couldn't create file $prefix.h\n"; - open(CFILE, ">$prefix.c") || - die "Error: couldn't create file $prefix.c\n"; + open(HFILE, ">$prefix/lang.h") || + die "Error: couldn't create file $prefix/lang.h\n"; + open(CFILE, ">$prefix/lang_core.c") || + die "Error: couldn't create file $prefix/lang_core.c\n"; # get header file name - $headername = "$prefix.h"; + $headername = "$prefix/lang.h"; $headername =~ s/(.*\/)*//; 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 # errors/warnings to cause an error code to get returned and thus stop the # build # -# This script checks for the presence of $(BUILDDIR)/lang.h and if it doesn't +# This script checks for the presence of $(BUILDDIR)/lang/lang.h and if it doesn't # alreay exist, it is created. This is because lots of files include this # *generated* file and if it doesn't exist when we generate the deps it is no # good. There's a -MG compiler option to cover for this case, but it doesn't @@ -45,7 +45,7 @@ $(DEPFILE): $(SOURCES) rm $$del; \ del=""; \ fi \ - done | sed -e "s:[^[:space:]]*lang.h:$(OBJDIR)/lang.o:" \ + done | sed -e "s:[^[:space:]]*lang.h:$(OBJDIR)/lang/lang_core.o:" \ -e "s:[^[:space:]]*sysfont.h:$(BUILDDIR)/sysfont.h:" \ -e "s:[^[:space:]]*max_language_size.h:$(BUILDDIR)/max_language_size.h:" \ -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) \ -DTARGET_ID=$(TARGET_ID) -DTARGET_NAME=\"$(MODELNAME)\" \ -DAPPSVERSION=\"$(VERSION)\" $(BUILDDATE) \ $(EXTRA_DEFINES) # <-- -DSIMULATOR or not -INCLUDES = -I$(BUILDDIR) $(TARGET_INC) +INCLUDES = -I$(BUILDDIR) -I$(BUILDDIR)/lang $(TARGET_INC) CFLAGS = $(INCLUDES) $(DEFINES) $(GCCOPTS) PPCFLAGS = $(filter-out -Dmain=SDL_main,$(CFLAGS)) # cygwin sdl-config fix @@ -97,11 +97,11 @@ veryclean: clean clean: $(SILENT)echo Cleaning build directory $(SILENT)rm -rf rockbox.zip rockbox.7z rockbox.tar rockbox.tar.gz \ - rockbox.tar.bz2 TAGS apps firmware comsim sim lang.[ch] \ + rockbox.tar.bz2 TAGS apps firmware comsim sim lang \ manual *.pdf *.a credits.raw rockbox.ipod bitmaps \ pluginbitmaps UI256.bmp rockbox-full.zip html txt \ rockbox-manual*.zip sysfont.h rockbox-info.txt voicefontids \ - *.wav *.mp3 *.voice max_language_size.h $(CLEANOBJS) \ + *.wav *.mp3 *.voice $(CLEANOBJS) \ $(LINKRAM) $(LINKROM) rockbox.elf rockbox.map rockbox.bin \ make.dep rombox.elf rombox.map rombox.bin rombox.ucl romstart.txt \ $(BINARY) $(FLASHFILE) uisimulator bootloader flash $(BOOTLINK) |