forked from poizan42/dumpext
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
60 lines (48 loc) · 1.14 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
LD=link
MAKE=nmake
RM=DEL
CP=COPY
!IF "$(TARGET_CPU)"=="x86"
CPU_DIR=i386
DIR_PSFIX=(x86)
!ELSEIF "$(TARGET_CPU)"=="x64"
CPU_DIR=amd64
DIR_PSFIX=(x64)
!ELSEIF "$(TARGET_CPU)"=="IA64"
CPU_DIR=ia64
DIR_PSFIX=(x64)
!ENDIF
!IFNDEF WINDBG_DIR
WINDBG_DIR=%ProgramFiles%\Debugging Tools for Windows $(DIR_PSFIX)
!ENDIF
!IF !DEFINED(CPU_DIR)
!ERROR Target platform can't be deduced. Make sure the MS SDK building \
environment is set and WINDBG_DIR is defined for non standard WinDbg \
installation location.
!ENDIF
INC=-I "$(WINDBG_DIR)\sdk\inc"
CPPFLAGS_CMN=$(INC)
CPPFLAGS=$(CPPFLAGS_CMN) -Yucommon.h
LIB_DIR=-LIBPATH:"$(WINDBG_DIR)\sdk\lib\$(CPU_DIR)"
LIBS=dbgeng.lib
LDFLAGS=-DLL $(LIB_DIR) $(LIBS)
OBJS = rdflags.obj \
common.obj \
config.obj \
pebase.obj \
resrc.obj \
imports.obj \
except.obj \
dumpext.obj
all: dumpext.dll
clean:
$(RM) *.obj *.dll *.exp *.lib
cleanall: clean
$(RM) *.pch
install: dumpext.dll
$(CP) $** "$(WINDBG_DIR)\winext"
# precompiled common headers
common.obj: common.cpp
$(CPP) -c $(CPPFLAGS_CMN) -Yc$*.h $**
dumpext.dll: $(OBJS)
$(LD) -DEF:dumpext.def $(LDFLAGS) $** /out:$@