[offsets-tool] Use git protocol instead of ssh to allow anonymous access.
[mono.git] / tools / offsets-tool / Makefile
1 CPPSHARP_DIR = CppSharp
2
3 CPPSHARP_REFS = -r:$(CPPSHARP_DIR)/CppSharp.dll \
4         -r:$(CPPSHARP_DIR)/CppSharp.AST.dll \
5         -r:$(CPPSHARP_DIR)/CppSharp.Parser.CSharp.dll \
6         -r:$(CPPSHARP_DIR)/CppSharp.Generator.dll
7
8 SRC_ROOT = ../..
9
10 MONO_OPTIONS_SRC = $(SRC_ROOT)/mcs/class/Mono.Options/Mono.Options/Options.cs
11
12 .stamp-clone:
13         @if [ ! -d $(CPPSHARP_DIR) ]; then \
14                 git clone git://github.com/xamarin/CppSharpBinaries.git $(CPPSHARP_DIR) && touch $@; \
15         fi
16
17 MonoAotOffsetsDumper.exe: .stamp-clone MonoAotOffsetsDumper.cs $(MONO_OPTIONS_SRC)
18         mcs MonoAotOffsetsDumper.cs /debug /nowarn:0436 $(MONO_OPTIONS_SRC) $(CPPSHARP_REFS)
19
20 .PHONY: clean
21 clean:
22         rm MonoAotOffsetsDumper.exe
23
24 dump: MonoAotOffsetsDumper.exe 
25         MONO_PATH=$(CPPSHARP_DIR) mono MonoAotOffsetsDumper.exe
26
27 update:
28         @if [ -f object-offsets.h ]; then rm object-offsets.h; fi;
29         @for f in *.h; do \
30                 echo "Processing $$f.."; \
31                 echo "#include \"$$f\"" >> object-offsets1.h; \
32         done
33         @cp *.h ../mono/metadata
34
35 gen-proj:
36         $(CPPSHARP_DIR)/premake5 vs2012
37
38 all: MonoAotOffsetsDumper.exe