1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/agent/src/os/win32/windbg/Makefile Wed Apr 27 01:25:04 2016 +0800 1.3 @@ -0,0 +1,91 @@ 1.4 +# 1.5 +# Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved. 1.6 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.7 +# 1.8 +# This code is free software; you can redistribute it and/or modify it 1.9 +# under the terms of the GNU General Public License version 2 only, as 1.10 +# published by the Free Software Foundation. 1.11 +# 1.12 +# This code is distributed in the hope that it will be useful, but WITHOUT 1.13 +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1.14 +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1.15 +# version 2 for more details (a copy is included in the LICENSE file that 1.16 +# accompanied this code). 1.17 +# 1.18 +# You should have received a copy of the GNU General Public License version 1.19 +# 2 along with this work; if not, write to the Free Software Foundation, 1.20 +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1.21 +# 1.22 +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 1.23 +# or visit www.oracle.com if you need additional information or have any 1.24 +# questions. 1.25 +# 1.26 +# 1.27 + 1.28 +# set WINDBG_HOME and JAVA_HOME environment variables before this make. 1.29 + 1.30 +SAWINDBGDLL = sawindbg.dll 1.31 +CPP32=cl.exe 1.32 +CPP64=cl.exe 1.33 +LINK32=link.exe 1.34 +LINK64=link.exe 1.35 +JAVAH=$(JAVA_HOME)/bin/javah 1.36 +WINDBG_INCLUDE=$(WINDBG_HOME)/sdk/inc 1.37 +WINDBG_LIB32=$(WINDBG_HOME)/sdk/lib/i386 1.38 +WINDBG_LIB_IA64=$(WINDBG_HOME)/sdk/lib/ia64 1.39 +WINDBG_LIB_AMD64=$(WINDBG_HOME)/sdk/lib/amd64 1.40 + 1.41 +SADIS=../../../share/native/sadis.c 1.42 + 1.43 +# These do not need to be optimized (don't run a lot of code) and it 1.44 +# will be useful to have the assertion checks in place 1.45 + 1.46 +CFLAGS32=/nologo /MD /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_WINDOWS" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c 1.47 + 1.48 +CFLAGS64=/nologo /MD /W3 /GX /Od /D "WIN32" /D "WIN64" /D "_WINDOWS" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c 1.49 + 1.50 +LIBS32= $(WINDBG_LIB32)/dbgeng.lib \ 1.51 + /nologo /subsystem:console /debug /machine:I386 1.52 + 1.53 +LIBS_IA64= $(WINDBG_LIB_IA64)/dbgeng.lib \ 1.54 + /nologo /subsystem:console /debug /machine:IA64 1.55 + 1.56 +LIBS_AMD64= $(WINDBG_LIB_AMD64)/dbgeng.lib bufferoverflowU.lib \ 1.57 + /nologo /subsystem:console /debug /machine:AMD64 1.58 + 1.59 +default: i386/$(SAWINDBGDLL) 1.60 + 1.61 +ia64: ia64/$(SAWINDBGDLL) 1.62 + 1.63 +amd64: amd64/$(SAWINDBGDLL) 1.64 + 1.65 +i386/$(SAWINDBGDLL) : sawindbg.cpp $(SADIS) 1.66 + @ mkdir -p i386 1.67 + @ $(JAVAH) -jni -classpath ../../../../build/classes sun.jvm.hotspot.debugger.windbg.WindbgDebuggerLocal sun.jvm.hotspot.debugger.x86.X86ThreadContext 1.68 + @ $(JAVAH) -jni -classpath ../../../../build/classes sun.jvm.hotspot.asm.Disassembler 1.69 + @ $(CPP32) /I$(JAVA_HOME)/include /I$(JAVA_HOME)/include/win32 /I$(WINDBG_INCLUDE) $(CFLAGS32) /Fp"i386/sawindbg.pch" /Fo"i386/" /Fd"i386/" /c sawindbg.cpp 1.70 + @ $(CPP32) /I$(JAVA_HOME)/include /I$(JAVA_HOME)/include/win32 /I$(WINDBG_INCLUDE) $(CFLAGS32) /Fp"i386/sadis.pch" /Fo"i386/" /Fd"i386/" /c $(SADIS) 1.71 + $(LINK32) /out:$@ /DLL i386/sawindbg.obj i386/sadis.obj $(LIBS32) 1.72 + 1.73 +ia64/$(SAWINDBGDLL) : sawindbg.cpp $(SADIS) 1.74 + @ mkdir -p ia64 1.75 + @ $(JAVAH) -jni -classpath ../../../../build/classes sun.jvm.hotspot.debugger.windbg.WindbgDebuggerLocal sun.jvm.hotspot.debugger.ia64.IA64ThreadContext 1.76 + @ $(JAVAH) -jni -classpath ../../../../build/classes sun.jvm.hotspot.asm.Disassembler 1.77 + @ $(CPP64) /I$(JAVA_HOME)/include /I$(JAVA_HOME)/include/win32 /I$(WINDBG_INCLUDE) $(CFLAGS64) /Fp"ia64/sawindbg.pch" /Fo"ia64/" /Fd"ia64/" /c sawindbg.cpp 1.78 + @ $(CPP64) /I$(JAVA_HOME)/include /I$(JAVA_HOME)/include/win32 /I$(WINDBG_INCLUDE) $(CFLAGS64) /Fp"ia64/sadis.pch" /Fo"ia64/" /Fd"ia64/" /c $(SADIS) 1.79 + $(LINK64) /out:$@ /DLL ia64/sawindbg.obj ia64/sadis.obj $(LIBS_IA64) 1.80 + 1.81 +amd64/$(SAWINDBGDLL) : sawindbg.cpp $(SADIS) 1.82 + @ mkdir -p amd64 1.83 + @ $(JAVAH) -jni -classpath ../../../../build/classes sun.jvm.hotspot.debugger.windbg.WindbgDebuggerLocal sun.jvm.hotspot.debugger.amd64.AMD64ThreadContext 1.84 + @ $(JAVAH) -jni -classpath ../../../../build/classes sun.jvm.hotspot.asm.Disassembler 1.85 + @ $(CPP64) /I$(JAVA_HOME)/include /I$(JAVA_HOME)/include/win32 /I$(WINDBG_INCLUDE) $(CFLAGS64) /Fp"amd64/sawindbg.pch" /Fo"amd64/" /Fd"amd64/" /c sawindbg.cpp 1.86 + @ $(CPP64) /I$(JAVA_HOME)/include /I$(JAVA_HOME)/include/win32 /I$(WINDBG_INCLUDE) $(CFLAGS64) /Fp"amd64/sadis.pch" /Fo"amd64/" /Fd"amd64/" /c $(SADIS) 1.87 + $(LINK64) /out:$@ /DLL amd64/sawindbg.obj amd64/sadis.obj $(LIBS_AMD64) 1.88 + 1.89 +clean: 1.90 + rm *.h 1.91 + rm -rf i386 1.92 + rm -rf ia64 1.93 + rm -rf amd64 1.94 +