forked from CoreTweet/CoreTweet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
71 lines (45 loc) · 1.49 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
MONO_PATH?=/usr/bin
MONO_CS_SHELL_CONF?=~/.config/csharp
EX_NUGET:=ExternalDependencies/nuget/bin/nuget
XBUILD?=$(MONO_PATH)/xbuild
MONO?=$(MONO_PATH)/mono
GIT?=$(shell which git)
NUGET?=$(EX_NUGET)
DOXYGEN?=$(shell hash doxygen 2>/dev/null || echo ":" && which doxygen)
REST_APIS_GEN:=RestApisGen/bin/RestApisGen.exe
all: binary docs ;
binary: nuget-packages-restore rest-apis
$(XBUILD) CoreTweet-Mono.sln /p:Configuration=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) CoreTweet.Shared/RestApis.cs
# Nonfree
all-nonfree: binary-nonfree docs package-nonfree ;
binary-nonfree: nuget-packages-restore
$(XBUILD) CoreTweet-All.sln /p:Configuration=Release
package-nonfree: external-tools binary-nonfree nuspec-nonfree
$(NUGET) pack CoreTweet.nuspec -OutputDirectory Release