# IDA Plugin Makefile for Windows SDK 7.1 # Brandon Falk, Gamozo Labs # Targets: # # all - Builds both the IDA32 and IDA64 plugins # ida32 - Builds the IDA32 plugin # ida64 - Builds the IDA64 plugin # clean - Cleans all objects and compiled plugins # install - Installs the plugins to INSTALL_PATH # INSTALL_PATH must have trailing '\' INSTALL_PATH = "C:\Program Files (x86)\IDA 6.3\plugins\" # IDA_SDK_PATH must have trailing '\' IDA_SDK_PATH = C:\idasdk63\ CFLAGS = /O2 LDFLAGS = /EXPORT:PLUGIN # Output name (do not include the extention) OUTNAME = windbgsrv # Doo doo doo doo, can't touch this! IDA_SDK_INC = $(IDA_SDK_PATH)include IDA_SDK_LIB32 = $(IDA_SDK_PATH)lib\x86_win_vc_32\ida.lib IDA_SDK_LIB64 = $(IDA_SDK_PATH)lib\x86_win_vc_64\ida.lib IDA32_DEFINES = /D__NT__ /D__IDP__ IDA64_DEFINES = /D__NT__ /D__IDP__ /D__EA64__ # You should not have to change target 'all' all: ida32 ida64 # ida32 targets (objects created should have the suffix '_ida32') ida32: objs/windbgsrv_ida32.obj @link /nologo $(LDFLAGS) /DLL /OUT:$(OUTNAME).plw "$(IDA_SDK_LIB32)" \ objs\*_ida32.obj @del $(OUTNAME).exp $(OUTNAME).lib @echo ida32 build complete # ida64 targets (objects created should have the suffix '_ida64') ida64: objs/windbgsrv_ida64.obj @link /nologo $(LDFLAGS) /DLL /OUT:$(OUTNAME).p64 "$(IDA_SDK_LIB64)" \ objs\*_ida64.obj @del $(OUTNAME).exp $(OUTNAME).lib @echo ida64 build complete # You should not have to change target 'clean' clean: @del $(OUTNAME).exp $(OUTNAME).plw $(OUTNAME).p64 $(OUTNAME).lib \ *.pdb *.ilk objs\*.obj install: all @copy $(OUTNAME).plw $(INSTALL_PATH)$(OUTNAME).plw > NUL @copy $(OUTNAME).p64 $(INSTALL_PATH)$(OUTNAME).p64 > NUL @echo plugins installed successfully # ==================== # Now add your targets # ==================== objs/windbgsrv_ida32.obj: srcs/windbgsrv.cpp @cl /nologo $(CFLAGS) /Foobjs\windbgsrv_ida32.obj /MTd /I"$(IDA_SDK_INC)" \ $(IDA32_DEFINES) /c srcs\windbgsrv.cpp objs/windbgsrv_ida64.obj: srcs/windbgsrv.cpp @cl /nologo $(CFLAGS) /Foobjs\windbgsrv_ida64.obj /MTd /I"$(IDA_SDK_INC)" \ $(IDA64_DEFINES) /c srcs\windbgsrv.cpp