1 CPPSHARP_BASE_DIR = CppSharp
3 ifeq ($(OS),Windows_NT)
5 ifeq ($(PROCESSOR_ARCHITEW6432),AMD64)
8 ifeq ($(PROCESSOR_ARCHITECTURE),AMD64)
11 ifeq ($(PROCESSOR_ARCHITECTURE),x86)
16 UNAME_S := $(shell uname -s)
17 ifeq ($(UNAME_S),Linux)
21 ifeq ($(UNAME_S),Darwin)
27 CPPSHARP_DIR = $(CPPSHARP_BASE_DIR)/$(CPPSHARP_OS)_$(CPPSHARP_ARCH)
29 CPPSHARP_REFS = -r:$(CPPSHARP_DIR)/CppSharp.dll \
30 -r:$(CPPSHARP_DIR)/CppSharp.AST.dll \
31 -r:$(CPPSHARP_DIR)/CppSharp.Parser.dll \
32 -r:$(CPPSHARP_DIR)/CppSharp.Parser.CSharp.dll \
33 -r:$(CPPSHARP_DIR)/CppSharp.Generator.dll
37 MONO_OPTIONS_SRC = $(SRC_ROOT)/mcs/class/Mono.Options/Mono.Options/Options.cs
41 rm -Rf $(CPPSHARP_BASE_DIR)
42 git clone -b $(HASH) --depth 1 git://github.com/xamarin/CppSharpBinaries.git $(CPPSHARP_BASE_DIR) && touch $@
44 MonoAotOffsetsDumper.exe: .stamp-clone-$(HASH) MonoAotOffsetsDumper.cs $(MONO_OPTIONS_SRC)
45 mcs MonoAotOffsetsDumper.cs /debug /nowarn:0436 $(MONO_OPTIONS_SRC) $(CPPSHARP_REFS)
49 rm MonoAotOffsetsDumper.exe
51 dump: MonoAotOffsetsDumper.exe
52 MONO_PATH=$(CPPSHARP_DIR) mono MonoAotOffsetsDumper.exe
55 @if [ -f object-offsets.h ]; then rm object-offsets.h; fi;
57 echo "Processing $$f.."; \
58 echo "#include \"$$f\"" >> object-offsets1.h; \
60 @cp *.h ../mono/metadata
63 $(CPPSHARP_DIR)/premake5 vs2012
65 all: MonoAotOffsetsDumper.exe