From 36aa74316a7e8614e56af2311f44ad73e52f8ae3 Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Tue, 4 Dec 2012 17:37:02 -0700 Subject: [PATCH] fix Windows cross-compile build --- makefile | 11 +++++------ src/embed.cpp | 2 +- src/embedded-loader.cpp | 4 ++-- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/makefile b/makefile index 8e494b5595..c1a2fb2b7b 100755 --- a/makefile +++ b/makefile @@ -496,7 +496,7 @@ ifeq ($(platform),windows) else shared += -Wl,--add-stdcall-alias endif - + embed = $(build-embed)/embed.exe embed-loader = $(build-embed-loader)/embed-loader.exe embed-loader-o = $(build-embed)/embed-loader.o @@ -1021,13 +1021,13 @@ endif ifdef embed $(embed): $(embed-objects) $(embed-loader-o) @echo "building $(embed)" - $(build-cxx) $(^) -mwindows -mconsole -static -o $(@) - + $(cxx) $(^) -mwindows -mconsole -static -o $(@) + $(build-embed)/%.o: $(src)/%.cpp @echo "compiling $(@)" @mkdir -p $(dir $(@)) - $(build-cxx) -D_UNICODE -DUNICODE -c $(<) -o $(@) - + $(cxx) -D_UNICODE -DUNICODE -c $(<) -o $(@) + $(embed-loader-o): $(embed-loader) $(converter) @mkdir -p $(dir $(@)) $(converter) $(<) $(@) _binary_loader_start \ @@ -1047,7 +1047,6 @@ $(build-embed-loader)/%.o: $(src)/%.cpp @mkdir -p $(dir $(@)) $(cxx) -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/win32 \ -D_JNI_IMPLEMENTATION_ -c $(<) -o $(@) - endif $(build)/%.o: $(lzma)/C/%.c diff --git a/src/embed.cpp b/src/embed.cpp index ed02731c1a..d47e4e98a9 100644 --- a/src/embed.cpp +++ b/src/embed.cpp @@ -8,7 +8,7 @@ There is NO WARRANTY for this software. See license.txt for details. */ -#include +#include #include #include #include diff --git a/src/embedded-loader.cpp b/src/embedded-loader.cpp index d34bb0bce0..0b0a2c90ab 100644 --- a/src/embedded-loader.cpp +++ b/src/embedded-loader.cpp @@ -8,7 +8,7 @@ There is NO WARRANTY for this software. See license.txt for details. */ -#include +#include #include #include @@ -102,4 +102,4 @@ main(int ac, const char** av) vm->DestroyJavaVM(); return exitCode; -} \ No newline at end of file +}