diff options
author | cdn@chromium.org <cdn@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2010-10-01 22:38:10 +0000 |
---|---|---|
committer | cdn@chromium.org <cdn@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2010-10-01 22:38:10 +0000 |
commit | 2b4274afc4fae883d1251a7a420e24fd526a9f16 (patch) | |
tree | d9cafcfb8d68b4c005f5cb80c15e3286c291b067 /src/third_party/libdisasm/swig/perl/Makefile-swig | |
parent | Add stack-scanning fallback to Stackwalker{AMD64,ARM}. (diff) | |
download | breakpad-2b4274afc4fae883d1251a7a420e24fd526a9f16.tar.xz |
Added libdisasm to the repository. This library is no longer under development so there
is no reason not to keep it locally. Implemented a basic disassembler which can be used
to scan bytecode for interesting conditions. This should be pretty easy to add to for
things other than exploitability if there is a desire. This also adds several tests to
the windows exploitability ranking code to take advantage of the disassembler for x86
code.
BUG=None
TEST=DisassemblerX86Test.*
Review URL: http://breakpad.appspot.com/203001
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@705 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/third_party/libdisasm/swig/perl/Makefile-swig')
-rw-r--r-- | src/third_party/libdisasm/swig/perl/Makefile-swig | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/src/third_party/libdisasm/swig/perl/Makefile-swig b/src/third_party/libdisasm/swig/perl/Makefile-swig new file mode 100644 index 00000000..9f3a6457 --- /dev/null +++ b/src/third_party/libdisasm/swig/perl/Makefile-swig @@ -0,0 +1,65 @@ +ifndef BASE_NAME +BASE_NAME = x86disasm +endif + +ifndef SWIG +SWIG = swig # apt-get install swig ! +endif + +ifndef GCC +GCC = gcc +endif + +ifndef CC_FLAGS +CC_FLAGS = -c -fPIC +endif + +ifndef LD_FLAGS +LD_FLAGS = -shared -L.. -ldisasm +endif + +INTERFACE_FILE = libdisasm_oop.i + +SWIG_INTERFACE = ../$(INTERFACE_FILE) + +# PERL rules +PERL_MOD = blib/arch/auto/$(BASE_NAME)/$(BASE_NAME).so +PERL_SHADOW = $(BASE_NAME)_wrap.c +PERL_SWIG = $(BASE_NAME).pl +PERL_OBJ = $(BASE_NAME)_wrap.o +PERL_INC = `perl -e 'use Config; print $$Config{archlib};'`/CORE +PERL_CC_FLAGS = `perl -e 'use Config; print $$Config{ccflags};'` + +#==================================================== +# TARGETS + +all: swig-perl + +dummy: swig-perl install uninstall clean + +swig-perl: $(PERL_MOD) + +$(PERL_MOD): $(PERL_OBJ) + perl Makefile.PL + make + #$(GCC) $(LD_FLAGS) $(PERL_OBJ) -o $@ + +$(PERL_OBJ): $(PERL_SHADOW) + $(GCC) $(CC_FLAGS) $(PERL_CC_FLAGS) -I$(PERL_INC) -o $@ $< + +$(PERL_SHADOW): $(SWIG_INTERFACE) + swig -perl -shadow -o $(PERL_SHADOW) -outdir . $< + +# ================================================================== +install: $(PERL_MOD) + make install + +# ================================================================== +uninstall: + +# ================================================================== +clean: + rm $(PERL_MOD) $(PERL_OBJ) + rm $(PERL_SHADOW) + rm -rf Makefile blib pm_to_blib + |