diff options
-rw-r--r-- | apps/lang/lang.make | 3 | ||||
-rw-r--r-- | firmware/firmware.make | 2 | ||||
-rwxr-xr-x | tools/addtargetdir.pl | 28 | ||||
-rw-r--r-- | tools/functions.make | 10 | ||||
-rw-r--r-- | tools/root.make | 4 |
5 files changed, 37 insertions, 10 deletions
diff --git a/apps/lang/lang.make b/apps/lang/lang.make index 416b2b4504..311a3d5ee2 100644 --- a/apps/lang/lang.make +++ b/apps/lang/lang.make | |||
@@ -9,8 +9,7 @@ | |||
9 | 9 | ||
10 | LANGS := $(call preprocess, $(APPSDIR)/lang/SOURCES) | 10 | LANGS := $(call preprocess, $(APPSDIR)/lang/SOURCES) |
11 | LANGOBJ := $(LANGS:$(ROOTDIR)/%.lang=$(BUILDDIR)/%.lng) | 11 | LANGOBJ := $(LANGS:$(ROOTDIR)/%.lang=$(BUILDDIR)/%.lng) |
12 | 12 | LANG_O = $(BUILDDIR)/lang.o | |
13 | SRC += $(ROOTDIR)/lang.o # yes ROOTDIR. root.make will subst it to BUILDDIR. | ||
14 | 13 | ||
15 | CLEANOBJS += $(BUILDDIR)/max_language_size.h $(BUILDDIR)/lang.* | 14 | CLEANOBJS += $(BUILDDIR)/max_language_size.h $(BUILDDIR)/lang.* |
16 | 15 | ||
diff --git a/firmware/firmware.make b/firmware/firmware.make index 02d60db253..2caa2c8a74 100644 --- a/firmware/firmware.make +++ b/firmware/firmware.make | |||
@@ -10,8 +10,8 @@ | |||
10 | INCLUDES += -I$(FIRMDIR) -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers | 10 | INCLUDES += -I$(FIRMDIR) -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers |
11 | 11 | ||
12 | FIRMLIB_SRC += $(call preprocess, $(FIRMDIR)/SOURCES) | 12 | FIRMLIB_SRC += $(call preprocess, $(FIRMDIR)/SOURCES) |
13 | FIRMLIB_SRC += $(ROOTDIR)/sysfont.o | ||
14 | FIRMLIB_OBJ := $(call c2obj, $(FIRMLIB_SRC)) | 13 | FIRMLIB_OBJ := $(call c2obj, $(FIRMLIB_SRC)) |
14 | FIRMLIB_OBJ += $(BUILDDIR)/sysfont.o | ||
15 | OTHER_SRC += $(FIRMLIB_SRC) | 15 | OTHER_SRC += $(FIRMLIB_SRC) |
16 | 16 | ||
17 | FIRMLIB = $(BUILDDIR)/firmware/libfirmware.a | 17 | FIRMLIB = $(BUILDDIR)/firmware/libfirmware.a |
diff --git a/tools/addtargetdir.pl b/tools/addtargetdir.pl new file mode 100755 index 0000000000..37a2b6630e --- /dev/null +++ b/tools/addtargetdir.pl | |||
@@ -0,0 +1,28 @@ | |||
1 | #!/usr/bin/perl | ||
2 | # __________ __ ___. | ||
3 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | # \/ \/ \/ \/ \/ | ||
8 | # $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $ | ||
9 | # | ||
10 | |||
11 | # addtargetdir.pl - Adds target directory to gcc-generated dependency data | ||
12 | |||
13 | use File::Basename; | ||
14 | |||
15 | my $rbroot = $ARGV[0]; | ||
16 | my $builddir = $ARGV[1]; | ||
17 | |||
18 | for (<STDIN>) { | ||
19 | if (/^([^:]+): (\S+) (.*)/) { | ||
20 | my ($target, $src, $rest) = ($1, $2, $3); | ||
21 | my $dir = dirname $src; | ||
22 | $dir =~ s/$rbroot//; | ||
23 | print "$builddir$dir/$target: $src $rest\n"; | ||
24 | } | ||
25 | else { | ||
26 | print $_; | ||
27 | } | ||
28 | } | ||
diff --git a/tools/functions.make b/tools/functions.make index dd87377f87..083e3eafeb 100644 --- a/tools/functions.make +++ b/tools/functions.make | |||
@@ -29,19 +29,17 @@ c2obj = $(subst .c,.o,$(subst .S,.o,$(subst $(ROOTDIR),$(BUILDDIR),$(1)))) | |||
29 | 29 | ||
30 | # calculate dependencies for a list of source files $(2) and output them | 30 | # calculate dependencies for a list of source files $(2) and output them |
31 | # to a file $(1) | 31 | # to a file $(1) |
32 | |||
33 | mkdepfile = $(shell \ | 32 | mkdepfile = $(shell \ |
34 | for each in $(2); do \ | 33 | $(CC) $(PPCFLAGS) $(OTHER_INC) -MG -MM -include config.h $(2) | \ |
35 | obj=`echo $$each | sed -e 's/\.[cS]/.o/' -e 's:$(ROOTDIR):$(BUILDDIR):'`; \ | 34 | $(TOOLSDIR)/addtargetdir.pl $(ROOTDIR) $(BUILDDIR) | \ |
36 | $(CC) $(PPCFLAGS) $(OTHER_INC) -MG -MM -include config.h -MT "$$obj" $$each 2>/dev/null; \ | 35 | sed -e "s: lang.h: $(BUILDDIR)/lang.o:" \ |
37 | done | sed -e "s: lang.h: $(BUILDDIR)/lang.o:" \ | ||
38 | -e "s: sysfont.h: $(BUILDDIR)/sysfont.h:" \ | 36 | -e "s: sysfont.h: $(BUILDDIR)/sysfont.h:" \ |
39 | -e "s: max_language_size.h: $(BUILDDIR)/max_language_size.h:" \ | 37 | -e "s: max_language_size.h: $(BUILDDIR)/max_language_size.h:" \ |
40 | -e "s: bitmaps/: $(BUILDDIR)/bitmaps/:g" \ | 38 | -e "s: bitmaps/: $(BUILDDIR)/bitmaps/:g" \ |
41 | -e "s: pluginbitmaps/: $(BUILDDIR)/pluginbitmaps/:g" \ | 39 | -e "s: pluginbitmaps/: $(BUILDDIR)/pluginbitmaps/:g" \ |
42 | -e "s: lib/: $(APPSDIR)/plugins/lib/:g" \ | 40 | -e "s: lib/: $(APPSDIR)/plugins/lib/:g" \ |
43 | -e "s: codeclib.h: $(APPSDIR)/codecs/lib/codeclib.h:g" \ | 41 | -e "s: codeclib.h: $(APPSDIR)/codecs/lib/codeclib.h:g" \ |
44 | > $(1); ) | 42 | > $(1) ) |
45 | 43 | ||
46 | # function to create .bmp dependencies | 44 | # function to create .bmp dependencies |
47 | bmpdepfile = $(shell \ | 45 | bmpdepfile = $(shell \ |
diff --git a/tools/root.make b/tools/root.make index c6a9232a85..0d12e30a4b 100644 --- a/tools/root.make +++ b/tools/root.make | |||
@@ -92,7 +92,7 @@ veryclean: clean | |||
92 | 92 | ||
93 | clean: | 93 | clean: |
94 | $(SILENT)echo Cleaning build directory | 94 | $(SILENT)echo Cleaning build directory |
95 | $(SILENT)rm -rf rockbox.zip rockbox.7z rockbox.tar rockbox.tar.gz rockbox.tar.bz2 TAGS apps firmware comsim sim lang.[ch] 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) $(LINKRAM) $(LINKROM) rockbox.elf rockbox.map rockbox.bin $(DEPFILE) rombox.elf rombox.map rombox.bin $(BINARY) $(FLASHFILE) uisimulator bootloader flash | 95 | $(SILENT)rm -rf rockbox.zip rockbox.7z rockbox.tar rockbox.tar.gz rockbox.tar.bz2 TAGS apps firmware comsim sim lang.[ch] 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) $(LINKRAM) $(LINKROM) rockbox.elf rockbox.map rockbox.bin $(DEPFILE) rombox.elf rombox.map rombox.bin $(BINARY) $(FLASHFILE) uisimulator bootloader flash $(BOOTLINK) |
96 | 96 | ||
97 | #### linking the binaries: #### | 97 | #### linking the binaries: #### |
98 | 98 | ||
@@ -109,6 +109,8 @@ LINKRAM := $(BUILDDIR)/ram.link | |||
109 | ROMLDS := $(FIRMDIR)/rom.lds | 109 | ROMLDS := $(FIRMDIR)/rom.lds |
110 | LINKROM := $(BUILDDIR)/rom.link | 110 | LINKROM := $(BUILDDIR)/rom.link |
111 | 111 | ||
112 | OBJ += $(LANG_O) | ||
113 | |||
112 | $(LINKRAM): $(RAMLDS) | 114 | $(LINKRAM): $(RAMLDS) |
113 | $(call PRINTS,PP $(@F)) | 115 | $(call PRINTS,PP $(@F)) |
114 | $(call preprocess2file,$<,$@,-DLOADADDRESS=$(LOADADDRESS)) | 116 | $(call preprocess2file,$<,$@,-DLOADADDRESS=$(LOADADDRESS)) |