Commit FS#9494 by Yoshihisa Uchida: add support for building the simulators under Windows using MingW

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19923 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Maurus Cuelenaere 2009-02-04 20:59:27 +00:00
parent b0a3a563a1
commit e8da447729
5 changed files with 21 additions and 5 deletions

View file

@ -21,7 +21,7 @@ for (<STDIN>) {
if (/^([^:]+): (\S+) (.*)/) { if (/^([^:]+): (\S+) (.*)/) {
my ($target, $src, $rest) = ($1, $2, $3); my ($target, $src, $rest) = ($1, $2, $3);
my $dir = dirname $src; my $dir = dirname $src;
$dir =~ s/$rbroot//; $dir =~ s/^.*$rbroot//;
print "$builddir$dir/$target: $src $rest\n"; print "$builddir$dir/$target: $src $rest\n";
} }
elsif (/^([^:]+): \\/) { elsif (/^([^:]+): \\/) {
@ -32,7 +32,7 @@ for (<STDIN>) {
if (/^\s+([^ ]+) (.*)/) { if (/^\s+([^ ]+) (.*)/) {
my ($src, $rest) = ($1, $2); my ($src, $rest) = ($1, $2);
my $dir = dirname $src; my $dir = dirname $src;
$dir =~ s/$rbroot//; $dir =~ s/^.*$rbroot//;
print "$builddir$dir/$target2: $src $rest\n"; print "$builddir$dir/$target2: $src $rest\n";
$target2 = ""; $target2 = "";
} }

10
tools/configure vendored
View file

@ -133,6 +133,16 @@ simcc () {
output="rockboxui.exe" # use this as output binary name output="rockboxui.exe" # use this as output binary name
;; ;;
MINGW*)
echo "MinGW host detected"
# sdl version
GCCOPTS="$GCCOPTS `sdl-config --cflags`"
LDOPTS="`sdl-config --libs` -mconsole"
output="rockboxui.exe" # use this as output binary name
;;
Linux) Linux)
echo "Linux host detected" echo "Linux host detected"
if [ "0" != `sdl-config --libs |grep -c mwindows` ]; then if [ "0" != `sdl-config --libs |grep -c mwindows` ]; then

View file

@ -39,7 +39,7 @@ mkdepfile = $(shell \
-e "s: pluginbitmaps/: $(BUILDDIR)/pluginbitmaps/:g" \ -e "s: pluginbitmaps/: $(BUILDDIR)/pluginbitmaps/:g" \
-e "s: lib/: $(APPSDIR)/plugins/lib/:g" \ -e "s: lib/: $(APPSDIR)/plugins/lib/:g" \
-e "s: codeclib.h: $(APPSDIR)/codecs/lib/codeclib.h:g" \ -e "s: codeclib.h: $(APPSDIR)/codecs/lib/codeclib.h:g" \
> $(1)_ && mv $(1)_ $(1) ) >> $(1)_)
# function to create .bmp dependencies # function to create .bmp dependencies
bmpdepfile = $(shell \ bmpdepfile = $(shell \

View file

@ -540,6 +540,10 @@ if($prefix) {
open(CFILE, ">$prefix.c") || open(CFILE, ">$prefix.c") ||
die "Error: couldn't create file $prefix.c\n"; die "Error: couldn't create file $prefix.c\n";
# get header file name
$headername = "$prefix.h";
$headername =~ s/(.*\/)*//;
print HFILE <<MOO print HFILE <<MOO
/* This file was automatically generated using genlang */ /* This file was automatically generated using genlang */
/* /*
@ -564,7 +568,7 @@ MOO
/* This file was automaticly generated using genlang, the strings come /* This file was automaticly generated using genlang, the strings come
from "$input" */ from "$input" */
#include "$prefix.h" #include "$headername"
unsigned char *language_strings[LANG_LAST_INDEX_IN_ARRAY]; unsigned char *language_strings[LANG_LAST_INDEX_IN_ARRAY];
const unsigned char language_builtin[] = const unsigned char language_builtin[] =

View file

@ -80,7 +80,9 @@ $(RBINFO): $(BUILDDIR)/$(BINARY)
$(DEPFILE) dep: $(DEPFILE) dep:
$(call PRINTS,Generating dependencies) $(call PRINTS,Generating dependencies)
@echo foo > /dev/null # there must be a "real" command in the rule @echo foo > /dev/null # there must be a "real" command in the rule
$(call mkdepfile,$(DEPFILE),$(SRC) $(OTHER_SRC)) $(call mkdepfile,$(DEPFILE),$(SRC))
$(call mkdepfile,$(DEPFILE),$(OTHER_SRC))
@mv $(DEPFILE)_ $(DEPFILE)
$(call bmpdepfile,$(DEPFILE),$(BMP) $(PBMP)) $(call bmpdepfile,$(DEPFILE),$(BMP) $(PBMP))
bin: $(DEPFILE) $(TOOLS) $(BUILDDIR)/$(BINARY) bin: $(DEPFILE) $(TOOLS) $(BUILDDIR)/$(BINARY)