-
Notifications
You must be signed in to change notification settings - Fork 203
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
79 changed files
with
22,319 additions
and
12,135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
UNAME_S := $(shell uname -s) | ||
ifeq ($(UNAME_S),Darwin) | ||
LIB := -L/Applications/Binary\ Ninja.app/Contents/MacOS/ -lbinaryninjacore | ||
else | ||
LIB := -L$(HOME)/binaryninja/ -lbinaryninjacore | ||
endif | ||
|
||
|
||
TARGETDIR := bin | ||
TARGETNAME := libbinaryninjaapi | ||
TARGET := $(TARGETDIR)/$(TARGETNAME) | ||
|
||
SRCEXT = .cpp | ||
SOURCES = $(wildcard *$(SRCEXT)) | ||
OBJECTS = $(SOURCES:.cpp=.o) | ||
|
||
|
||
CFLAGS := -c -fPIC -O2 -pipe -std=gnu++11 -Wall -W | ||
ifeq ($(UNAME_S),Darwin) | ||
CC := $(shell xcrun -f g++) | ||
AR := $(shell xcrun -f ar) | ||
CFLAGS += -stdlib=libc++ | ||
else | ||
CC := g++ | ||
AR := ar | ||
endif | ||
|
||
all: $(TARGET).a | ||
|
||
$(TARGET).a: $(OBJECTS) | ||
@mkdir -p $(TARGETDIR) | ||
$(AR) rcs $@ $^ | ||
|
||
%.o: %.cpp | ||
@echo " Compiling... $@ $<" | ||
$(CC) $(CFLAGS) $(INC) -c -o $@ $< | ||
|
||
clean: | ||
@echo " Cleaning..."; | ||
$(RM) -r *.o $(TARGETDIR) | ||
|
||
.PHONY: clean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
CFLAGS = /EHsc /DWIN32 | ||
|
||
TARGETDIR = bin | ||
TARGETNAME = libbinaryninjaapi.lib | ||
TARGET = .\$(TARGETDIR)\$(TARGETNAME) | ||
|
||
OBJS = architecture.obj backgroundtask.obj basicblock.obj binaryninjaapi.obj binaryreader.obj binaryview.obj binaryviewtype.obj binarywriter.obj callingconvention.obj databuffer.obj demangle.obj fileaccessor.obj filemetadata.obj function.obj functiongraph.obj functiongraphblock.obj functionrecognizer.obj interaction.obj log.obj lowlevelil.obj mainthread.obj platform.obj plugin.obj scriptingprovider.obj tempfile.obj transform.obj type.obj update.obj jsoncpp.obj | ||
|
||
$(TARGET): $(OBJS) | ||
if not exist $(TARGETDIR) mkdir $(TARGETDIR) | ||
lib $(OBJS) /OUT:$(TARGET) | ||
|
||
jsoncpp.obj: json\jsoncpp.cpp | ||
cl $(CFLAGS) /I. /c json\jsoncpp.cpp | ||
|
||
# nmake "inference rules" are gnu make "pattern rules" | ||
.cpp.obj: | ||
cl $(CFLAGS) /c $< | ||
|
||
clean: | ||
if exist *.obj del *.obj | ||
if exist $(TARGETDIR) del /Q /S $(TARGETDIR) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.