1 /* |
1 /* |
2 * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
221 rv.add("ADD CPP /Yu\"incls/_precompiled.incl\""); |
221 rv.add("ADD CPP /Yu\"incls/_precompiled.incl\""); |
222 |
222 |
223 return rv; |
223 return rv; |
224 } |
224 } |
225 |
225 |
226 Vector getBaseLinkerFlags(String outDir, String outDll) { |
226 Vector getBaseLinkerFlags(String outDir, String outDll, String platformName) { |
227 Vector rv = new Vector(); |
227 Vector rv = new Vector(); |
228 |
228 |
229 rv.add("PROP Ignore_Export_Lib 0"); |
229 rv.add("PROP Ignore_Export_Lib 0"); |
230 rv.add("ADD BASE CPP /MD"); |
230 rv.add("ADD BASE CPP /MD"); |
231 rv.add("ADD CPP /MD"); |
231 rv.add("ADD CPP /MD"); |
232 rv.add("ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib " + |
232 rv.add("ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib " + |
233 " advapi32.lib shell32.lib ole32.lib oleaut32.lib winmm.lib"); |
233 " advapi32.lib shell32.lib ole32.lib oleaut32.lib winmm.lib"); |
|
234 String machine = "/machine:I386"; |
|
235 if (platformName.equals("x64")) { |
|
236 machine = "/machine:X64"; |
|
237 } |
234 rv.add("ADD LINK32 /out:\""+outDll+"\" "+ |
238 rv.add("ADD LINK32 /out:\""+outDll+"\" "+ |
235 " /nologo /subsystem:windows /machine:I386" + |
239 " /nologo /subsystem:windows /machine:" + machine + |
236 " /nologo /base:\"0x8000000\" /subsystem:windows /dll" + |
240 " /nologo /base:\"0x8000000\" /subsystem:windows /dll" + |
237 " /export:JNI_GetDefaultJavaVMInitArgs /export:JNI_CreateJavaVM /export:JNI_GetCreatedJavaVMs "+ |
241 " /export:JNI_GetDefaultJavaVMInitArgs /export:JNI_CreateJavaVM /export:JNI_GetCreatedJavaVMs "+ |
238 " /export:jio_snprintf /export:jio_printf /export:jio_fprintf /export:jio_vfprintf "+ |
242 " /export:jio_snprintf /export:jio_printf /export:jio_fprintf /export:jio_vfprintf "+ |
239 " /export:jio_vsnprintf "); |
243 " /export:jio_vsnprintf "); |
240 rv.add("SUBTRACT LINK32 /pdb:none /map"); |
244 rv.add("SUBTRACT LINK32 /pdb:none /map"); |