forked from CoreTweet/CoreTweet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
72 lines (49 loc) · 1.54 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
MONO_PATH?=/usr/bin
DOTNET_PATH?=/usr/bin
MONO_CS_SHELL_CONF?=~/.config/csharp
EX_NUGET:=ExternalDependencies/nuget/bin/nuget
ifeq (, $(shell which msbuild))
XBUILD?=$(MONO_PATH)/xbuild /clp:Verbosity=minimal /p:NoWarn="1591,1573"
else
XBUILD?=$(MONO_PATH)/msbuild /m /v:m "/nowarn:CS1591;CS1573"
endif
MONO?=$(MONO_PATH)/mono
DOTNET?=$(DOTNET_PATH)/dotnet
GIT?=$(shell which git)
NUGET?=$(EX_NUGET)
DOXYGEN?=$(shell hash doxygen 2>/dev/null || echo ":" && which doxygen)
REST_APIS_GEN:=RestApisGen/bin/RestApisGen.exe
SLN?=CoreTweet-Mono.sln
all: binary docs ;
binary: nuget-packages-restore rest-apis
$(XBUILD) $(SLN) /p:Configuration=Release
binary-netstandard: rest-apis
$(DOTNET) build CoreTweet/CoreTweet.csproj -c Release
docs: external-tools binary
$(DOXYGEN)
# External tools
external-tools: nuget ;
nuget: $(NUGET) ;
submodule:
$(GIT) submodule update --init --recursive
$(EX_NUGET): submodule
cd ExternalDependencies/nuget && $(MAKE)
# NuGet
nuget-packages-restore: external-tools
$(NUGET) restore CoreTweet-All.sln -PackagesDirectory packages
# RestApis
rest-apis: CoreTweet.Shared/RestApis.cs ;
CoreTweet.Shared/RestApis.cs: $(REST_APIS_GEN)
$(MONO) $(REST_APIS_GEN)
$(REST_APIS_GEN):
$(XBUILD) RestApisGen/RestApisGen.csproj /p:Configuration=Debug
# Shell
shell: binary
[ -d $(MONO_CS_SHELL_CONF) ] || mkdir -p $(MONO_CS_SHELL_CONF);
cp Release/net40/*.dll $(MONO_CS_SHELL_CONF);
cp misc/coretweet_for_shell.cs $(MONO_CS_SHELL_CONF);
# Clean
clean:
$(RM) -rf Release
$(RM) -rf RestApisGen/bin
$(RM) CoreTweet.Shared/RestApis.cs