forked from xpnteam/xpnet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.vc
81 lines (56 loc) · 2.59 KB
/
Makefile.vc
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
73
74
75
76
77
78
79
80
81
#
# Makefile.vc
#
# See the notes at the top of Makefile. The targets here are the same, this
# just does things assuming the Visual C++ toolset instead of a Unix toolset.
#
# Usage:
# nmake /f Makefile.vc <target>
#
#######################################################################################
Configuration =Release
Platform =netcoreapp2.1
BuildDir =build
#######################################################################################
RM =del /s /q 1>nul
CP =xcopy /i
VCSETUP ="$(VCINSTALLDIR)Auxiliary\Build\vcvarsall.bat"
#######################################################################################
all: package
clean:
$(RM) XPNet.CLR\obj XPNet.CLR\bin
$(RM) XPNet.CLR.Tests\obj XPNet.CLR.Tests\bin
$(RM) XPNet.LoggerPlugin\obj XPNet.LoggerPlugin\bin
$(RM) XPNet.GraphicsTestPlugin\obj XPNet.GraphicsTestPlugin\bin
$(RM) XPNet.CLR.Template\obj XPNet.CLR.Template\bin
$(RM) XPNet.Native\obj_core
$(RM) package
$(RM) $(BuildDir)
msbuild XPNet.sln -t:Clean -p:Configuration=$(Configuration) -p:Platform=x64
msbuild XPNet.sln -t:Clean -p:Configuration=$(Configuration) -p:Platform=x86
# nuget.exe is not on the path by default, and if it were we wouldn't want to trust the
# version b/c who knows where it is or how it got there, since nothing installs it on the
# path by default. Instead, we do a private download of it.
build\nuget.exe:
curl -o build\nuget.exe https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
xpnetclr:
cd XPNet.CLR && dotnet build -c $(Configuration) && dotnet publish -c $(Configuration) && dotnet pack -c $(Configuration) -o ../package
native_x86:
msbuild XPNet.sln -t:Build -p:Configuration=$(Configuration) -p:Platform=x86
native_x86_test: native_x86
# cd build\Win32\$(Configuration) && XPNetPluginTestHost.exe
# TODO: Enable the test above once I get the x86 tests working - they fail right now w/ some calling convention issue.
native_x64:
msbuild XPNet.sln -t:Build -p:Configuration=$(Configuration) -p:Platform=x64
native_x64_test: native_x64
cd build\x64\$(Configuration) && XPNetPluginTestHost.exe
native_package:
cd XPNet.Native.Packages && dotnet pack XPNet.Native.NuSpec.win.csproj -c $(Configuration) -o ../package
native: native_x86 native_x64 native_package
template: build\nuget.exe
cd XPNet.CLR.Template && ..\build\nuget.exe pack XPNet.CLR.Template.nuspec -OutputDirectory ../package
xpnetclr_test: xpnetclr
cd XPNet.CLR.Tests && dotnet test -c $(Configuration) -p:Platform=AnyCPU
native_test: native_x86_test native_x64_test
test: xpnetclr_test native_test
package: test template